#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ApplyArchiveRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ApplyArchiveRuleError, 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::ApplyArchiveRuleError> for Error {
fn from(err: crate::error::ApplyArchiveRuleError) -> Self {
match err.kind {
crate::error::ApplyArchiveRuleErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ApplyArchiveRuleErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ApplyArchiveRuleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ApplyArchiveRuleErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ApplyArchiveRuleErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ApplyArchiveRuleErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CancelPolicyGenerationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CancelPolicyGenerationError, 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::CancelPolicyGenerationError> for Error {
fn from(err: crate::error::CancelPolicyGenerationError) -> Self {
match err.kind {
crate::error::CancelPolicyGenerationErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CancelPolicyGenerationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CancelPolicyGenerationErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CancelPolicyGenerationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CancelPolicyGenerationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateAccessPreviewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateAccessPreviewError, 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::CreateAccessPreviewError> for Error {
fn from(err: crate::error::CreateAccessPreviewError) -> Self {
match err.kind {
crate::error::CreateAccessPreviewErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CreateAccessPreviewErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::CreateAccessPreviewErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateAccessPreviewErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateAccessPreviewErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateAccessPreviewErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CreateAccessPreviewErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CreateAccessPreviewErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateAnalyzerError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateAnalyzerError, 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::CreateAnalyzerError> for Error {
fn from(err: crate::error::CreateAnalyzerError) -> Self {
match err.kind {
crate::error::CreateAnalyzerErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CreateAnalyzerErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::CreateAnalyzerErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateAnalyzerErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateAnalyzerErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CreateAnalyzerErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CreateAnalyzerErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateArchiveRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateArchiveRuleError, 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::CreateArchiveRuleError> for Error {
fn from(err: crate::error::CreateArchiveRuleError) -> Self {
match err.kind {
crate::error::CreateArchiveRuleErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CreateArchiveRuleErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::CreateArchiveRuleErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateArchiveRuleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateArchiveRuleErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateArchiveRuleErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CreateArchiveRuleErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CreateArchiveRuleErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteAnalyzerError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteAnalyzerError, 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::DeleteAnalyzerError> for Error {
fn from(err: crate::error::DeleteAnalyzerError) -> Self {
match err.kind {
crate::error::DeleteAnalyzerErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::DeleteAnalyzerErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteAnalyzerErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteAnalyzerErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DeleteAnalyzerErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteAnalyzerErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteArchiveRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteArchiveRuleError, 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::DeleteArchiveRuleError> for Error {
fn from(err: crate::error::DeleteArchiveRuleError) -> Self {
match err.kind {
crate::error::DeleteArchiveRuleErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::DeleteArchiveRuleErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteArchiveRuleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteArchiveRuleErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DeleteArchiveRuleErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteArchiveRuleErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetAccessPreviewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetAccessPreviewError, 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::GetAccessPreviewError> for Error {
fn from(err: crate::error::GetAccessPreviewError) -> Self {
match err.kind {
crate::error::GetAccessPreviewErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetAccessPreviewErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetAccessPreviewErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetAccessPreviewErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetAccessPreviewErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetAccessPreviewErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetAnalyzedResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetAnalyzedResourceError, 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::GetAnalyzedResourceError> for Error {
fn from(err: crate::error::GetAnalyzedResourceError) -> Self {
match err.kind {
crate::error::GetAnalyzedResourceErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetAnalyzedResourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetAnalyzedResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetAnalyzedResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetAnalyzedResourceErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetAnalyzedResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetAnalyzerError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetAnalyzerError, 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::GetAnalyzerError> for Error {
fn from(err: crate::error::GetAnalyzerError) -> Self {
match err.kind {
crate::error::GetAnalyzerErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetAnalyzerErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetAnalyzerErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetAnalyzerErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetAnalyzerErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetAnalyzerErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetArchiveRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetArchiveRuleError, 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::GetArchiveRuleError> for Error {
fn from(err: crate::error::GetArchiveRuleError) -> Self {
match err.kind {
crate::error::GetArchiveRuleErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetArchiveRuleErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetArchiveRuleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetArchiveRuleErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetArchiveRuleErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetArchiveRuleErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetFindingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetFindingError, 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::GetFindingError> for Error {
fn from(err: crate::error::GetFindingError) -> Self {
match err.kind {
crate::error::GetFindingErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetFindingErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetFindingErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetFindingErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetFindingErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetFindingErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGeneratedPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetGeneratedPolicyError, 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::GetGeneratedPolicyError> for Error {
fn from(err: crate::error::GetGeneratedPolicyError) -> Self {
match err.kind {
crate::error::GetGeneratedPolicyErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetGeneratedPolicyErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetGeneratedPolicyErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetGeneratedPolicyErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetGeneratedPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAccessPreviewFindingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListAccessPreviewFindingsError, 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::ListAccessPreviewFindingsError> for Error {
fn from(err: crate::error::ListAccessPreviewFindingsError) -> Self {
match err.kind {
crate::error::ListAccessPreviewFindingsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListAccessPreviewFindingsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAccessPreviewsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListAccessPreviewsError, 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::ListAccessPreviewsError> for Error {
fn from(err: crate::error::ListAccessPreviewsError) -> Self {
match err.kind {
crate::error::ListAccessPreviewsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListAccessPreviewsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListAccessPreviewsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListAccessPreviewsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListAccessPreviewsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListAccessPreviewsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAnalyzedResourcesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListAnalyzedResourcesError, 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::ListAnalyzedResourcesError> for Error {
fn from(err: crate::error::ListAnalyzedResourcesError) -> Self {
match err.kind {
crate::error::ListAnalyzedResourcesErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListAnalyzedResourcesErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListAnalyzedResourcesErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListAnalyzedResourcesErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListAnalyzedResourcesErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListAnalyzedResourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAnalyzersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListAnalyzersError, 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::ListAnalyzersError> for Error {
fn from(err: crate::error::ListAnalyzersError) -> Self {
match err.kind {
crate::error::ListAnalyzersErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListAnalyzersErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListAnalyzersErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListAnalyzersErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListAnalyzersErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListArchiveRulesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListArchiveRulesError, 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::ListArchiveRulesError> for Error {
fn from(err: crate::error::ListArchiveRulesError) -> Self {
match err.kind {
crate::error::ListArchiveRulesErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListArchiveRulesErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListArchiveRulesErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListArchiveRulesErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListArchiveRulesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListFindingsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListFindingsError, 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::ListFindingsError> for Error {
fn from(err: crate::error::ListFindingsError) -> Self {
match err.kind {
crate::error::ListFindingsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListFindingsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListFindingsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListFindingsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListFindingsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListFindingsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListPolicyGenerationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListPolicyGenerationsError, 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::ListPolicyGenerationsError> for Error {
fn from(err: crate::error::ListPolicyGenerationsError) -> Self {
match err.kind {
crate::error::ListPolicyGenerationsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListPolicyGenerationsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListPolicyGenerationsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListPolicyGenerationsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListPolicyGenerationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, 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::ListTagsForResourceError> for Error {
fn from(err: crate::error::ListTagsForResourceError) -> Self {
match err.kind {
crate::error::ListTagsForResourceErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListTagsForResourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListTagsForResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListTagsForResourceErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListTagsForResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartPolicyGenerationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::StartPolicyGenerationError, 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::StartPolicyGenerationError> for Error {
fn from(err: crate::error::StartPolicyGenerationError) -> Self {
match err.kind {
crate::error::StartPolicyGenerationErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::StartPolicyGenerationErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::StartPolicyGenerationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::StartPolicyGenerationErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::StartPolicyGenerationErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::StartPolicyGenerationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::StartPolicyGenerationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartResourceScanError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::StartResourceScanError, 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::StartResourceScanError> for Error {
fn from(err: crate::error::StartResourceScanError) -> Self {
match err.kind {
crate::error::StartResourceScanErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::StartResourceScanErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::StartResourceScanErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::StartResourceScanErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::StartResourceScanErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::StartResourceScanErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::TagResourceError, 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::TagResourceError> for Error {
fn from(err: crate::error::TagResourceError) -> Self {
match err.kind {
crate::error::TagResourceErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::TagResourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::TagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::TagResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::TagResourceErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::TagResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagResourceError, 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::UntagResourceError> for Error {
fn from(err: crate::error::UntagResourceError) -> Self {
match err.kind {
crate::error::UntagResourceErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::UntagResourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UntagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UntagResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::UntagResourceErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::UntagResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateArchiveRuleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateArchiveRuleError, 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::UpdateArchiveRuleError> for Error {
fn from(err: crate::error::UpdateArchiveRuleError) -> Self {
match err.kind {
crate::error::UpdateArchiveRuleErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::UpdateArchiveRuleErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateArchiveRuleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateArchiveRuleErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::UpdateArchiveRuleErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::UpdateArchiveRuleErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateFindingsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdateFindingsError, 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::UpdateFindingsError> for Error {
fn from(err: crate::error::UpdateFindingsError) -> Self {
match err.kind {
crate::error::UpdateFindingsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::UpdateFindingsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateFindingsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateFindingsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::UpdateFindingsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::UpdateFindingsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ValidatePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ValidatePolicyError, 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::ValidatePolicyError> for Error {
fn from(err: crate::error::ValidatePolicyError) -> Self {
match err.kind {
crate::error::ValidatePolicyErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ValidatePolicyErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ValidatePolicyErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ValidatePolicyErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ValidatePolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}