#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
ConstraintViolationException(crate::error::ConstraintViolationException),
InternalServiceException(crate::error::InternalServiceException),
InvalidParameterException(crate::error::InvalidParameterException),
PaginationTokenExpiredException(crate::error::PaginationTokenExpiredException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::ConstraintViolationException(inner) => inner.fmt(f),
Error::InternalServiceException(inner) => inner.fmt(f),
Error::InvalidParameterException(inner) => inner.fmt(f),
Error::PaginationTokenExpiredException(inner) => inner.fmt(f),
Error::ThrottledException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeReportCreationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeReportCreationError, 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::DescribeReportCreationError> for Error {
fn from(err: crate::error::DescribeReportCreationError) -> Self {
match err.kind {
crate::error::DescribeReportCreationErrorKind::ConstraintViolationException(inner) => {
Error::ConstraintViolationException(inner)
}
crate::error::DescribeReportCreationErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::DescribeReportCreationErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeReportCreationErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::DescribeReportCreationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetComplianceSummaryError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetComplianceSummaryError, 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::GetComplianceSummaryError> for Error {
fn from(err: crate::error::GetComplianceSummaryError) -> Self {
match err.kind {
crate::error::GetComplianceSummaryErrorKind::ConstraintViolationException(inner) => {
Error::ConstraintViolationException(inner)
}
crate::error::GetComplianceSummaryErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::GetComplianceSummaryErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetComplianceSummaryErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::GetComplianceSummaryErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetResourcesError, 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::GetResourcesError> for Error {
fn from(err: crate::error::GetResourcesError) -> Self {
match err.kind {
crate::error::GetResourcesErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::GetResourcesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetResourcesErrorKind::PaginationTokenExpiredException(inner) => {
Error::PaginationTokenExpiredException(inner)
}
crate::error::GetResourcesErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::GetResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetTagKeysError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetTagKeysError, 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::GetTagKeysError> for Error {
fn from(err: crate::error::GetTagKeysError) -> Self {
match err.kind {
crate::error::GetTagKeysErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::GetTagKeysErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetTagKeysErrorKind::PaginationTokenExpiredException(inner) => {
Error::PaginationTokenExpiredException(inner)
}
crate::error::GetTagKeysErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::GetTagKeysErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetTagValuesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetTagValuesError, 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::GetTagValuesError> for Error {
fn from(err: crate::error::GetTagValuesError) -> Self {
match err.kind {
crate::error::GetTagValuesErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::GetTagValuesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetTagValuesErrorKind::PaginationTokenExpiredException(inner) => {
Error::PaginationTokenExpiredException(inner)
}
crate::error::GetTagValuesErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::GetTagValuesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartReportCreationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::StartReportCreationError, 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::StartReportCreationError> for Error {
fn from(err: crate::error::StartReportCreationError) -> Self {
match err.kind {
crate::error::StartReportCreationErrorKind::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::error::StartReportCreationErrorKind::ConstraintViolationException(inner) => {
Error::ConstraintViolationException(inner)
}
crate::error::StartReportCreationErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::StartReportCreationErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::StartReportCreationErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::StartReportCreationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::TagResourcesError, 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::TagResourcesError> for Error {
fn from(err: crate::error::TagResourcesError) -> Self {
match err.kind {
crate::error::TagResourcesErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::TagResourcesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::TagResourcesErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::TagResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagResourcesError, 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::UntagResourcesError> for Error {
fn from(err: crate::error::UntagResourcesError) -> Self {
match err.kind {
crate::error::UntagResourcesErrorKind::InternalServiceException(inner) => {
Error::InternalServiceException(inner)
}
crate::error::UntagResourcesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UntagResourcesErrorKind::ThrottledException(inner) => {
Error::ThrottledException(inner)
}
crate::error::UntagResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}