#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
UnauthorizedException(crate::error::UnauthorizedException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::BadRequestException(inner) => inner.fmt(f),
Error::ForbiddenException(inner) => inner.fmt(f),
Error::InternalServerErrorException(inner) => inner.fmt(f),
Error::MethodNotAllowedException(inner) => inner.fmt(f),
Error::NotFoundException(inner) => inner.fmt(f),
Error::TooManyRequestsException(inner) => inner.fmt(f),
Error::UnauthorizedException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateGroupErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::CreateGroupErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::CreateGroupErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::CreateGroupErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::CreateGroupErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::CreateGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteGroupErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::DeleteGroupErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::DeleteGroupErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::DeleteGroupErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::DeleteGroupErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::DeleteGroupErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::DeleteGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::GetGroupErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::GetGroupErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::GetGroupErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::GetGroupErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::GetGroupErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::GetGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetGroupConfigurationError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupConfigurationErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::GetGroupConfigurationErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::GetGroupConfigurationErrorKind::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::error::GetGroupConfigurationErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::GetGroupConfigurationErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::GetGroupConfigurationErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::GetGroupConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupQueryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetGroupQueryError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupQueryErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::GetGroupQueryErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::GetGroupQueryErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::GetGroupQueryErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::GetGroupQueryErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::GetGroupQueryErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::GetGroupQueryErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetTagsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetTagsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetTagsErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::GetTagsErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::GetTagsErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::GetTagsErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::GetTagsErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::GetTagsErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::GetTagsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GroupResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GroupResourcesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GroupResourcesErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::GroupResourcesErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::GroupResourcesErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::GroupResourcesErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::GroupResourcesErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::GroupResourcesErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::GroupResourcesErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListGroupResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListGroupResourcesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListGroupResourcesErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::ListGroupResourcesErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::ListGroupResourcesErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::ListGroupResourcesErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::ListGroupResourcesErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::ListGroupResourcesErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::ListGroupResourcesErrorKind::UnauthorizedException(inner) => {
Error::UnauthorizedException(inner)
}
crate::error::ListGroupResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListGroupsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListGroupsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListGroupsErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::ListGroupsErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::ListGroupsErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::ListGroupsErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::ListGroupsErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::ListGroupsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutGroupConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutGroupConfigurationError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::PutGroupConfigurationErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::PutGroupConfigurationErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::PutGroupConfigurationErrorKind::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::error::PutGroupConfigurationErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::PutGroupConfigurationErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::PutGroupConfigurationErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::PutGroupConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SearchResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::SearchResourcesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::SearchResourcesErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::SearchResourcesErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::SearchResourcesErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::SearchResourcesErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::SearchResourcesErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::SearchResourcesErrorKind::UnauthorizedException(inner) => {
Error::UnauthorizedException(inner)
}
crate::error::SearchResourcesErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::TagError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::TagErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::TagErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::TagErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::TagErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::TagErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::TagErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::TagErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UngroupResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UngroupResourcesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UngroupResourcesErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::UngroupResourcesErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::UngroupResourcesErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::UngroupResourcesErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::UngroupResourcesErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::UngroupResourcesErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::UngroupResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UntagErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::UntagErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::UntagErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::UntagErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::UntagErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::UntagErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::UntagErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdateGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateGroupErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::UpdateGroupErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::UpdateGroupErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::UpdateGroupErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::UpdateGroupErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::UpdateGroupErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::UpdateGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateGroupQueryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateGroupQueryError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateGroupQueryErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::UpdateGroupQueryErrorKind::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::error::UpdateGroupQueryErrorKind::InternalServerErrorException(inner) => {
Error::InternalServerErrorException(inner)
}
crate::error::UpdateGroupQueryErrorKind::MethodNotAllowedException(inner) => {
Error::MethodNotAllowedException(inner)
}
crate::error::UpdateGroupQueryErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::UpdateGroupQueryErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::UpdateGroupQueryErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl std::error::Error for Error {}