#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
EmptyUploadException(crate::error::EmptyUploadException),
ImageAlreadyExistsException(crate::error::ImageAlreadyExistsException),
ImageDigestDoesNotMatchException(crate::error::ImageDigestDoesNotMatchException),
ImageNotFoundException(crate::error::ImageNotFoundException),
ImageTagAlreadyExistsException(crate::error::ImageTagAlreadyExistsException),
InvalidLayerException(crate::error::InvalidLayerException),
InvalidLayerPartException(crate::error::InvalidLayerPartException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidTagParameterException(crate::error::InvalidTagParameterException),
KmsException(crate::error::KmsException),
LayerAlreadyExistsException(crate::error::LayerAlreadyExistsException),
LayerInaccessibleException(crate::error::LayerInaccessibleException),
LayerPartTooSmallException(crate::error::LayerPartTooSmallException),
LayersNotFoundException(crate::error::LayersNotFoundException),
LifecyclePolicyNotFoundException(crate::error::LifecyclePolicyNotFoundException),
LifecyclePolicyPreviewInProgressException(
crate::error::LifecyclePolicyPreviewInProgressException,
),
LifecyclePolicyPreviewNotFoundException(crate::error::LifecyclePolicyPreviewNotFoundException),
LimitExceededException(crate::error::LimitExceededException),
PullThroughCacheRuleAlreadyExistsException(
crate::error::PullThroughCacheRuleAlreadyExistsException,
),
PullThroughCacheRuleNotFoundException(crate::error::PullThroughCacheRuleNotFoundException),
ReferencedImagesNotFoundException(crate::error::ReferencedImagesNotFoundException),
RegistryPolicyNotFoundException(crate::error::RegistryPolicyNotFoundException),
RepositoryAlreadyExistsException(crate::error::RepositoryAlreadyExistsException),
RepositoryNotEmptyException(crate::error::RepositoryNotEmptyException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
RepositoryPolicyNotFoundException(crate::error::RepositoryPolicyNotFoundException),
ScanNotFoundException(crate::error::ScanNotFoundException),
ServerException(crate::error::ServerException),
TooManyTagsException(crate::error::TooManyTagsException),
UnsupportedImageTypeException(crate::error::UnsupportedImageTypeException),
UnsupportedUpstreamRegistryException(crate::error::UnsupportedUpstreamRegistryException),
UploadNotFoundException(crate::error::UploadNotFoundException),
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::EmptyUploadException(inner) => inner.fmt(f),
Error::ImageAlreadyExistsException(inner) => inner.fmt(f),
Error::ImageDigestDoesNotMatchException(inner) => inner.fmt(f),
Error::ImageNotFoundException(inner) => inner.fmt(f),
Error::ImageTagAlreadyExistsException(inner) => inner.fmt(f),
Error::InvalidLayerException(inner) => inner.fmt(f),
Error::InvalidLayerPartException(inner) => inner.fmt(f),
Error::InvalidParameterException(inner) => inner.fmt(f),
Error::InvalidTagParameterException(inner) => inner.fmt(f),
Error::KmsException(inner) => inner.fmt(f),
Error::LayerAlreadyExistsException(inner) => inner.fmt(f),
Error::LayerInaccessibleException(inner) => inner.fmt(f),
Error::LayerPartTooSmallException(inner) => inner.fmt(f),
Error::LayersNotFoundException(inner) => inner.fmt(f),
Error::LifecyclePolicyNotFoundException(inner) => inner.fmt(f),
Error::LifecyclePolicyPreviewInProgressException(inner) => inner.fmt(f),
Error::LifecyclePolicyPreviewNotFoundException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::PullThroughCacheRuleAlreadyExistsException(inner) => inner.fmt(f),
Error::PullThroughCacheRuleNotFoundException(inner) => inner.fmt(f),
Error::ReferencedImagesNotFoundException(inner) => inner.fmt(f),
Error::RegistryPolicyNotFoundException(inner) => inner.fmt(f),
Error::RepositoryAlreadyExistsException(inner) => inner.fmt(f),
Error::RepositoryNotEmptyException(inner) => inner.fmt(f),
Error::RepositoryNotFoundException(inner) => inner.fmt(f),
Error::RepositoryPolicyNotFoundException(inner) => inner.fmt(f),
Error::ScanNotFoundException(inner) => inner.fmt(f),
Error::ServerException(inner) => inner.fmt(f),
Error::TooManyTagsException(inner) => inner.fmt(f),
Error::UnsupportedImageTypeException(inner) => inner.fmt(f),
Error::UnsupportedUpstreamRegistryException(inner) => inner.fmt(f),
Error::UploadNotFoundException(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::BatchCheckLayerAvailabilityError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::BatchCheckLayerAvailabilityError, 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::BatchCheckLayerAvailabilityError> for Error {
fn from(err: crate::error::BatchCheckLayerAvailabilityError) -> Self {
match err.kind {
crate::error::BatchCheckLayerAvailabilityErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::BatchCheckLayerAvailabilityErrorKind::RepositoryNotFoundException(
inner,
) => Error::RepositoryNotFoundException(inner),
crate::error::BatchCheckLayerAvailabilityErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::BatchCheckLayerAvailabilityErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::BatchDeleteImageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::BatchDeleteImageError, 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::BatchDeleteImageError> for Error {
fn from(err: crate::error::BatchDeleteImageError) -> Self {
match err.kind {
crate::error::BatchDeleteImageErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::BatchDeleteImageErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::BatchDeleteImageErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::BatchDeleteImageErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::BatchGetImageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::BatchGetImageError, 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::BatchGetImageError> for Error {
fn from(err: crate::error::BatchGetImageError) -> Self {
match err.kind {
crate::error::BatchGetImageErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::BatchGetImageErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::BatchGetImageErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::BatchGetImageErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::BatchGetRepositoryScanningConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::BatchGetRepositoryScanningConfigurationError,
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::BatchGetRepositoryScanningConfigurationError> for Error {
fn from(err: crate::error::BatchGetRepositoryScanningConfigurationError) -> Self {
match err.kind {
crate::error::BatchGetRepositoryScanningConfigurationErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::BatchGetRepositoryScanningConfigurationErrorKind::RepositoryNotFoundException(inner) => Error::RepositoryNotFoundException(inner),
crate::error::BatchGetRepositoryScanningConfigurationErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::BatchGetRepositoryScanningConfigurationErrorKind::ValidationException(inner) => Error::ValidationException(inner),
crate::error::BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CompleteLayerUploadError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CompleteLayerUploadError, 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::CompleteLayerUploadError> for Error {
fn from(err: crate::error::CompleteLayerUploadError) -> Self {
match err.kind {
crate::error::CompleteLayerUploadErrorKind::EmptyUploadException(inner) => {
Error::EmptyUploadException(inner)
}
crate::error::CompleteLayerUploadErrorKind::InvalidLayerException(inner) => {
Error::InvalidLayerException(inner)
}
crate::error::CompleteLayerUploadErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::CompleteLayerUploadErrorKind::KmsException(inner) => {
Error::KmsException(inner)
}
crate::error::CompleteLayerUploadErrorKind::LayerAlreadyExistsException(inner) => {
Error::LayerAlreadyExistsException(inner)
}
crate::error::CompleteLayerUploadErrorKind::LayerPartTooSmallException(inner) => {
Error::LayerPartTooSmallException(inner)
}
crate::error::CompleteLayerUploadErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::CompleteLayerUploadErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::CompleteLayerUploadErrorKind::UploadNotFoundException(inner) => {
Error::UploadNotFoundException(inner)
}
crate::error::CompleteLayerUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreatePullThroughCacheRuleError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreatePullThroughCacheRuleError, 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::CreatePullThroughCacheRuleError> for Error {
fn from(err: crate::error::CreatePullThroughCacheRuleError) -> Self {
match err.kind {
crate::error::CreatePullThroughCacheRuleErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::PullThroughCacheRuleAlreadyExistsException(inner) => Error::PullThroughCacheRuleAlreadyExistsException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::UnsupportedUpstreamRegistryException(inner) => Error::UnsupportedUpstreamRegistryException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::ValidationException(inner) => Error::ValidationException(inner),
crate::error::CreatePullThroughCacheRuleErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateRepositoryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateRepositoryError, 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::CreateRepositoryError> for Error {
fn from(err: crate::error::CreateRepositoryError) -> Self {
match err.kind {
crate::error::CreateRepositoryErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::CreateRepositoryErrorKind::InvalidTagParameterException(inner) => {
Error::InvalidTagParameterException(inner)
}
crate::error::CreateRepositoryErrorKind::KmsException(inner) => {
Error::KmsException(inner)
}
crate::error::CreateRepositoryErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::CreateRepositoryErrorKind::RepositoryAlreadyExistsException(inner) => {
Error::RepositoryAlreadyExistsException(inner)
}
crate::error::CreateRepositoryErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::CreateRepositoryErrorKind::TooManyTagsException(inner) => {
Error::TooManyTagsException(inner)
}
crate::error::CreateRepositoryErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteLifecyclePolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteLifecyclePolicyError, 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::DeleteLifecyclePolicyError> for Error {
fn from(err: crate::error::DeleteLifecyclePolicyError) -> Self {
match err.kind {
crate::error::DeleteLifecyclePolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DeleteLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(
inner,
) => Error::LifecyclePolicyNotFoundException(inner),
crate::error::DeleteLifecyclePolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::DeleteLifecyclePolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DeleteLifecyclePolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeletePullThroughCacheRuleError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeletePullThroughCacheRuleError, 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::DeletePullThroughCacheRuleError> for Error {
fn from(err: crate::error::DeletePullThroughCacheRuleError) -> Self {
match err.kind {
crate::error::DeletePullThroughCacheRuleErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::DeletePullThroughCacheRuleErrorKind::PullThroughCacheRuleNotFoundException(inner) => Error::PullThroughCacheRuleNotFoundException(inner),
crate::error::DeletePullThroughCacheRuleErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::DeletePullThroughCacheRuleErrorKind::ValidationException(inner) => Error::ValidationException(inner),
crate::error::DeletePullThroughCacheRuleErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteRegistryPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteRegistryPolicyError, 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::DeleteRegistryPolicyError> for Error {
fn from(err: crate::error::DeleteRegistryPolicyError) -> Self {
match err.kind {
crate::error::DeleteRegistryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DeleteRegistryPolicyErrorKind::RegistryPolicyNotFoundException(inner) => {
Error::RegistryPolicyNotFoundException(inner)
}
crate::error::DeleteRegistryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DeleteRegistryPolicyErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteRegistryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteRepositoryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteRepositoryError, 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::DeleteRepositoryError> for Error {
fn from(err: crate::error::DeleteRepositoryError) -> Self {
match err.kind {
crate::error::DeleteRepositoryErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DeleteRepositoryErrorKind::KmsException(inner) => {
Error::KmsException(inner)
}
crate::error::DeleteRepositoryErrorKind::RepositoryNotEmptyException(inner) => {
Error::RepositoryNotEmptyException(inner)
}
crate::error::DeleteRepositoryErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::DeleteRepositoryErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DeleteRepositoryErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteRepositoryPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteRepositoryPolicyError, 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::DeleteRepositoryPolicyError> for Error {
fn from(err: crate::error::DeleteRepositoryPolicyError) -> Self {
match err.kind {
crate::error::DeleteRepositoryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DeleteRepositoryPolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::DeleteRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(
inner,
) => Error::RepositoryPolicyNotFoundException(inner),
crate::error::DeleteRepositoryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DeleteRepositoryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::DescribeImageReplicationStatusError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeImageReplicationStatusError,
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::DescribeImageReplicationStatusError> for Error {
fn from(err: crate::error::DescribeImageReplicationStatusError) -> Self {
match err.kind {
crate::error::DescribeImageReplicationStatusErrorKind::ImageNotFoundException(
inner,
) => Error::ImageNotFoundException(inner),
crate::error::DescribeImageReplicationStatusErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::DescribeImageReplicationStatusErrorKind::RepositoryNotFoundException(
inner,
) => Error::RepositoryNotFoundException(inner),
crate::error::DescribeImageReplicationStatusErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DescribeImageReplicationStatusErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DescribeImageReplicationStatusErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeImagesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeImagesError, 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::DescribeImagesError> for Error {
fn from(err: crate::error::DescribeImagesError) -> Self {
match err.kind {
crate::error::DescribeImagesErrorKind::ImageNotFoundException(inner) => {
Error::ImageNotFoundException(inner)
}
crate::error::DescribeImagesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeImagesErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::DescribeImagesErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DescribeImagesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeImageScanFindingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeImageScanFindingsError, 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::DescribeImageScanFindingsError> for Error {
fn from(err: crate::error::DescribeImageScanFindingsError) -> Self {
match err.kind {
crate::error::DescribeImageScanFindingsErrorKind::ImageNotFoundException(inner) => {
Error::ImageNotFoundException(inner)
}
crate::error::DescribeImageScanFindingsErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeImageScanFindingsErrorKind::RepositoryNotFoundException(
inner,
) => Error::RepositoryNotFoundException(inner),
crate::error::DescribeImageScanFindingsErrorKind::ScanNotFoundException(inner) => {
Error::ScanNotFoundException(inner)
}
crate::error::DescribeImageScanFindingsErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DescribeImageScanFindingsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DescribeImageScanFindingsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribePullThroughCacheRulesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribePullThroughCacheRulesError, 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::DescribePullThroughCacheRulesError> for Error {
fn from(err: crate::error::DescribePullThroughCacheRulesError) -> Self {
match err.kind {
crate::error::DescribePullThroughCacheRulesErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::DescribePullThroughCacheRulesErrorKind::PullThroughCacheRuleNotFoundException(inner) => Error::PullThroughCacheRuleNotFoundException(inner),
crate::error::DescribePullThroughCacheRulesErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::DescribePullThroughCacheRulesErrorKind::ValidationException(inner) => Error::ValidationException(inner),
crate::error::DescribePullThroughCacheRulesErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeRegistryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeRegistryError, 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::DescribeRegistryError> for Error {
fn from(err: crate::error::DescribeRegistryError) -> Self {
match err.kind {
crate::error::DescribeRegistryErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeRegistryErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DescribeRegistryErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DescribeRegistryErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeRepositoriesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeRepositoriesError, 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::DescribeRepositoriesError> for Error {
fn from(err: crate::error::DescribeRepositoriesError) -> Self {
match err.kind {
crate::error::DescribeRepositoriesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeRepositoriesErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::DescribeRepositoriesErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::DescribeRepositoriesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetAuthorizationTokenError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetAuthorizationTokenError, 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::GetAuthorizationTokenError> for Error {
fn from(err: crate::error::GetAuthorizationTokenError) -> Self {
match err.kind {
crate::error::GetAuthorizationTokenErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetAuthorizationTokenErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetAuthorizationTokenErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetDownloadUrlForLayerError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetDownloadUrlForLayerError, 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::GetDownloadUrlForLayerError> for Error {
fn from(err: crate::error::GetDownloadUrlForLayerError) -> Self {
match err.kind {
crate::error::GetDownloadUrlForLayerErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetDownloadUrlForLayerErrorKind::LayerInaccessibleException(inner) => {
Error::LayerInaccessibleException(inner)
}
crate::error::GetDownloadUrlForLayerErrorKind::LayersNotFoundException(inner) => {
Error::LayersNotFoundException(inner)
}
crate::error::GetDownloadUrlForLayerErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::GetDownloadUrlForLayerErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetDownloadUrlForLayerErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetLifecyclePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetLifecyclePolicyError, 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::GetLifecyclePolicyError> for Error {
fn from(err: crate::error::GetLifecyclePolicyError) -> Self {
match err.kind {
crate::error::GetLifecyclePolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(inner) => {
Error::LifecyclePolicyNotFoundException(inner)
}
crate::error::GetLifecyclePolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::GetLifecyclePolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetLifecyclePolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetLifecyclePolicyPreviewError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetLifecyclePolicyPreviewError, 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::GetLifecyclePolicyPreviewError> for Error {
fn from(err: crate::error::GetLifecyclePolicyPreviewError) -> Self {
match err.kind {
crate::error::GetLifecyclePolicyPreviewErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::GetLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewNotFoundException(inner) => Error::LifecyclePolicyPreviewNotFoundException(inner),
crate::error::GetLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(inner) => Error::RepositoryNotFoundException(inner),
crate::error::GetLifecyclePolicyPreviewErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::GetLifecyclePolicyPreviewErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetRegistryPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetRegistryPolicyError, 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::GetRegistryPolicyError> for Error {
fn from(err: crate::error::GetRegistryPolicyError) -> Self {
match err.kind {
crate::error::GetRegistryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetRegistryPolicyErrorKind::RegistryPolicyNotFoundException(inner) => {
Error::RegistryPolicyNotFoundException(inner)
}
crate::error::GetRegistryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetRegistryPolicyErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetRegistryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::GetRegistryScanningConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::GetRegistryScanningConfigurationError,
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::GetRegistryScanningConfigurationError> for Error {
fn from(err: crate::error::GetRegistryScanningConfigurationError) -> Self {
match err.kind {
crate::error::GetRegistryScanningConfigurationErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::GetRegistryScanningConfigurationErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetRegistryScanningConfigurationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetRegistryScanningConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetRepositoryPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetRepositoryPolicyError, 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::GetRepositoryPolicyError> for Error {
fn from(err: crate::error::GetRepositoryPolicyError) -> Self {
match err.kind {
crate::error::GetRepositoryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::GetRepositoryPolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::GetRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(
inner,
) => Error::RepositoryPolicyNotFoundException(inner),
crate::error::GetRepositoryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::GetRepositoryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::InitiateLayerUploadError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::InitiateLayerUploadError, 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::InitiateLayerUploadError> for Error {
fn from(err: crate::error::InitiateLayerUploadError) -> Self {
match err.kind {
crate::error::InitiateLayerUploadErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::InitiateLayerUploadErrorKind::KmsException(inner) => {
Error::KmsException(inner)
}
crate::error::InitiateLayerUploadErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::InitiateLayerUploadErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::InitiateLayerUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListImagesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListImagesError, 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::ListImagesError> for Error {
fn from(err: crate::error::ListImagesError) -> Self {
match err.kind {
crate::error::ListImagesErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::ListImagesErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::ListImagesErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::ListImagesErrorKind::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::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::ListTagsForResourceErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::ListTagsForResourceErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::ListTagsForResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutImageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::PutImageError, 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::PutImageError> for Error {
fn from(err: crate::error::PutImageError) -> Self {
match err.kind {
crate::error::PutImageErrorKind::ImageAlreadyExistsException(inner) => {
Error::ImageAlreadyExistsException(inner)
}
crate::error::PutImageErrorKind::ImageDigestDoesNotMatchException(inner) => {
Error::ImageDigestDoesNotMatchException(inner)
}
crate::error::PutImageErrorKind::ImageTagAlreadyExistsException(inner) => {
Error::ImageTagAlreadyExistsException(inner)
}
crate::error::PutImageErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::PutImageErrorKind::KmsException(inner) => Error::KmsException(inner),
crate::error::PutImageErrorKind::LayersNotFoundException(inner) => {
Error::LayersNotFoundException(inner)
}
crate::error::PutImageErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::PutImageErrorKind::ReferencedImagesNotFoundException(inner) => {
Error::ReferencedImagesNotFoundException(inner)
}
crate::error::PutImageErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::PutImageErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutImageErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutImageScanningConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutImageScanningConfigurationError, 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::PutImageScanningConfigurationError> for Error {
fn from(err: crate::error::PutImageScanningConfigurationError) -> Self {
match err.kind {
crate::error::PutImageScanningConfigurationErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::PutImageScanningConfigurationErrorKind::RepositoryNotFoundException(
inner,
) => Error::RepositoryNotFoundException(inner),
crate::error::PutImageScanningConfigurationErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutImageScanningConfigurationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::PutImageScanningConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutImageTagMutabilityError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutImageTagMutabilityError, 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::PutImageTagMutabilityError> for Error {
fn from(err: crate::error::PutImageTagMutabilityError) -> Self {
match err.kind {
crate::error::PutImageTagMutabilityErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::PutImageTagMutabilityErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::PutImageTagMutabilityErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutImageTagMutabilityErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutLifecyclePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutLifecyclePolicyError, 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::PutLifecyclePolicyError> for Error {
fn from(err: crate::error::PutLifecyclePolicyError) -> Self {
match err.kind {
crate::error::PutLifecyclePolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::PutLifecyclePolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::PutLifecyclePolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutLifecyclePolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutRegistryPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutRegistryPolicyError, 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::PutRegistryPolicyError> for Error {
fn from(err: crate::error::PutRegistryPolicyError) -> Self {
match err.kind {
crate::error::PutRegistryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::PutRegistryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutRegistryPolicyErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::PutRegistryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::PutRegistryScanningConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::PutRegistryScanningConfigurationError,
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::PutRegistryScanningConfigurationError> for Error {
fn from(err: crate::error::PutRegistryScanningConfigurationError) -> Self {
match err.kind {
crate::error::PutRegistryScanningConfigurationErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::PutRegistryScanningConfigurationErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutRegistryScanningConfigurationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::PutRegistryScanningConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PutReplicationConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PutReplicationConfigurationError, 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::PutReplicationConfigurationError> for Error {
fn from(err: crate::error::PutReplicationConfigurationError) -> Self {
match err.kind {
crate::error::PutReplicationConfigurationErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::PutReplicationConfigurationErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::PutReplicationConfigurationErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::PutReplicationConfigurationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SetRepositoryPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::SetRepositoryPolicyError, 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::SetRepositoryPolicyError> for Error {
fn from(err: crate::error::SetRepositoryPolicyError) -> Self {
match err.kind {
crate::error::SetRepositoryPolicyErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::SetRepositoryPolicyErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::SetRepositoryPolicyErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::SetRepositoryPolicyErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartImageScanError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::StartImageScanError, 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::StartImageScanError> for Error {
fn from(err: crate::error::StartImageScanError) -> Self {
match err.kind {
crate::error::StartImageScanErrorKind::ImageNotFoundException(inner) => {
Error::ImageNotFoundException(inner)
}
crate::error::StartImageScanErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::StartImageScanErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::StartImageScanErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::StartImageScanErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::StartImageScanErrorKind::UnsupportedImageTypeException(inner) => {
Error::UnsupportedImageTypeException(inner)
}
crate::error::StartImageScanErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::StartImageScanErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartLifecyclePolicyPreviewError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::StartLifecyclePolicyPreviewError, 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::StartLifecyclePolicyPreviewError> for Error {
fn from(err: crate::error::StartLifecyclePolicyPreviewError) -> Self {
match err.kind {
crate::error::StartLifecyclePolicyPreviewErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyNotFoundException(inner) => Error::LifecyclePolicyNotFoundException(inner),
crate::error::StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewInProgressException(inner) => Error::LifecyclePolicyPreviewInProgressException(inner),
crate::error::StartLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(inner) => Error::RepositoryNotFoundException(inner),
crate::error::StartLifecyclePolicyPreviewErrorKind::ServerException(inner) => Error::ServerException(inner),
crate::error::StartLifecyclePolicyPreviewErrorKind::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::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::TagResourceErrorKind::InvalidTagParameterException(inner) => {
Error::InvalidTagParameterException(inner)
}
crate::error::TagResourceErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::TagResourceErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::TagResourceErrorKind::TooManyTagsException(inner) => {
Error::TooManyTagsException(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::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UntagResourceErrorKind::InvalidTagParameterException(inner) => {
Error::InvalidTagParameterException(inner)
}
crate::error::UntagResourceErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::UntagResourceErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::UntagResourceErrorKind::TooManyTagsException(inner) => {
Error::TooManyTagsException(inner)
}
crate::error::UntagResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UploadLayerPartError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UploadLayerPartError, 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::UploadLayerPartError> for Error {
fn from(err: crate::error::UploadLayerPartError) -> Self {
match err.kind {
crate::error::UploadLayerPartErrorKind::InvalidLayerPartException(inner) => {
Error::InvalidLayerPartException(inner)
}
crate::error::UploadLayerPartErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UploadLayerPartErrorKind::KmsException(inner) => {
Error::KmsException(inner)
}
crate::error::UploadLayerPartErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::UploadLayerPartErrorKind::RepositoryNotFoundException(inner) => {
Error::RepositoryNotFoundException(inner)
}
crate::error::UploadLayerPartErrorKind::ServerException(inner) => {
Error::ServerException(inner)
}
crate::error::UploadLayerPartErrorKind::UploadNotFoundException(inner) => {
Error::UploadNotFoundException(inner)
}
crate::error::UploadLayerPartErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}