#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
#[allow(missing_docs)] AccessDeniedException(crate::types::error::AccessDeniedException),
DataAlreadyExistsException(crate::types::error::DataAlreadyExistsException),
IllegalArgumentException(crate::types::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::types::error::KmsInvalidKeyUsageException),
NotReadableInputStreamException(crate::types::error::NotReadableInputStreamException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
RetryableException(crate::types::error::RetryableException),
ServiceInternalException(crate::types::error::ServiceInternalException),
ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
ThrottlingException(crate::types::error::ThrottlingException),
Unhandled(::aws_smithy_types::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::DataAlreadyExistsException(inner) => inner.fmt(f),
Error::IllegalArgumentException(inner) => inner.fmt(f),
Error::KmsInvalidKeyUsageException(inner) => inner.fmt(f),
Error::NotReadableInputStreamException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::RetryableException(inner) => inner.fmt(f),
Error::ServiceInternalException(inner) => inner.fmt(f),
Error::ServiceUnavailableException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::delete_object::DeleteObjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::delete_object::DeleteObjectError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::delete_object::DeleteObjectError> for Error {
fn from(err: crate::operation::delete_object::DeleteObjectError) -> Self {
match err {
crate::operation::delete_object::DeleteObjectError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_object::DeleteObjectError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::delete_object::DeleteObjectError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_object::DeleteObjectError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::delete_object::DeleteObjectError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::delete_object::DeleteObjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::delete_object::DeleteObjectError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_object::DeleteObjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_chunk::GetChunkError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::get_chunk::GetChunkError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_chunk::GetChunkError> for Error {
fn from(err: crate::operation::get_chunk::GetChunkError) -> Self {
match err {
crate::operation::get_chunk::GetChunkError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_chunk::GetChunkError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::get_chunk::GetChunkError::KmsInvalidKeyUsageException(inner) => Error::KmsInvalidKeyUsageException(inner),
crate::operation::get_chunk::GetChunkError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_chunk::GetChunkError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::get_chunk::GetChunkError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::get_chunk::GetChunkError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_chunk::GetChunkError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_object_metadata::GetObjectMetadataError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::get_object_metadata::GetObjectMetadataError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_object_metadata::GetObjectMetadataError> for Error {
fn from(err: crate::operation::get_object_metadata::GetObjectMetadataError) -> Self {
match err {
crate::operation::get_object_metadata::GetObjectMetadataError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_object_metadata::GetObjectMetadataError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::get_object_metadata::GetObjectMetadataError::KmsInvalidKeyUsageException(inner) => {
Error::KmsInvalidKeyUsageException(inner)
}
crate::operation::get_object_metadata::GetObjectMetadataError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_object_metadata::GetObjectMetadataError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::get_object_metadata::GetObjectMetadataError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::get_object_metadata::GetObjectMetadataError::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::operation::get_object_metadata::GetObjectMetadataError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_object_metadata::GetObjectMetadataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_chunks::ListChunksError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_chunks::ListChunksError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_chunks::ListChunksError> for Error {
fn from(err: crate::operation::list_chunks::ListChunksError) -> Self {
match err {
crate::operation::list_chunks::ListChunksError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_chunks::ListChunksError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::list_chunks::ListChunksError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_chunks::ListChunksError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::list_chunks::ListChunksError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::list_chunks::ListChunksError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::list_chunks::ListChunksError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_objects::ListObjectsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_objects::ListObjectsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_objects::ListObjectsError> for Error {
fn from(err: crate::operation::list_objects::ListObjectsError) -> Self {
match err {
crate::operation::list_objects::ListObjectsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_objects::ListObjectsError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::list_objects::ListObjectsError::KmsInvalidKeyUsageException(inner) => Error::KmsInvalidKeyUsageException(inner),
crate::operation::list_objects::ListObjectsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_objects::ListObjectsError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::list_objects::ListObjectsError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::list_objects::ListObjectsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::list_objects::ListObjectsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_objects::ListObjectsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::notify_object_complete::NotifyObjectCompleteError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::notify_object_complete::NotifyObjectCompleteError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::notify_object_complete::NotifyObjectCompleteError> for Error {
fn from(err: crate::operation::notify_object_complete::NotifyObjectCompleteError) -> Self {
match err {
crate::operation::notify_object_complete::NotifyObjectCompleteError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::notify_object_complete::NotifyObjectCompleteError::IllegalArgumentException(inner) => {
Error::IllegalArgumentException(inner)
}
crate::operation::notify_object_complete::NotifyObjectCompleteError::KmsInvalidKeyUsageException(inner) => {
Error::KmsInvalidKeyUsageException(inner)
}
crate::operation::notify_object_complete::NotifyObjectCompleteError::NotReadableInputStreamException(inner) => {
Error::NotReadableInputStreamException(inner)
}
crate::operation::notify_object_complete::NotifyObjectCompleteError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::notify_object_complete::NotifyObjectCompleteError::ServiceInternalException(inner) => {
Error::ServiceInternalException(inner)
}
crate::operation::notify_object_complete::NotifyObjectCompleteError::ServiceUnavailableException(inner) => {
Error::ServiceUnavailableException(inner)
}
crate::operation::notify_object_complete::NotifyObjectCompleteError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::notify_object_complete::NotifyObjectCompleteError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::put_chunk::PutChunkError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::put_chunk::PutChunkError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::put_chunk::PutChunkError> for Error {
fn from(err: crate::operation::put_chunk::PutChunkError) -> Self {
match err {
crate::operation::put_chunk::PutChunkError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_chunk::PutChunkError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::put_chunk::PutChunkError::KmsInvalidKeyUsageException(inner) => Error::KmsInvalidKeyUsageException(inner),
crate::operation::put_chunk::PutChunkError::NotReadableInputStreamException(inner) => Error::NotReadableInputStreamException(inner),
crate::operation::put_chunk::PutChunkError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::put_chunk::PutChunkError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::put_chunk::PutChunkError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::put_chunk::PutChunkError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_chunk::PutChunkError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::put_object::PutObjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::put_object::PutObjectError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::put_object::PutObjectError> for Error {
fn from(err: crate::operation::put_object::PutObjectError) -> Self {
match err {
crate::operation::put_object::PutObjectError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_object::PutObjectError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::put_object::PutObjectError::KmsInvalidKeyUsageException(inner) => Error::KmsInvalidKeyUsageException(inner),
crate::operation::put_object::PutObjectError::NotReadableInputStreamException(inner) => Error::NotReadableInputStreamException(inner),
crate::operation::put_object::PutObjectError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::put_object::PutObjectError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::put_object::PutObjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::put_object::PutObjectError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_object::PutObjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::start_object::StartObjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::start_object::StartObjectError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::start_object::StartObjectError> for Error {
fn from(err: crate::operation::start_object::StartObjectError) -> Self {
match err {
crate::operation::start_object::StartObjectError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_object::StartObjectError::DataAlreadyExistsException(inner) => Error::DataAlreadyExistsException(inner),
crate::operation::start_object::StartObjectError::IllegalArgumentException(inner) => Error::IllegalArgumentException(inner),
crate::operation::start_object::StartObjectError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_object::StartObjectError::RetryableException(inner) => Error::RetryableException(inner),
crate::operation::start_object::StartObjectError::ServiceInternalException(inner) => Error::ServiceInternalException(inner),
crate::operation::start_object::StartObjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::start_object::StartObjectError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_object::StartObjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::AccessDeniedException(inner) => inner.source(),
Error::DataAlreadyExistsException(inner) => inner.source(),
Error::IllegalArgumentException(inner) => inner.source(),
Error::KmsInvalidKeyUsageException(inner) => inner.source(),
Error::NotReadableInputStreamException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::RetryableException(inner) => inner.source(),
Error::ServiceInternalException(inner) => inner.source(),
Error::ServiceUnavailableException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::Unhandled(inner) => inner.source(),
}
}
}
impl ::aws_http::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::AccessDeniedException(e) => e.request_id(),
Self::DataAlreadyExistsException(e) => e.request_id(),
Self::IllegalArgumentException(e) => e.request_id(),
Self::KmsInvalidKeyUsageException(e) => e.request_id(),
Self::NotReadableInputStreamException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::RetryableException(e) => e.request_id(),
Self::ServiceInternalException(e) => e.request_id(),
Self::ServiceUnavailableException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}