#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AttachmentIdNotFound(crate::error::AttachmentIdNotFound),
AttachmentLimitExceeded(crate::error::AttachmentLimitExceeded),
AttachmentSetExpired(crate::error::AttachmentSetExpired),
AttachmentSetIdNotFound(crate::error::AttachmentSetIdNotFound),
AttachmentSetSizeLimitExceeded(crate::error::AttachmentSetSizeLimitExceeded),
CaseCreationLimitExceeded(crate::error::CaseCreationLimitExceeded),
CaseIdNotFound(crate::error::CaseIdNotFound),
DescribeAttachmentLimitExceeded(crate::error::DescribeAttachmentLimitExceeded),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AttachmentIdNotFound(inner) => inner.fmt(f),
Error::AttachmentLimitExceeded(inner) => inner.fmt(f),
Error::AttachmentSetExpired(inner) => inner.fmt(f),
Error::AttachmentSetIdNotFound(inner) => inner.fmt(f),
Error::AttachmentSetSizeLimitExceeded(inner) => inner.fmt(f),
Error::CaseCreationLimitExceeded(inner) => inner.fmt(f),
Error::CaseIdNotFound(inner) => inner.fmt(f),
Error::DescribeAttachmentLimitExceeded(inner) => inner.fmt(f),
Error::InternalServerError(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AddAttachmentsToSetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AddAttachmentsToSetError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::AddAttachmentsToSetError> for Error {
fn from(err: crate::error::AddAttachmentsToSetError) -> Self {
match err.kind {
crate::error::AddAttachmentsToSetErrorKind::AttachmentLimitExceeded(inner) => {
Error::AttachmentLimitExceeded(inner)
}
crate::error::AddAttachmentsToSetErrorKind::AttachmentSetExpired(inner) => {
Error::AttachmentSetExpired(inner)
}
crate::error::AddAttachmentsToSetErrorKind::AttachmentSetIdNotFound(inner) => {
Error::AttachmentSetIdNotFound(inner)
}
crate::error::AddAttachmentsToSetErrorKind::AttachmentSetSizeLimitExceeded(inner) => {
Error::AttachmentSetSizeLimitExceeded(inner)
}
crate::error::AddAttachmentsToSetErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::AddAttachmentsToSetErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AddCommunicationToCaseError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AddCommunicationToCaseError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::AddCommunicationToCaseError> for Error {
fn from(err: crate::error::AddCommunicationToCaseError) -> Self {
match err.kind {
crate::error::AddCommunicationToCaseErrorKind::AttachmentSetExpired(inner) => {
Error::AttachmentSetExpired(inner)
}
crate::error::AddCommunicationToCaseErrorKind::AttachmentSetIdNotFound(inner) => {
Error::AttachmentSetIdNotFound(inner)
}
crate::error::AddCommunicationToCaseErrorKind::CaseIdNotFound(inner) => {
Error::CaseIdNotFound(inner)
}
crate::error::AddCommunicationToCaseErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::AddCommunicationToCaseErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateCaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateCaseError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::CreateCaseError> for Error {
fn from(err: crate::error::CreateCaseError) -> Self {
match err.kind {
crate::error::CreateCaseErrorKind::AttachmentSetExpired(inner) => {
Error::AttachmentSetExpired(inner)
}
crate::error::CreateCaseErrorKind::AttachmentSetIdNotFound(inner) => {
Error::AttachmentSetIdNotFound(inner)
}
crate::error::CreateCaseErrorKind::CaseCreationLimitExceeded(inner) => {
Error::CaseCreationLimitExceeded(inner)
}
crate::error::CreateCaseErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::CreateCaseErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeAttachmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeAttachmentError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeAttachmentError> for Error {
fn from(err: crate::error::DescribeAttachmentError) -> Self {
match err.kind {
crate::error::DescribeAttachmentErrorKind::AttachmentIdNotFound(inner) => {
Error::AttachmentIdNotFound(inner)
}
crate::error::DescribeAttachmentErrorKind::DescribeAttachmentLimitExceeded(inner) => {
Error::DescribeAttachmentLimitExceeded(inner)
}
crate::error::DescribeAttachmentErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeAttachmentErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeCasesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeCasesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeCasesError> for Error {
fn from(err: crate::error::DescribeCasesError) -> Self {
match err.kind {
crate::error::DescribeCasesErrorKind::CaseIdNotFound(inner) => {
Error::CaseIdNotFound(inner)
}
crate::error::DescribeCasesErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeCasesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeCommunicationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeCommunicationsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeCommunicationsError> for Error {
fn from(err: crate::error::DescribeCommunicationsError) -> Self {
match err.kind {
crate::error::DescribeCommunicationsErrorKind::CaseIdNotFound(inner) => {
Error::CaseIdNotFound(inner)
}
crate::error::DescribeCommunicationsErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeCommunicationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeServicesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeServicesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeServicesError> for Error {
fn from(err: crate::error::DescribeServicesError) -> Self {
match err.kind {
crate::error::DescribeServicesErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeServicesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeSeverityLevelsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeSeverityLevelsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeSeverityLevelsError> for Error {
fn from(err: crate::error::DescribeSeverityLevelsError) -> Self {
match err.kind {
crate::error::DescribeSeverityLevelsErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeSeverityLevelsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeTrustedAdvisorCheckRefreshStatusesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeTrustedAdvisorCheckRefreshStatusesError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeTrustedAdvisorCheckRefreshStatusesError> for Error {
fn from(err: crate::error::DescribeTrustedAdvisorCheckRefreshStatusesError) -> Self {
match err.kind {
crate::error::DescribeTrustedAdvisorCheckRefreshStatusesErrorKind::InternalServerError(inner) => Error::InternalServerError(inner),
crate::error::DescribeTrustedAdvisorCheckRefreshStatusesErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::DescribeTrustedAdvisorCheckResultError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeTrustedAdvisorCheckResultError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeTrustedAdvisorCheckResultError> for Error {
fn from(err: crate::error::DescribeTrustedAdvisorCheckResultError) -> Self {
match err.kind {
crate::error::DescribeTrustedAdvisorCheckResultErrorKind::InternalServerError(
inner,
) => Error::InternalServerError(inner),
crate::error::DescribeTrustedAdvisorCheckResultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeTrustedAdvisorChecksError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeTrustedAdvisorChecksError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeTrustedAdvisorChecksError> for Error {
fn from(err: crate::error::DescribeTrustedAdvisorChecksError) -> Self {
match err.kind {
crate::error::DescribeTrustedAdvisorChecksErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::DescribeTrustedAdvisorChecksErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeTrustedAdvisorCheckSummariesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeTrustedAdvisorCheckSummariesError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeTrustedAdvisorCheckSummariesError> for Error {
fn from(err: crate::error::DescribeTrustedAdvisorCheckSummariesError) -> Self {
match err.kind {
crate::error::DescribeTrustedAdvisorCheckSummariesErrorKind::InternalServerError(
inner,
) => Error::InternalServerError(inner),
crate::error::DescribeTrustedAdvisorCheckSummariesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::RefreshTrustedAdvisorCheckError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::RefreshTrustedAdvisorCheckError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::RefreshTrustedAdvisorCheckError> for Error {
fn from(err: crate::error::RefreshTrustedAdvisorCheckError) -> Self {
match err.kind {
crate::error::RefreshTrustedAdvisorCheckErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::RefreshTrustedAdvisorCheckErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ResolveCaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ResolveCaseError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::ResolveCaseError> for Error {
fn from(err: crate::error::ResolveCaseError) -> Self {
match err.kind {
crate::error::ResolveCaseErrorKind::CaseIdNotFound(inner) => {
Error::CaseIdNotFound(inner)
}
crate::error::ResolveCaseErrorKind::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::error::ResolveCaseErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}