#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
InsufficientCapacityException(crate::error::InsufficientCapacityException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingParameterValueException(crate::error::MissingParameterValueException),
PolicyEnforcedException(crate::error::PolicyEnforcedException),
RequestTimeoutException(crate::error::RequestTimeoutException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::InsufficientCapacityException(inner) => inner.fmt(f),
Error::InvalidParameterValueException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::MissingParameterValueException(inner) => inner.fmt(f),
Error::PolicyEnforcedException(inner) => inner.fmt(f),
Error::RequestTimeoutException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceUnavailableException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AbortMultipartUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AbortMultipartUploadError, 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::AbortMultipartUploadError> for Error {
fn from(err: crate::error::AbortMultipartUploadError) -> Self {
match err.kind {
crate::error::AbortMultipartUploadErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::AbortMultipartUploadErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::AbortMultipartUploadErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AbortMultipartUploadErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::AbortMultipartUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AbortVaultLockError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::AbortVaultLockError, 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::AbortVaultLockError> for Error {
fn from(err: crate::error::AbortVaultLockError) -> Self {
match err.kind {
crate::error::AbortVaultLockErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::AbortVaultLockErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::AbortVaultLockErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AbortVaultLockErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::AbortVaultLockErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AddTagsToVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::AddTagsToVaultError, 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::AddTagsToVaultError> for Error {
fn from(err: crate::error::AddTagsToVaultError) -> Self {
match err.kind {
crate::error::AddTagsToVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::AddTagsToVaultErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::AddTagsToVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::AddTagsToVaultErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AddTagsToVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::AddTagsToVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CompleteMultipartUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CompleteMultipartUploadError, 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::CompleteMultipartUploadError> for Error {
fn from(err: crate::error::CompleteMultipartUploadError) -> Self {
match err.kind {
crate::error::CompleteMultipartUploadErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::CompleteMultipartUploadErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::CompleteMultipartUploadErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CompleteMultipartUploadErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::CompleteMultipartUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CompleteVaultLockError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CompleteVaultLockError, 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::CompleteVaultLockError> for Error {
fn from(err: crate::error::CompleteVaultLockError) -> Self {
match err.kind {
crate::error::CompleteVaultLockErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::CompleteVaultLockErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::CompleteVaultLockErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CompleteVaultLockErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::CompleteVaultLockErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateVaultError, 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::CreateVaultError> for Error {
fn from(err: crate::error::CreateVaultError) -> Self {
match err.kind {
crate::error::CreateVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::CreateVaultErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::CreateVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::CreateVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::CreateVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteArchiveError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteArchiveError, 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::DeleteArchiveError> for Error {
fn from(err: crate::error::DeleteArchiveError) -> Self {
match err.kind {
crate::error::DeleteArchiveErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::DeleteArchiveErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::DeleteArchiveErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteArchiveErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DeleteArchiveErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteVaultError, 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::DeleteVaultError> for Error {
fn from(err: crate::error::DeleteVaultError) -> Self {
match err.kind {
crate::error::DeleteVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::DeleteVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::DeleteVaultErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DeleteVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteVaultAccessPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteVaultAccessPolicyError, 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::DeleteVaultAccessPolicyError> for Error {
fn from(err: crate::error::DeleteVaultAccessPolicyError) -> Self {
match err.kind {
crate::error::DeleteVaultAccessPolicyErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::DeleteVaultAccessPolicyErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::DeleteVaultAccessPolicyErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteVaultAccessPolicyErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DeleteVaultAccessPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteVaultNotificationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteVaultNotificationsError, 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::DeleteVaultNotificationsError> for Error {
fn from(err: crate::error::DeleteVaultNotificationsError) -> Self {
match err.kind {
crate::error::DeleteVaultNotificationsErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::DeleteVaultNotificationsErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::DeleteVaultNotificationsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteVaultNotificationsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DeleteVaultNotificationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeJobError, 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::DescribeJobError> for Error {
fn from(err: crate::error::DescribeJobError) -> Self {
match err.kind {
crate::error::DescribeJobErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::DescribeJobErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::DescribeJobErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeJobErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DescribeJobErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeVaultError, 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::DescribeVaultError> for Error {
fn from(err: crate::error::DescribeVaultError) -> Self {
match err.kind {
crate::error::DescribeVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::DescribeVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::DescribeVaultErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::DescribeVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetDataRetrievalPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetDataRetrievalPolicyError, 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::GetDataRetrievalPolicyError> for Error {
fn from(err: crate::error::GetDataRetrievalPolicyError) -> Self {
match err.kind {
crate::error::GetDataRetrievalPolicyErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::GetDataRetrievalPolicyErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::GetDataRetrievalPolicyErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::GetDataRetrievalPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetJobOutputError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetJobOutputError, 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::GetJobOutputError> for Error {
fn from(err: crate::error::GetJobOutputError) -> Self {
match err.kind {
crate::error::GetJobOutputErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::GetJobOutputErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::GetJobOutputErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetJobOutputErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::GetJobOutputErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetVaultAccessPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetVaultAccessPolicyError, 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::GetVaultAccessPolicyError> for Error {
fn from(err: crate::error::GetVaultAccessPolicyError) -> Self {
match err.kind {
crate::error::GetVaultAccessPolicyErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::GetVaultAccessPolicyErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::GetVaultAccessPolicyErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetVaultAccessPolicyErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::GetVaultAccessPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetVaultLockError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetVaultLockError, 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::GetVaultLockError> for Error {
fn from(err: crate::error::GetVaultLockError) -> Self {
match err.kind {
crate::error::GetVaultLockErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::GetVaultLockErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::GetVaultLockErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetVaultLockErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::GetVaultLockErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetVaultNotificationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetVaultNotificationsError, 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::GetVaultNotificationsError> for Error {
fn from(err: crate::error::GetVaultNotificationsError) -> Self {
match err.kind {
crate::error::GetVaultNotificationsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::GetVaultNotificationsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::GetVaultNotificationsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetVaultNotificationsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::GetVaultNotificationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::InitiateJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::InitiateJobError, 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::InitiateJobError> for Error {
fn from(err: crate::error::InitiateJobError) -> Self {
match err.kind {
crate::error::InitiateJobErrorKind::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::error::InitiateJobErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::InitiateJobErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::InitiateJobErrorKind::PolicyEnforcedException(inner) => {
Error::PolicyEnforcedException(inner)
}
crate::error::InitiateJobErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::InitiateJobErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::InitiateJobErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::InitiateMultipartUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::InitiateMultipartUploadError, 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::InitiateMultipartUploadError> for Error {
fn from(err: crate::error::InitiateMultipartUploadError) -> Self {
match err.kind {
crate::error::InitiateMultipartUploadErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::InitiateMultipartUploadErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::InitiateMultipartUploadErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::InitiateMultipartUploadErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::InitiateMultipartUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::InitiateVaultLockError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::InitiateVaultLockError, 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::InitiateVaultLockError> for Error {
fn from(err: crate::error::InitiateVaultLockError) -> Self {
match err.kind {
crate::error::InitiateVaultLockErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::InitiateVaultLockErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::InitiateVaultLockErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::InitiateVaultLockErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::InitiateVaultLockErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListJobsError, 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::ListJobsError> for Error {
fn from(err: crate::error::ListJobsError) -> Self {
match err.kind {
crate::error::ListJobsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::ListJobsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::ListJobsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListJobsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListJobsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListMultipartUploadsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListMultipartUploadsError, 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::ListMultipartUploadsError> for Error {
fn from(err: crate::error::ListMultipartUploadsError) -> Self {
match err.kind {
crate::error::ListMultipartUploadsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::ListMultipartUploadsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::ListMultipartUploadsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListMultipartUploadsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListMultipartUploadsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListPartsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListPartsError, 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::ListPartsError> for Error {
fn from(err: crate::error::ListPartsError) -> Self {
match err.kind {
crate::error::ListPartsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::ListPartsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::ListPartsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListPartsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListPartsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListProvisionedCapacityError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListProvisionedCapacityError, 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::ListProvisionedCapacityError> for Error {
fn from(err: crate::error::ListProvisionedCapacityError) -> Self {
match err.kind {
crate::error::ListProvisionedCapacityErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::ListProvisionedCapacityErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::ListProvisionedCapacityErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListProvisionedCapacityErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListTagsForVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListTagsForVaultError, 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::ListTagsForVaultError> for Error {
fn from(err: crate::error::ListTagsForVaultError) -> Self {
match err.kind {
crate::error::ListTagsForVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::ListTagsForVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::ListTagsForVaultErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListTagsForVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListTagsForVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListVaultsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListVaultsError, 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::ListVaultsError> for Error {
fn from(err: crate::error::ListVaultsError) -> Self {
match err.kind {
crate::error::ListVaultsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::ListVaultsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::ListVaultsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListVaultsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::ListVaultsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PurchaseProvisionedCapacityError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PurchaseProvisionedCapacityError, 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::PurchaseProvisionedCapacityError> for Error {
fn from(err: crate::error::PurchaseProvisionedCapacityError) -> Self {
match err.kind {
crate::error::PurchaseProvisionedCapacityErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::PurchaseProvisionedCapacityErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::PurchaseProvisionedCapacityErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::PurchaseProvisionedCapacityErrorKind::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::error::PurchaseProvisionedCapacityErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::RemoveTagsFromVaultError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::RemoveTagsFromVaultError, 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::RemoveTagsFromVaultError> for Error {
fn from(err: crate::error::RemoveTagsFromVaultError) -> Self {
match err.kind {
crate::error::RemoveTagsFromVaultErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::RemoveTagsFromVaultErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::RemoveTagsFromVaultErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::RemoveTagsFromVaultErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::RemoveTagsFromVaultErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SetDataRetrievalPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::SetDataRetrievalPolicyError, 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::SetDataRetrievalPolicyError> for Error {
fn from(err: crate::error::SetDataRetrievalPolicyError) -> Self {
match err.kind {
crate::error::SetDataRetrievalPolicyErrorKind::InvalidParameterValueException(
inner,
) => Error::InvalidParameterValueException(inner),
crate::error::SetDataRetrievalPolicyErrorKind::MissingParameterValueException(
inner,
) => Error::MissingParameterValueException(inner),
crate::error::SetDataRetrievalPolicyErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::SetDataRetrievalPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SetVaultAccessPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::SetVaultAccessPolicyError, 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::SetVaultAccessPolicyError> for Error {
fn from(err: crate::error::SetVaultAccessPolicyError) -> Self {
match err.kind {
crate::error::SetVaultAccessPolicyErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::SetVaultAccessPolicyErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::SetVaultAccessPolicyErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::SetVaultAccessPolicyErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::SetVaultAccessPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SetVaultNotificationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::SetVaultNotificationsError, 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::SetVaultNotificationsError> for Error {
fn from(err: crate::error::SetVaultNotificationsError) -> Self {
match err.kind {
crate::error::SetVaultNotificationsErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::SetVaultNotificationsErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::SetVaultNotificationsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::SetVaultNotificationsErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::SetVaultNotificationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UploadArchiveError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UploadArchiveError, 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::UploadArchiveError> for Error {
fn from(err: crate::error::UploadArchiveError) -> Self {
match err.kind {
crate::error::UploadArchiveErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::UploadArchiveErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::UploadArchiveErrorKind::RequestTimeoutException(inner) => {
Error::RequestTimeoutException(inner)
}
crate::error::UploadArchiveErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UploadArchiveErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::UploadArchiveErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UploadMultipartPartError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UploadMultipartPartError, 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::UploadMultipartPartError> for Error {
fn from(err: crate::error::UploadMultipartPartError) -> Self {
match err.kind {
crate::error::UploadMultipartPartErrorKind::InvalidParameterValueException(inner) => {
Error::InvalidParameterValueException(inner)
}
crate::error::UploadMultipartPartErrorKind::MissingParameterValueException(inner) => {
Error::MissingParameterValueException(inner)
}
crate::error::UploadMultipartPartErrorKind::RequestTimeoutException(inner) => {
Error::RequestTimeoutException(inner)
}
crate::error::UploadMultipartPartErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UploadMultipartPartErrorKind::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::error::UploadMultipartPartErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}