#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
#[allow(missing_docs)] InvalidTagException(crate::error::InvalidTagException),
LimitExceededException(crate::error::LimitExceededException),
PredictorNotMountedException(crate::error::PredictorNotMountedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
#[allow(missing_docs)] TagLimitExceededException(crate::error::TagLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::IdempotentParameterMismatchException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::InvalidInputException(inner) => inner.fmt(f),
Error::InvalidTagException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::PredictorNotMountedException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::TagLimitExceededException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AddTagsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::AddTagsError, 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::AddTagsError> for Error {
fn from(err: crate::error::AddTagsError) -> Self {
match err.kind {
crate::error::AddTagsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::AddTagsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::AddTagsErrorKind::InvalidTagException(inner) => {
Error::InvalidTagException(inner)
}
crate::error::AddTagsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AddTagsErrorKind::TagLimitExceededException(inner) => {
Error::TagLimitExceededException(inner)
}
crate::error::AddTagsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateBatchPredictionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateBatchPredictionError, 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::CreateBatchPredictionError> for Error {
fn from(err: crate::error::CreateBatchPredictionError) -> Self {
match err.kind {
crate::error::CreateBatchPredictionErrorKind::IdempotentParameterMismatchException(
inner,
) => Error::IdempotentParameterMismatchException(inner),
crate::error::CreateBatchPredictionErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateBatchPredictionErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::CreateBatchPredictionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromRDSError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromRDSError, 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::CreateDataSourceFromRDSError> for Error {
fn from(err: crate::error::CreateDataSourceFromRDSError) -> Self {
match err.kind {
crate::error::CreateDataSourceFromRDSErrorKind::IdempotentParameterMismatchException(inner) => Error::IdempotentParameterMismatchException(inner),
crate::error::CreateDataSourceFromRDSErrorKind::InternalServerException(inner) => Error::InternalServerException(inner),
crate::error::CreateDataSourceFromRDSErrorKind::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::error::CreateDataSourceFromRDSErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromRedshiftError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromRedshiftError, 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::CreateDataSourceFromRedshiftError> for Error {
fn from(err: crate::error::CreateDataSourceFromRedshiftError) -> Self {
match err.kind {
crate::error::CreateDataSourceFromRedshiftErrorKind::IdempotentParameterMismatchException(inner) => Error::IdempotentParameterMismatchException(inner),
crate::error::CreateDataSourceFromRedshiftErrorKind::InternalServerException(inner) => Error::InternalServerException(inner),
crate::error::CreateDataSourceFromRedshiftErrorKind::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::error::CreateDataSourceFromRedshiftErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromS3Error, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateDataSourceFromS3Error, 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::CreateDataSourceFromS3Error> for Error {
fn from(err: crate::error::CreateDataSourceFromS3Error) -> Self {
match err.kind {
crate::error::CreateDataSourceFromS3ErrorKind::IdempotentParameterMismatchException(
inner,
) => Error::IdempotentParameterMismatchException(inner),
crate::error::CreateDataSourceFromS3ErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateDataSourceFromS3ErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::CreateDataSourceFromS3ErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateEvaluationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateEvaluationError, 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::CreateEvaluationError> for Error {
fn from(err: crate::error::CreateEvaluationError) -> Self {
match err.kind {
crate::error::CreateEvaluationErrorKind::IdempotentParameterMismatchException(
inner,
) => Error::IdempotentParameterMismatchException(inner),
crate::error::CreateEvaluationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateEvaluationErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::CreateEvaluationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateMLModelError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateMLModelError, 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::CreateMLModelError> for Error {
fn from(err: crate::error::CreateMLModelError) -> Self {
match err.kind {
crate::error::CreateMLModelErrorKind::IdempotentParameterMismatchException(inner) => {
Error::IdempotentParameterMismatchException(inner)
}
crate::error::CreateMLModelErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateMLModelErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::CreateMLModelErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateRealtimeEndpointError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateRealtimeEndpointError, 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::CreateRealtimeEndpointError> for Error {
fn from(err: crate::error::CreateRealtimeEndpointError) -> Self {
match err.kind {
crate::error::CreateRealtimeEndpointErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateRealtimeEndpointErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::CreateRealtimeEndpointErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateRealtimeEndpointErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteBatchPredictionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteBatchPredictionError, 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::DeleteBatchPredictionError> for Error {
fn from(err: crate::error::DeleteBatchPredictionError) -> Self {
match err.kind {
crate::error::DeleteBatchPredictionErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteBatchPredictionErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteBatchPredictionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteBatchPredictionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteDataSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteDataSourceError, 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::DeleteDataSourceError> for Error {
fn from(err: crate::error::DeleteDataSourceError) -> Self {
match err.kind {
crate::error::DeleteDataSourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteDataSourceErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteDataSourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteDataSourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteEvaluationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteEvaluationError, 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::DeleteEvaluationError> for Error {
fn from(err: crate::error::DeleteEvaluationError) -> Self {
match err.kind {
crate::error::DeleteEvaluationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteEvaluationErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteEvaluationErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteEvaluationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteMLModelError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteMLModelError, 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::DeleteMLModelError> for Error {
fn from(err: crate::error::DeleteMLModelError) -> Self {
match err.kind {
crate::error::DeleteMLModelErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteMLModelErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteMLModelErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteMLModelErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteRealtimeEndpointError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteRealtimeEndpointError, 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::DeleteRealtimeEndpointError> for Error {
fn from(err: crate::error::DeleteRealtimeEndpointError) -> Self {
match err.kind {
crate::error::DeleteRealtimeEndpointErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteRealtimeEndpointErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteRealtimeEndpointErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteRealtimeEndpointErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteTagsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteTagsError, 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::DeleteTagsError> for Error {
fn from(err: crate::error::DeleteTagsError) -> Self {
match err.kind {
crate::error::DeleteTagsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteTagsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DeleteTagsErrorKind::InvalidTagException(inner) => {
Error::InvalidTagException(inner)
}
crate::error::DeleteTagsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteTagsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeBatchPredictionsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeBatchPredictionsError, 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::DescribeBatchPredictionsError> for Error {
fn from(err: crate::error::DescribeBatchPredictionsError) -> Self {
match err.kind {
crate::error::DescribeBatchPredictionsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeBatchPredictionsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DescribeBatchPredictionsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeDataSourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeDataSourcesError, 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::DescribeDataSourcesError> for Error {
fn from(err: crate::error::DescribeDataSourcesError) -> Self {
match err.kind {
crate::error::DescribeDataSourcesErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeDataSourcesErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DescribeDataSourcesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEvaluationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEvaluationsError, 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::DescribeEvaluationsError> for Error {
fn from(err: crate::error::DescribeEvaluationsError) -> Self {
match err.kind {
crate::error::DescribeEvaluationsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeEvaluationsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DescribeEvaluationsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeMLModelsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeMLModelsError, 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::DescribeMLModelsError> for Error {
fn from(err: crate::error::DescribeMLModelsError) -> Self {
match err.kind {
crate::error::DescribeMLModelsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeMLModelsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DescribeMLModelsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeTagsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeTagsError, 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::DescribeTagsError> for Error {
fn from(err: crate::error::DescribeTagsError) -> Self {
match err.kind {
crate::error::DescribeTagsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeTagsErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::DescribeTagsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeTagsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetBatchPredictionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetBatchPredictionError, 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::GetBatchPredictionError> for Error {
fn from(err: crate::error::GetBatchPredictionError) -> Self {
match err.kind {
crate::error::GetBatchPredictionErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetBatchPredictionErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::GetBatchPredictionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetBatchPredictionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetDataSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetDataSourceError, 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::GetDataSourceError> for Error {
fn from(err: crate::error::GetDataSourceError) -> Self {
match err.kind {
crate::error::GetDataSourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetDataSourceErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::GetDataSourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetDataSourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetEvaluationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetEvaluationError, 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::GetEvaluationError> for Error {
fn from(err: crate::error::GetEvaluationError) -> Self {
match err.kind {
crate::error::GetEvaluationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetEvaluationErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::GetEvaluationErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetEvaluationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetMLModelError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetMLModelError, 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::GetMLModelError> for Error {
fn from(err: crate::error::GetMLModelError) -> Self {
match err.kind {
crate::error::GetMLModelErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetMLModelErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::GetMLModelErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetMLModelErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PredictError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::PredictError, 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::PredictError> for Error {
fn from(err: crate::error::PredictError) -> Self {
match err.kind {
crate::error::PredictErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::PredictErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::PredictErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::PredictErrorKind::PredictorNotMountedException(inner) => {
Error::PredictorNotMountedException(inner)
}
crate::error::PredictErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::PredictErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateBatchPredictionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateBatchPredictionError, 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::UpdateBatchPredictionError> for Error {
fn from(err: crate::error::UpdateBatchPredictionError) -> Self {
match err.kind {
crate::error::UpdateBatchPredictionErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateBatchPredictionErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::UpdateBatchPredictionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateBatchPredictionErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateDataSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateDataSourceError, 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::UpdateDataSourceError> for Error {
fn from(err: crate::error::UpdateDataSourceError) -> Self {
match err.kind {
crate::error::UpdateDataSourceErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateDataSourceErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::UpdateDataSourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateDataSourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateEvaluationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateEvaluationError, 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::UpdateEvaluationError> for Error {
fn from(err: crate::error::UpdateEvaluationError) -> Self {
match err.kind {
crate::error::UpdateEvaluationErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateEvaluationErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::UpdateEvaluationErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateEvaluationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateMLModelError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdateMLModelError, 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::UpdateMLModelError> for Error {
fn from(err: crate::error::UpdateMLModelError) -> Self {
match err.kind {
crate::error::UpdateMLModelErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateMLModelErrorKind::InvalidInputException(inner) => {
Error::InvalidInputException(inner)
}
crate::error::UpdateMLModelErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateMLModelErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}