#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateCustomDomainError {
pub kind: AssociateCustomDomainErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateCustomDomainErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for AssociateCustomDomainError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateCustomDomainErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
AssociateCustomDomainErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
AssociateCustomDomainErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
AssociateCustomDomainErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateCustomDomainError {
fn code(&self) -> Option<&str> {
AssociateCustomDomainError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateCustomDomainError {
pub fn new(kind: AssociateCustomDomainErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AssociateCustomDomainErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateCustomDomainErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomDomainErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomDomainErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomDomainErrorKind::InvalidStateException(_)
)
}
}
impl std::error::Error for AssociateCustomDomainError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateCustomDomainErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
AssociateCustomDomainErrorKind::InvalidRequestException(_inner) => Some(_inner),
AssociateCustomDomainErrorKind::InvalidStateException(_inner) => Some(_inner),
AssociateCustomDomainErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAutoScalingConfigurationError {
pub kind: CreateAutoScalingConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAutoScalingConfigurationErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateAutoScalingConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
CreateAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
CreateAutoScalingConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateAutoScalingConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAutoScalingConfigurationError {
fn code(&self) -> Option<&str> {
CreateAutoScalingConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAutoScalingConfigurationError {
pub fn new(
kind: CreateAutoScalingConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateAutoScalingConfigurationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAutoScalingConfigurationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingConfigurationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingConfigurationErrorKind::ServiceQuotaExceededException(_)
)
}
}
impl std::error::Error for CreateAutoScalingConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
CreateAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
CreateAutoScalingConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateAutoScalingConfigurationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectionError {
pub kind: CreateConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectionErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectionErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectionError {
fn code(&self) -> Option<&str> {
CreateConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectionError {
pub fn new(kind: CreateConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateConnectionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::ServiceQuotaExceededException(_)
)
}
}
impl std::error::Error for CreateConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectionErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateConnectionErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateConnectionErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateConnectionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateServiceError {
pub kind: CreateServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateServiceError {
fn code(&self) -> Option<&str> {
CreateServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateServiceError {
pub fn new(kind: CreateServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::ServiceQuotaExceededException(_)
)
}
}
impl std::error::Error for CreateServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateServiceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAutoScalingConfigurationError {
pub kind: DeleteAutoScalingConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAutoScalingConfigurationErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteAutoScalingConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DeleteAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DeleteAutoScalingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteAutoScalingConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAutoScalingConfigurationError {
fn code(&self) -> Option<&str> {
DeleteAutoScalingConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAutoScalingConfigurationError {
pub fn new(
kind: DeleteAutoScalingConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteAutoScalingConfigurationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAutoScalingConfigurationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingConfigurationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingConfigurationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteAutoScalingConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DeleteAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
DeleteAutoScalingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteAutoScalingConfigurationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectionError {
pub kind: DeleteConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectionErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectionErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectionError {
fn code(&self) -> Option<&str> {
DeleteConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConnectionError {
pub fn new(kind: DeleteConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteConnectionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectionErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteConnectionErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteConnectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteServiceError {
pub kind: DeleteServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteServiceError {
fn code(&self) -> Option<&str> {
DeleteServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteServiceError {
pub fn new(kind: DeleteServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, DeleteServiceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteServiceErrorKind::InvalidStateException(_inner) => Some(_inner),
DeleteServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAutoScalingConfigurationError {
pub kind: DescribeAutoScalingConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAutoScalingConfigurationErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeAutoScalingConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DescribeAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DescribeAutoScalingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeAutoScalingConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAutoScalingConfigurationError {
fn code(&self) -> Option<&str> {
DescribeAutoScalingConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAutoScalingConfigurationError {
pub fn new(
kind: DescribeAutoScalingConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeAutoScalingConfigurationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAutoScalingConfigurationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingConfigurationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingConfigurationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeAutoScalingConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAutoScalingConfigurationErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DescribeAutoScalingConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
DescribeAutoScalingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeAutoScalingConfigurationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCustomDomainsError {
pub kind: DescribeCustomDomainsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCustomDomainsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeCustomDomainsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCustomDomainsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DescribeCustomDomainsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeCustomDomainsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeCustomDomainsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCustomDomainsError {
fn code(&self) -> Option<&str> {
DescribeCustomDomainsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCustomDomainsError {
pub fn new(kind: DescribeCustomDomainsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeCustomDomainsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCustomDomainsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomDomainsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomDomainsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomDomainsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeCustomDomainsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCustomDomainsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DescribeCustomDomainsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeCustomDomainsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeCustomDomainsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeServiceError {
pub kind: DescribeServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DescribeServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeServiceError {
fn code(&self) -> Option<&str> {
DescribeServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeServiceError {
pub fn new(kind: DescribeServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeServiceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DescribeServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateCustomDomainError {
pub kind: DisassociateCustomDomainErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateCustomDomainErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisassociateCustomDomainError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateCustomDomainErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DisassociateCustomDomainErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DisassociateCustomDomainErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
DisassociateCustomDomainErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateCustomDomainErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateCustomDomainError {
fn code(&self) -> Option<&str> {
DisassociateCustomDomainError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateCustomDomainError {
pub fn new(kind: DisassociateCustomDomainErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DisassociateCustomDomainErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateCustomDomainErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomDomainErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomDomainErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomDomainErrorKind::InvalidStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomDomainErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateCustomDomainError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateCustomDomainErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DisassociateCustomDomainErrorKind::InvalidRequestException(_inner) => Some(_inner),
DisassociateCustomDomainErrorKind::InvalidStateException(_inner) => Some(_inner),
DisassociateCustomDomainErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateCustomDomainErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAutoScalingConfigurationsError {
pub kind: ListAutoScalingConfigurationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAutoScalingConfigurationsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListAutoScalingConfigurationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAutoScalingConfigurationsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
ListAutoScalingConfigurationsErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
ListAutoScalingConfigurationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAutoScalingConfigurationsError {
fn code(&self) -> Option<&str> {
ListAutoScalingConfigurationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAutoScalingConfigurationsError {
pub fn new(
kind: ListAutoScalingConfigurationsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListAutoScalingConfigurationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAutoScalingConfigurationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListAutoScalingConfigurationsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListAutoScalingConfigurationsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListAutoScalingConfigurationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAutoScalingConfigurationsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
ListAutoScalingConfigurationsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListAutoScalingConfigurationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListConnectionsError {
pub kind: ListConnectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListConnectionsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListConnectionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListConnectionsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListConnectionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListConnectionsError {
fn code(&self) -> Option<&str> {
ListConnectionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListConnectionsError {
pub fn new(kind: ListConnectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListConnectionsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListConnectionsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListConnectionsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListConnectionsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListConnectionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListConnectionsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListConnectionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListConnectionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListOperationsError {
pub kind: ListOperationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListOperationsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListOperationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListOperationsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListOperationsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListOperationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListOperationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListOperationsError {
fn code(&self) -> Option<&str> {
ListOperationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListOperationsError {
pub fn new(kind: ListOperationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListOperationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListOperationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListOperationsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListOperationsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListOperationsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListOperationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListOperationsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListOperationsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListOperationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListOperationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServicesError {
pub kind: ListServicesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServicesErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListServicesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServicesErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListServicesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListServicesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServicesError {
fn code(&self) -> Option<&str> {
ListServicesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListServicesError {
pub fn new(kind: ListServicesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListServicesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServicesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListServicesErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListServicesErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListServicesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServicesErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListServicesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListServicesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidStateException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PauseServiceError {
pub kind: PauseServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PauseServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PauseServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PauseServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
PauseServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PauseServiceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
PauseServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PauseServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PauseServiceError {
fn code(&self) -> Option<&str> {
PauseServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PauseServiceError {
pub fn new(kind: PauseServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PauseServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PauseServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
PauseServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PauseServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, PauseServiceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PauseServiceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for PauseServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PauseServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
PauseServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
PauseServiceErrorKind::InvalidStateException(_inner) => Some(_inner),
PauseServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PauseServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResumeServiceError {
pub kind: ResumeServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResumeServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ResumeServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResumeServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ResumeServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ResumeServiceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
ResumeServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ResumeServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResumeServiceError {
fn code(&self) -> Option<&str> {
ResumeServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResumeServiceError {
pub fn new(kind: ResumeServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ResumeServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResumeServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ResumeServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ResumeServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, ResumeServiceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ResumeServiceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ResumeServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResumeServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ResumeServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ResumeServiceErrorKind::InvalidStateException(_inner) => Some(_inner),
ResumeServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ResumeServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDeploymentError {
pub kind: StartDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDeploymentErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDeploymentErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
StartDeploymentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDeploymentError {
fn code(&self) -> Option<&str> {
StartDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartDeploymentError {
pub fn new(kind: StartDeploymentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartDeploymentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDeploymentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
StartDeploymentErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartDeploymentErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartDeploymentErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StartDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDeploymentErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
StartDeploymentErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartDeploymentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidStateException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidStateException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServiceError {
pub kind: UpdateServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServiceErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServiceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServiceError {
fn code(&self) -> Option<&str> {
UpdateServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateServiceError {
pub fn new(kind: UpdateServiceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateServiceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServiceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(&self.kind, UpdateServiceErrorKind::InvalidStateException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServiceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UpdateServiceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateServiceErrorKind::InvalidStateException(_inner) => Some(_inner),
UpdateServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateServiceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidStateException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidStateException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidStateException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidStateException")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for InvalidStateException {}
pub mod invalid_state_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidStateException {
crate::error::InvalidStateException {
message: self.message,
}
}
}
}
impl InvalidStateException {
pub fn builder() -> crate::error::invalid_state_exception::Builder {
crate::error::invalid_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidRequestException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidRequestException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidRequestException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServiceErrorException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServiceErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServiceErrorException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InternalServiceErrorException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceErrorException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for InternalServiceErrorException {}
pub mod internal_service_error_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServiceErrorException {
crate::error::InternalServiceErrorException {
message: self.message,
}
}
}
}
impl InternalServiceErrorException {
pub fn builder() -> crate::error::internal_service_error_exception::Builder {
crate::error::internal_service_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceQuotaExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}