#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UploadLayerPartError {
pub kind: UploadLayerPartErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UploadLayerPartError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UploadLayerPartErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UploadLayerPartErrorKind {
InvalidLayerPartException(crate::error::InvalidLayerPartException),
InvalidParameterException(crate::error::InvalidParameterException),
KmsException(crate::error::KmsException),
LimitExceededException(crate::error::LimitExceededException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
UploadNotFoundException(crate::error::UploadNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UploadLayerPartError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UploadLayerPartErrorKind::InvalidLayerPartException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::KmsException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::ServerException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::UploadNotFoundException(_inner) => _inner.fmt(f),
UploadLayerPartErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UploadLayerPartError {
fn code(&self) -> Option<&str> {
UploadLayerPartError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UploadLayerPartError {
pub fn new(kind: UploadLayerPartErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UploadLayerPartErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UploadLayerPartErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_layer_part_exception(&self) -> bool {
matches!(
&self.kind,
UploadLayerPartErrorKind::InvalidLayerPartException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UploadLayerPartErrorKind::InvalidParameterException(_)
)
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, UploadLayerPartErrorKind::KmsException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UploadLayerPartErrorKind::LimitExceededException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UploadLayerPartErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, UploadLayerPartErrorKind::ServerException(_))
}
pub fn is_upload_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UploadLayerPartErrorKind::UploadNotFoundException(_)
)
}
}
impl std::error::Error for UploadLayerPartError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UploadLayerPartErrorKind::InvalidLayerPartException(_inner) => Some(_inner),
UploadLayerPartErrorKind::InvalidParameterException(_inner) => Some(_inner),
UploadLayerPartErrorKind::KmsException(_inner) => Some(_inner),
UploadLayerPartErrorKind::LimitExceededException(_inner) => Some(_inner),
UploadLayerPartErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
UploadLayerPartErrorKind::ServerException(_inner) => Some(_inner),
UploadLayerPartErrorKind::UploadNotFoundException(_inner) => Some(_inner),
UploadLayerPartErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UploadNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UploadNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UploadNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UploadNotFoundException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UploadNotFoundException {}
pub mod upload_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UploadNotFoundException {
crate::error::UploadNotFoundException {
message: self.message,
}
}
}
}
impl UploadNotFoundException {
pub fn builder() -> crate::error::upload_not_found_exception::Builder {
crate::error::upload_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServerException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServerException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServerException {}
pub mod server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServerException {
crate::error::ServerException {
message: self.message,
}
}
}
}
impl ServerException {
pub fn builder() -> crate::error::server_exception::Builder {
crate::error::server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RepositoryNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RepositoryNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RepositoryNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RepositoryNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for RepositoryNotFoundException {}
pub mod repository_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RepositoryNotFoundException {
crate::error::RepositoryNotFoundException {
message: self.message,
}
}
}
}
impl RepositoryNotFoundException {
pub fn builder() -> crate::error::repository_not_found_exception::Builder {
crate::error::repository_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct KmsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub kms_error: std::option::Option<std::string::String>,
}
impl KmsException {
pub fn kms_error(&self) -> std::option::Option<&str> {
self.kms_error.as_deref()
}
}
impl KmsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for KmsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "KmsException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for KmsException {}
pub mod kms_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) kms_error: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn kms_error(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_error = Some(input.into());
self
}
pub fn set_kms_error(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_error = input;
self
}
pub fn build(self) -> crate::error::KmsException {
crate::error::KmsException {
message: self.message,
kms_error: self.kms_error,
}
}
}
}
impl KmsException {
pub fn builder() -> crate::error::kms_exception::Builder {
crate::error::kms_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidLayerPartException {
#[doc(hidden)]
pub registry_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub repository_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub upload_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub last_valid_byte_received: std::option::Option<i64>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidLayerPartException {
pub fn registry_id(&self) -> std::option::Option<&str> {
self.registry_id.as_deref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn upload_id(&self) -> std::option::Option<&str> {
self.upload_id.as_deref()
}
pub fn last_valid_byte_received(&self) -> std::option::Option<i64> {
self.last_valid_byte_received
}
}
impl InvalidLayerPartException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidLayerPartException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidLayerPartException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidLayerPartException {}
pub mod invalid_layer_part_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) registry_id: std::option::Option<std::string::String>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) upload_id: std::option::Option<std::string::String>,
pub(crate) last_valid_byte_received: std::option::Option<i64>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn registry_id(mut self, input: impl Into<std::string::String>) -> Self {
self.registry_id = Some(input.into());
self
}
pub fn set_registry_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.registry_id = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn upload_id(mut self, input: impl Into<std::string::String>) -> Self {
self.upload_id = Some(input.into());
self
}
pub fn set_upload_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.upload_id = input;
self
}
pub fn last_valid_byte_received(mut self, input: i64) -> Self {
self.last_valid_byte_received = Some(input);
self
}
pub fn set_last_valid_byte_received(mut self, input: std::option::Option<i64>) -> Self {
self.last_valid_byte_received = input;
self
}
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidLayerPartException {
crate::error::InvalidLayerPartException {
registry_id: self.registry_id,
repository_name: self.repository_name,
upload_id: self.upload_id,
last_valid_byte_received: self.last_valid_byte_received,
message: self.message,
}
}
}
}
impl InvalidLayerPartException {
pub fn builder() -> crate::error::invalid_layer_part_exception::Builder {
crate::error::invalid_layer_part_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
InvalidTagParameterException(crate::error::InvalidTagParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidTagParameterException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_tag_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidTagParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ServerException(_))
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidTagParameterException(_inner) => Some(_inner),
UntagResourceErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ServerException(_inner) => Some(_inner),
UntagResourceErrorKind::TooManyTagsException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyTagsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyTagsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyTagsException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyTagsException {}
pub mod too_many_tags_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::TooManyTagsException {
crate::error::TooManyTagsException {
message: self.message,
}
}
}
}
impl TooManyTagsException {
pub fn builder() -> crate::error::too_many_tags_exception::Builder {
crate::error::too_many_tags_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidTagParameterException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidTagParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidTagParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidTagParameterException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidTagParameterException {}
pub mod invalid_tag_parameter_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidTagParameterException {
crate::error::InvalidTagParameterException {
message: self.message,
}
}
}
}
impl InvalidTagParameterException {
pub fn builder() -> crate::error::invalid_tag_parameter_exception::Builder {
crate::error::invalid_tag_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
InvalidTagParameterException(crate::error::InvalidTagParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidTagParameterException(_inner) => _inner.fmt(f),
TagResourceErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_tag_parameter_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidTagParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ServerException(_))
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidTagParameterException(_inner) => Some(_inner),
TagResourceErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServerException(_inner) => Some(_inner),
TagResourceErrorKind::TooManyTagsException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartLifecyclePolicyPreviewError {
pub kind: StartLifecyclePolicyPreviewErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartLifecyclePolicyPreviewError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartLifecyclePolicyPreviewErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LifecyclePolicyNotFoundException(crate::error::LifecyclePolicyNotFoundException),
LifecyclePolicyPreviewInProgressException(
crate::error::LifecyclePolicyPreviewInProgressException,
),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartLifecyclePolicyPreviewError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartLifecyclePolicyPreviewErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyNotFoundException(_inner) => {
_inner.fmt(f)
}
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewInProgressException(
_inner,
) => _inner.fmt(f),
StartLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
StartLifecyclePolicyPreviewErrorKind::ServerException(_inner) => _inner.fmt(f),
StartLifecyclePolicyPreviewErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartLifecyclePolicyPreviewError {
fn code(&self) -> Option<&str> {
StartLifecyclePolicyPreviewError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartLifecyclePolicyPreviewError {
pub fn new(kind: StartLifecyclePolicyPreviewErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartLifecyclePolicyPreviewErrorKind::InvalidParameterException(_)
)
}
pub fn is_lifecycle_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyNotFoundException(_)
)
}
pub fn is_lifecycle_policy_preview_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewInProgressException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
StartLifecyclePolicyPreviewErrorKind::ServerException(_)
)
}
}
impl std::error::Error for StartLifecyclePolicyPreviewError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartLifecyclePolicyPreviewErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyNotFoundException(_inner) => {
Some(_inner)
}
StartLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewInProgressException(
_inner,
) => Some(_inner),
StartLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_inner) => {
Some(_inner)
}
StartLifecyclePolicyPreviewErrorKind::ServerException(_inner) => Some(_inner),
StartLifecyclePolicyPreviewErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LifecyclePolicyPreviewInProgressException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LifecyclePolicyPreviewInProgressException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LifecyclePolicyPreviewInProgressException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LifecyclePolicyPreviewInProgressException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for LifecyclePolicyPreviewInProgressException {}
pub mod lifecycle_policy_preview_in_progress_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LifecyclePolicyPreviewInProgressException {
crate::error::LifecyclePolicyPreviewInProgressException {
message: self.message,
}
}
}
}
impl LifecyclePolicyPreviewInProgressException {
pub fn builder() -> crate::error::lifecycle_policy_preview_in_progress_exception::Builder {
crate::error::lifecycle_policy_preview_in_progress_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LifecyclePolicyNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LifecyclePolicyNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LifecyclePolicyNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LifecyclePolicyNotFoundException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for LifecyclePolicyNotFoundException {}
pub mod lifecycle_policy_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LifecyclePolicyNotFoundException {
crate::error::LifecyclePolicyNotFoundException {
message: self.message,
}
}
}
}
impl LifecyclePolicyNotFoundException {
pub fn builder() -> crate::error::lifecycle_policy_not_found_exception::Builder {
crate::error::lifecycle_policy_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartImageScanError {
pub kind: StartImageScanErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartImageScanError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartImageScanErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartImageScanErrorKind {
ImageNotFoundException(crate::error::ImageNotFoundException),
InvalidParameterException(crate::error::InvalidParameterException),
LimitExceededException(crate::error::LimitExceededException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
UnsupportedImageTypeException(crate::error::UnsupportedImageTypeException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartImageScanError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartImageScanErrorKind::ImageNotFoundException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::ServerException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::UnsupportedImageTypeException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartImageScanErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartImageScanError {
fn code(&self) -> Option<&str> {
StartImageScanError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartImageScanError {
pub fn new(kind: StartImageScanErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartImageScanErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartImageScanErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_image_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartImageScanErrorKind::ImageNotFoundException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartImageScanErrorKind::InvalidParameterException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartImageScanErrorKind::LimitExceededException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartImageScanErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, StartImageScanErrorKind::ServerException(_))
}
pub fn is_unsupported_image_type_exception(&self) -> bool {
matches!(
&self.kind,
StartImageScanErrorKind::UnsupportedImageTypeException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StartImageScanErrorKind::ValidationException(_))
}
}
impl std::error::Error for StartImageScanError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartImageScanErrorKind::ImageNotFoundException(_inner) => Some(_inner),
StartImageScanErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartImageScanErrorKind::LimitExceededException(_inner) => Some(_inner),
StartImageScanErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
StartImageScanErrorKind::ServerException(_inner) => Some(_inner),
StartImageScanErrorKind::UnsupportedImageTypeException(_inner) => Some(_inner),
StartImageScanErrorKind::ValidationException(_inner) => Some(_inner),
StartImageScanErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedImageTypeException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedImageTypeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedImageTypeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedImageTypeException")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedImageTypeException {}
pub mod unsupported_image_type_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedImageTypeException {
crate::error::UnsupportedImageTypeException {
message: self.message,
}
}
}
}
impl UnsupportedImageTypeException {
pub fn builder() -> crate::error::unsupported_image_type_exception::Builder {
crate::error::unsupported_image_type_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ImageNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ImageNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ImageNotFoundException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for ImageNotFoundException {}
pub mod image_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ImageNotFoundException {
crate::error::ImageNotFoundException {
message: self.message,
}
}
}
}
impl ImageNotFoundException {
pub fn builder() -> crate::error::image_not_found_exception::Builder {
crate::error::image_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetRepositoryPolicyError {
pub kind: SetRepositoryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetRepositoryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetRepositoryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetRepositoryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetRepositoryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
SetRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
SetRepositoryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
SetRepositoryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetRepositoryPolicyError {
fn code(&self) -> Option<&str> {
SetRepositoryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetRepositoryPolicyError {
pub fn new(kind: SetRepositoryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
SetRepositoryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetRepositoryPolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, SetRepositoryPolicyErrorKind::ServerException(_))
}
}
impl std::error::Error for SetRepositoryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetRepositoryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
SetRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
SetRepositoryPolicyErrorKind::ServerException(_inner) => Some(_inner),
SetRepositoryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutReplicationConfigurationError {
pub kind: PutReplicationConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutReplicationConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutReplicationConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutReplicationConfigurationErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutReplicationConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutReplicationConfigurationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
PutReplicationConfigurationErrorKind::ServerException(_inner) => _inner.fmt(f),
PutReplicationConfigurationErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutReplicationConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutReplicationConfigurationError {
fn code(&self) -> Option<&str> {
PutReplicationConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutReplicationConfigurationError {
pub fn new(kind: PutReplicationConfigurationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutReplicationConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutReplicationConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutReplicationConfigurationErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
PutReplicationConfigurationErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutReplicationConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutReplicationConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutReplicationConfigurationErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutReplicationConfigurationErrorKind::ServerException(_inner) => Some(_inner),
PutReplicationConfigurationErrorKind::ValidationException(_inner) => Some(_inner),
PutReplicationConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutRegistryScanningConfigurationError {
pub kind: PutRegistryScanningConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutRegistryScanningConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutRegistryScanningConfigurationErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutRegistryScanningConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutRegistryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
PutRegistryScanningConfigurationErrorKind::ServerException(_inner) => _inner.fmt(f),
PutRegistryScanningConfigurationErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutRegistryScanningConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutRegistryScanningConfigurationError {
fn code(&self) -> Option<&str> {
PutRegistryScanningConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutRegistryScanningConfigurationError {
pub fn new(
kind: PutRegistryScanningConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutRegistryScanningConfigurationErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
PutRegistryScanningConfigurationErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutRegistryScanningConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutRegistryScanningConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutRegistryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
PutRegistryScanningConfigurationErrorKind::ServerException(_inner) => Some(_inner),
PutRegistryScanningConfigurationErrorKind::ValidationException(_inner) => Some(_inner),
PutRegistryScanningConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutRegistryPolicyError {
pub kind: PutRegistryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutRegistryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutRegistryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutRegistryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutRegistryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutRegistryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
PutRegistryPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutRegistryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutRegistryPolicyError {
fn code(&self) -> Option<&str> {
PutRegistryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutRegistryPolicyError {
pub fn new(kind: PutRegistryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutRegistryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, PutRegistryPolicyErrorKind::ServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutRegistryPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutRegistryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutRegistryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutRegistryPolicyErrorKind::ServerException(_inner) => Some(_inner),
PutRegistryPolicyErrorKind::ValidationException(_inner) => Some(_inner),
PutRegistryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutLifecyclePolicyError {
pub kind: PutLifecyclePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutLifecyclePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutLifecyclePolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutLifecyclePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutLifecyclePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
PutLifecyclePolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
PutLifecyclePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutLifecyclePolicyError {
fn code(&self) -> Option<&str> {
PutLifecyclePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutLifecyclePolicyError {
pub fn new(kind: PutLifecyclePolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutLifecyclePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutLifecyclePolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, PutLifecyclePolicyErrorKind::ServerException(_))
}
}
impl std::error::Error for PutLifecyclePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutLifecyclePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
PutLifecyclePolicyErrorKind::ServerException(_inner) => Some(_inner),
PutLifecyclePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutImageTagMutabilityError {
pub kind: PutImageTagMutabilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutImageTagMutabilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutImageTagMutabilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutImageTagMutabilityErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutImageTagMutabilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutImageTagMutabilityErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutImageTagMutabilityErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
PutImageTagMutabilityErrorKind::ServerException(_inner) => _inner.fmt(f),
PutImageTagMutabilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutImageTagMutabilityError {
fn code(&self) -> Option<&str> {
PutImageTagMutabilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutImageTagMutabilityError {
pub fn new(kind: PutImageTagMutabilityErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutImageTagMutabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutImageTagMutabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutImageTagMutabilityErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImageTagMutabilityErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
PutImageTagMutabilityErrorKind::ServerException(_)
)
}
}
impl std::error::Error for PutImageTagMutabilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutImageTagMutabilityErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutImageTagMutabilityErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
PutImageTagMutabilityErrorKind::ServerException(_inner) => Some(_inner),
PutImageTagMutabilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutImageScanningConfigurationError {
pub kind: PutImageScanningConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutImageScanningConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutImageScanningConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutImageScanningConfigurationErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutImageScanningConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutImageScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
PutImageScanningConfigurationErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
PutImageScanningConfigurationErrorKind::ServerException(_inner) => _inner.fmt(f),
PutImageScanningConfigurationErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutImageScanningConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutImageScanningConfigurationError {
fn code(&self) -> Option<&str> {
PutImageScanningConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutImageScanningConfigurationError {
pub fn new(
kind: PutImageScanningConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutImageScanningConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutImageScanningConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutImageScanningConfigurationErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImageScanningConfigurationErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
PutImageScanningConfigurationErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutImageScanningConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutImageScanningConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutImageScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
PutImageScanningConfigurationErrorKind::RepositoryNotFoundException(_inner) => {
Some(_inner)
}
PutImageScanningConfigurationErrorKind::ServerException(_inner) => Some(_inner),
PutImageScanningConfigurationErrorKind::ValidationException(_inner) => Some(_inner),
PutImageScanningConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutImageError {
pub kind: PutImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutImageErrorKind {
ImageAlreadyExistsException(crate::error::ImageAlreadyExistsException),
ImageDigestDoesNotMatchException(crate::error::ImageDigestDoesNotMatchException),
ImageTagAlreadyExistsException(crate::error::ImageTagAlreadyExistsException),
InvalidParameterException(crate::error::InvalidParameterException),
KmsException(crate::error::KmsException),
LayersNotFoundException(crate::error::LayersNotFoundException),
LimitExceededException(crate::error::LimitExceededException),
ReferencedImagesNotFoundException(crate::error::ReferencedImagesNotFoundException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutImageErrorKind::ImageAlreadyExistsException(_inner) => _inner.fmt(f),
PutImageErrorKind::ImageDigestDoesNotMatchException(_inner) => _inner.fmt(f),
PutImageErrorKind::ImageTagAlreadyExistsException(_inner) => _inner.fmt(f),
PutImageErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutImageErrorKind::KmsException(_inner) => _inner.fmt(f),
PutImageErrorKind::LayersNotFoundException(_inner) => _inner.fmt(f),
PutImageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutImageErrorKind::ReferencedImagesNotFoundException(_inner) => _inner.fmt(f),
PutImageErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
PutImageErrorKind::ServerException(_inner) => _inner.fmt(f),
PutImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutImageError {
fn code(&self) -> Option<&str> {
PutImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutImageError {
pub fn new(kind: PutImageErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_image_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
PutImageErrorKind::ImageAlreadyExistsException(_)
)
}
pub fn is_image_digest_does_not_match_exception(&self) -> bool {
matches!(
&self.kind,
PutImageErrorKind::ImageDigestDoesNotMatchException(_)
)
}
pub fn is_image_tag_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
PutImageErrorKind::ImageTagAlreadyExistsException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(&self.kind, PutImageErrorKind::InvalidParameterException(_))
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, PutImageErrorKind::KmsException(_))
}
pub fn is_layers_not_found_exception(&self) -> bool {
matches!(&self.kind, PutImageErrorKind::LayersNotFoundException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, PutImageErrorKind::LimitExceededException(_))
}
pub fn is_referenced_images_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImageErrorKind::ReferencedImagesNotFoundException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImageErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, PutImageErrorKind::ServerException(_))
}
}
impl std::error::Error for PutImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutImageErrorKind::ImageAlreadyExistsException(_inner) => Some(_inner),
PutImageErrorKind::ImageDigestDoesNotMatchException(_inner) => Some(_inner),
PutImageErrorKind::ImageTagAlreadyExistsException(_inner) => Some(_inner),
PutImageErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutImageErrorKind::KmsException(_inner) => Some(_inner),
PutImageErrorKind::LayersNotFoundException(_inner) => Some(_inner),
PutImageErrorKind::LimitExceededException(_inner) => Some(_inner),
PutImageErrorKind::ReferencedImagesNotFoundException(_inner) => Some(_inner),
PutImageErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
PutImageErrorKind::ServerException(_inner) => Some(_inner),
PutImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReferencedImagesNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReferencedImagesNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReferencedImagesNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReferencedImagesNotFoundException")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for ReferencedImagesNotFoundException {}
pub mod referenced_images_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ReferencedImagesNotFoundException {
crate::error::ReferencedImagesNotFoundException {
message: self.message,
}
}
}
}
impl ReferencedImagesNotFoundException {
pub fn builder() -> crate::error::referenced_images_not_found_exception::Builder {
crate::error::referenced_images_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LayersNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LayersNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LayersNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LayersNotFoundException")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for LayersNotFoundException {}
pub mod layers_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LayersNotFoundException {
crate::error::LayersNotFoundException {
message: self.message,
}
}
}
}
impl LayersNotFoundException {
pub fn builder() -> crate::error::layers_not_found_exception::Builder {
crate::error::layers_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageTagAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ImageTagAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ImageTagAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ImageTagAlreadyExistsException")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for ImageTagAlreadyExistsException {}
pub mod image_tag_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ImageTagAlreadyExistsException {
crate::error::ImageTagAlreadyExistsException {
message: self.message,
}
}
}
}
impl ImageTagAlreadyExistsException {
pub fn builder() -> crate::error::image_tag_already_exists_exception::Builder {
crate::error::image_tag_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageDigestDoesNotMatchException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ImageDigestDoesNotMatchException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ImageDigestDoesNotMatchException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ImageDigestDoesNotMatchException")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for ImageDigestDoesNotMatchException {}
pub mod image_digest_does_not_match_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ImageDigestDoesNotMatchException {
crate::error::ImageDigestDoesNotMatchException {
message: self.message,
}
}
}
}
impl ImageDigestDoesNotMatchException {
pub fn builder() -> crate::error::image_digest_does_not_match_exception::Builder {
crate::error::image_digest_does_not_match_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImageAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ImageAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ImageAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ImageAlreadyExistsException")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for ImageAlreadyExistsException {}
pub mod image_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ImageAlreadyExistsException {
crate::error::ImageAlreadyExistsException {
message: self.message,
}
}
}
}
impl ImageAlreadyExistsException {
pub fn builder() -> crate::error::image_already_exists_exception::Builder {
crate::error::image_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, ListTagsForResourceErrorKind::ServerException(_))
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImagesError {
pub kind: ListImagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImagesErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImagesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListImagesErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
ListImagesErrorKind::ServerException(_inner) => _inner.fmt(f),
ListImagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImagesError {
fn code(&self) -> Option<&str> {
ListImagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImagesError {
pub fn new(kind: ListImagesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListImagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListImagesErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListImagesErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, ListImagesErrorKind::ServerException(_))
}
}
impl std::error::Error for ListImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImagesErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListImagesErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
ListImagesErrorKind::ServerException(_inner) => Some(_inner),
ListImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct InitiateLayerUploadError {
pub kind: InitiateLayerUploadErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for InitiateLayerUploadError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: InitiateLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum InitiateLayerUploadErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
KmsException(crate::error::KmsException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for InitiateLayerUploadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
InitiateLayerUploadErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
InitiateLayerUploadErrorKind::KmsException(_inner) => _inner.fmt(f),
InitiateLayerUploadErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
InitiateLayerUploadErrorKind::ServerException(_inner) => _inner.fmt(f),
InitiateLayerUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for InitiateLayerUploadError {
fn code(&self) -> Option<&str> {
InitiateLayerUploadError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl InitiateLayerUploadError {
pub fn new(kind: InitiateLayerUploadErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: InitiateLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: InitiateLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
InitiateLayerUploadErrorKind::InvalidParameterException(_)
)
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, InitiateLayerUploadErrorKind::KmsException(_))
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
InitiateLayerUploadErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, InitiateLayerUploadErrorKind::ServerException(_))
}
}
impl std::error::Error for InitiateLayerUploadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
InitiateLayerUploadErrorKind::InvalidParameterException(_inner) => Some(_inner),
InitiateLayerUploadErrorKind::KmsException(_inner) => Some(_inner),
InitiateLayerUploadErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
InitiateLayerUploadErrorKind::ServerException(_inner) => Some(_inner),
InitiateLayerUploadErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRepositoryPolicyError {
pub kind: GetRepositoryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRepositoryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRepositoryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
RepositoryPolicyNotFoundException(crate::error::RepositoryPolicyNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRepositoryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRepositoryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
GetRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_inner) => {
_inner.fmt(f)
}
GetRepositoryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
GetRepositoryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRepositoryPolicyError {
fn code(&self) -> Option<&str> {
GetRepositoryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRepositoryPolicyError {
pub fn new(kind: GetRepositoryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositoryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositoryPolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_repository_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, GetRepositoryPolicyErrorKind::ServerException(_))
}
}
impl std::error::Error for GetRepositoryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRepositoryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
GetRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_inner) => Some(_inner),
GetRepositoryPolicyErrorKind::ServerException(_inner) => Some(_inner),
GetRepositoryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RepositoryPolicyNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RepositoryPolicyNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RepositoryPolicyNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RepositoryPolicyNotFoundException")?;
if let Some(inner_20) = &self.message {
{
write!(f, ": {}", inner_20)?;
}
}
Ok(())
}
}
impl std::error::Error for RepositoryPolicyNotFoundException {}
pub mod repository_policy_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RepositoryPolicyNotFoundException {
crate::error::RepositoryPolicyNotFoundException {
message: self.message,
}
}
}
}
impl RepositoryPolicyNotFoundException {
pub fn builder() -> crate::error::repository_policy_not_found_exception::Builder {
crate::error::repository_policy_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRegistryScanningConfigurationError {
pub kind: GetRegistryScanningConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRegistryScanningConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRegistryScanningConfigurationErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRegistryScanningConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRegistryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
GetRegistryScanningConfigurationErrorKind::ServerException(_inner) => _inner.fmt(f),
GetRegistryScanningConfigurationErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRegistryScanningConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRegistryScanningConfigurationError {
fn code(&self) -> Option<&str> {
GetRegistryScanningConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRegistryScanningConfigurationError {
pub fn new(
kind: GetRegistryScanningConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRegistryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryScanningConfigurationErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryScanningConfigurationErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryScanningConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRegistryScanningConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRegistryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
GetRegistryScanningConfigurationErrorKind::ServerException(_inner) => Some(_inner),
GetRegistryScanningConfigurationErrorKind::ValidationException(_inner) => Some(_inner),
GetRegistryScanningConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRegistryPolicyError {
pub kind: GetRegistryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRegistryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRegistryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RegistryPolicyNotFoundException(crate::error::RegistryPolicyNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRegistryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRegistryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_inner) => _inner.fmt(f),
GetRegistryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
GetRegistryPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRegistryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRegistryPolicyError {
fn code(&self) -> Option<&str> {
GetRegistryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRegistryPolicyError {
pub fn new(kind: GetRegistryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_registry_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, GetRegistryPolicyErrorKind::ServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRegistryPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRegistryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRegistryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_inner) => Some(_inner),
GetRegistryPolicyErrorKind::ServerException(_inner) => Some(_inner),
GetRegistryPolicyErrorKind::ValidationException(_inner) => Some(_inner),
GetRegistryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegistryPolicyNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RegistryPolicyNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RegistryPolicyNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RegistryPolicyNotFoundException")?;
if let Some(inner_21) = &self.message {
{
write!(f, ": {}", inner_21)?;
}
}
Ok(())
}
}
impl std::error::Error for RegistryPolicyNotFoundException {}
pub mod registry_policy_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RegistryPolicyNotFoundException {
crate::error::RegistryPolicyNotFoundException {
message: self.message,
}
}
}
}
impl RegistryPolicyNotFoundException {
pub fn builder() -> crate::error::registry_policy_not_found_exception::Builder {
crate::error::registry_policy_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLifecyclePolicyPreviewError {
pub kind: GetLifecyclePolicyPreviewErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLifecyclePolicyPreviewError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLifecyclePolicyPreviewErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LifecyclePolicyPreviewNotFoundException(crate::error::LifecyclePolicyPreviewNotFoundException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLifecyclePolicyPreviewError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLifecyclePolicyPreviewErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewNotFoundException(_inner) => {
_inner.fmt(f)
}
GetLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
GetLifecyclePolicyPreviewErrorKind::ServerException(_inner) => _inner.fmt(f),
GetLifecyclePolicyPreviewErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLifecyclePolicyPreviewError {
fn code(&self) -> Option<&str> {
GetLifecyclePolicyPreviewError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLifecyclePolicyPreviewError {
pub fn new(kind: GetLifecyclePolicyPreviewErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLifecyclePolicyPreviewErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyPreviewErrorKind::InvalidParameterException(_)
)
}
pub fn is_lifecycle_policy_preview_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewNotFoundException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyPreviewErrorKind::ServerException(_)
)
}
}
impl std::error::Error for GetLifecyclePolicyPreviewError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLifecyclePolicyPreviewErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetLifecyclePolicyPreviewErrorKind::LifecyclePolicyPreviewNotFoundException(_inner) => {
Some(_inner)
}
GetLifecyclePolicyPreviewErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
GetLifecyclePolicyPreviewErrorKind::ServerException(_inner) => Some(_inner),
GetLifecyclePolicyPreviewErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LifecyclePolicyPreviewNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LifecyclePolicyPreviewNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LifecyclePolicyPreviewNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LifecyclePolicyPreviewNotFoundException")?;
if let Some(inner_22) = &self.message {
{
write!(f, ": {}", inner_22)?;
}
}
Ok(())
}
}
impl std::error::Error for LifecyclePolicyPreviewNotFoundException {}
pub mod lifecycle_policy_preview_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LifecyclePolicyPreviewNotFoundException {
crate::error::LifecyclePolicyPreviewNotFoundException {
message: self.message,
}
}
}
}
impl LifecyclePolicyPreviewNotFoundException {
pub fn builder() -> crate::error::lifecycle_policy_preview_not_found_exception::Builder {
crate::error::lifecycle_policy_preview_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLifecyclePolicyError {
pub kind: GetLifecyclePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLifecyclePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLifecyclePolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LifecyclePolicyNotFoundException(crate::error::LifecyclePolicyNotFoundException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLifecyclePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLifecyclePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_inner) => _inner.fmt(f),
GetLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
GetLifecyclePolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
GetLifecyclePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLifecyclePolicyError {
fn code(&self) -> Option<&str> {
GetLifecyclePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLifecyclePolicyError {
pub fn new(kind: GetLifecyclePolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_lifecycle_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetLifecyclePolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, GetLifecyclePolicyErrorKind::ServerException(_))
}
}
impl std::error::Error for GetLifecyclePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLifecyclePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_inner) => Some(_inner),
GetLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
GetLifecyclePolicyErrorKind::ServerException(_inner) => Some(_inner),
GetLifecyclePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDownloadUrlForLayerError {
pub kind: GetDownloadUrlForLayerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDownloadUrlForLayerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDownloadUrlForLayerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDownloadUrlForLayerErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LayerInaccessibleException(crate::error::LayerInaccessibleException),
LayersNotFoundException(crate::error::LayersNotFoundException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDownloadUrlForLayerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDownloadUrlForLayerErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetDownloadUrlForLayerErrorKind::LayerInaccessibleException(_inner) => _inner.fmt(f),
GetDownloadUrlForLayerErrorKind::LayersNotFoundException(_inner) => _inner.fmt(f),
GetDownloadUrlForLayerErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
GetDownloadUrlForLayerErrorKind::ServerException(_inner) => _inner.fmt(f),
GetDownloadUrlForLayerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDownloadUrlForLayerError {
fn code(&self) -> Option<&str> {
GetDownloadUrlForLayerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDownloadUrlForLayerError {
pub fn new(kind: GetDownloadUrlForLayerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetDownloadUrlForLayerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDownloadUrlForLayerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetDownloadUrlForLayerErrorKind::InvalidParameterException(_)
)
}
pub fn is_layer_inaccessible_exception(&self) -> bool {
matches!(
&self.kind,
GetDownloadUrlForLayerErrorKind::LayerInaccessibleException(_)
)
}
pub fn is_layers_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDownloadUrlForLayerErrorKind::LayersNotFoundException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDownloadUrlForLayerErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDownloadUrlForLayerErrorKind::ServerException(_)
)
}
}
impl std::error::Error for GetDownloadUrlForLayerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDownloadUrlForLayerErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetDownloadUrlForLayerErrorKind::LayerInaccessibleException(_inner) => Some(_inner),
GetDownloadUrlForLayerErrorKind::LayersNotFoundException(_inner) => Some(_inner),
GetDownloadUrlForLayerErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
GetDownloadUrlForLayerErrorKind::ServerException(_inner) => Some(_inner),
GetDownloadUrlForLayerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LayerInaccessibleException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LayerInaccessibleException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LayerInaccessibleException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LayerInaccessibleException")?;
if let Some(inner_23) = &self.message {
{
write!(f, ": {}", inner_23)?;
}
}
Ok(())
}
}
impl std::error::Error for LayerInaccessibleException {}
pub mod layer_inaccessible_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LayerInaccessibleException {
crate::error::LayerInaccessibleException {
message: self.message,
}
}
}
}
impl LayerInaccessibleException {
pub fn builder() -> crate::error::layer_inaccessible_exception::Builder {
crate::error::layer_inaccessible_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAuthorizationTokenError {
pub kind: GetAuthorizationTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAuthorizationTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAuthorizationTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAuthorizationTokenErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAuthorizationTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAuthorizationTokenErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetAuthorizationTokenErrorKind::ServerException(_inner) => _inner.fmt(f),
GetAuthorizationTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAuthorizationTokenError {
fn code(&self) -> Option<&str> {
GetAuthorizationTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAuthorizationTokenError {
pub fn new(kind: GetAuthorizationTokenErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetAuthorizationTokenErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAuthorizationTokenErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetAuthorizationTokenErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
GetAuthorizationTokenErrorKind::ServerException(_)
)
}
}
impl std::error::Error for GetAuthorizationTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAuthorizationTokenErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetAuthorizationTokenErrorKind::ServerException(_inner) => Some(_inner),
GetAuthorizationTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRepositoriesError {
pub kind: DescribeRepositoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRepositoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRepositoriesErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRepositoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRepositoriesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeRepositoriesErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
DescribeRepositoriesErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribeRepositoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRepositoriesError {
fn code(&self) -> Option<&str> {
DescribeRepositoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRepositoriesError {
pub fn new(kind: DescribeRepositoriesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRepositoriesErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRepositoriesErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRepositoriesErrorKind::ServerException(_)
)
}
}
impl std::error::Error for DescribeRepositoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRepositoriesErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeRepositoriesErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DescribeRepositoriesErrorKind::ServerException(_inner) => Some(_inner),
DescribeRepositoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRegistryError {
pub kind: DescribeRegistryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRegistryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRegistryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRegistryErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRegistryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRegistryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeRegistryErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribeRegistryErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeRegistryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRegistryError {
fn code(&self) -> Option<&str> {
DescribeRegistryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRegistryError {
pub fn new(kind: DescribeRegistryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeRegistryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRegistryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegistryErrorKind::InvalidParameterException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, DescribeRegistryErrorKind::ServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegistryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeRegistryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRegistryErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeRegistryErrorKind::ServerException(_inner) => Some(_inner),
DescribeRegistryErrorKind::ValidationException(_inner) => Some(_inner),
DescribeRegistryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePullThroughCacheRulesError {
pub kind: DescribePullThroughCacheRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePullThroughCacheRulesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePullThroughCacheRulesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePullThroughCacheRulesErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
PullThroughCacheRuleNotFoundException(crate::error::PullThroughCacheRuleNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePullThroughCacheRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePullThroughCacheRulesErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribePullThroughCacheRulesErrorKind::PullThroughCacheRuleNotFoundException(
_inner,
) => _inner.fmt(f),
DescribePullThroughCacheRulesErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribePullThroughCacheRulesErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribePullThroughCacheRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePullThroughCacheRulesError {
fn code(&self) -> Option<&str> {
DescribePullThroughCacheRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePullThroughCacheRulesError {
pub fn new(
kind: DescribePullThroughCacheRulesErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribePullThroughCacheRulesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePullThroughCacheRulesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribePullThroughCacheRulesErrorKind::InvalidParameterException(_)
)
}
pub fn is_pull_through_cache_rule_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePullThroughCacheRulesErrorKind::PullThroughCacheRuleNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePullThroughCacheRulesErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribePullThroughCacheRulesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribePullThroughCacheRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePullThroughCacheRulesErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribePullThroughCacheRulesErrorKind::PullThroughCacheRuleNotFoundException(
_inner,
) => Some(_inner),
DescribePullThroughCacheRulesErrorKind::ServerException(_inner) => Some(_inner),
DescribePullThroughCacheRulesErrorKind::ValidationException(_inner) => Some(_inner),
DescribePullThroughCacheRulesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PullThroughCacheRuleNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PullThroughCacheRuleNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PullThroughCacheRuleNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PullThroughCacheRuleNotFoundException")?;
if let Some(inner_24) = &self.message {
{
write!(f, ": {}", inner_24)?;
}
}
Ok(())
}
}
impl std::error::Error for PullThroughCacheRuleNotFoundException {}
pub mod pull_through_cache_rule_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PullThroughCacheRuleNotFoundException {
crate::error::PullThroughCacheRuleNotFoundException {
message: self.message,
}
}
}
}
impl PullThroughCacheRuleNotFoundException {
pub fn builder() -> crate::error::pull_through_cache_rule_not_found_exception::Builder {
crate::error::pull_through_cache_rule_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImageScanFindingsError {
pub kind: DescribeImageScanFindingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImageScanFindingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImageScanFindingsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImageScanFindingsErrorKind {
ImageNotFoundException(crate::error::ImageNotFoundException),
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ScanNotFoundException(crate::error::ScanNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImageScanFindingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImageScanFindingsErrorKind::ImageNotFoundException(_inner) => _inner.fmt(f),
DescribeImageScanFindingsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeImageScanFindingsErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeImageScanFindingsErrorKind::ScanNotFoundException(_inner) => _inner.fmt(f),
DescribeImageScanFindingsErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribeImageScanFindingsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeImageScanFindingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImageScanFindingsError {
fn code(&self) -> Option<&str> {
DescribeImageScanFindingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImageScanFindingsError {
pub fn new(kind: DescribeImageScanFindingsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeImageScanFindingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImageScanFindingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_image_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::ImageNotFoundException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_scan_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::ScanNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageScanFindingsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeImageScanFindingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImageScanFindingsErrorKind::ImageNotFoundException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::ScanNotFoundException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::ServerException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeImageScanFindingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScanNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ScanNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ScanNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ScanNotFoundException")?;
if let Some(inner_25) = &self.message {
{
write!(f, ": {}", inner_25)?;
}
}
Ok(())
}
}
impl std::error::Error for ScanNotFoundException {}
pub mod scan_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ScanNotFoundException {
crate::error::ScanNotFoundException {
message: self.message,
}
}
}
}
impl ScanNotFoundException {
pub fn builder() -> crate::error::scan_not_found_exception::Builder {
crate::error::scan_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImagesError {
pub kind: DescribeImagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImagesErrorKind {
ImageNotFoundException(crate::error::ImageNotFoundException),
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImagesErrorKind::ImageNotFoundException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImagesError {
fn code(&self) -> Option<&str> {
DescribeImagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImagesError {
pub fn new(kind: DescribeImagesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeImagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_image_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagesErrorKind::ImageNotFoundException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagesErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagesErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, DescribeImagesErrorKind::ServerException(_))
}
}
impl std::error::Error for DescribeImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImagesErrorKind::ImageNotFoundException(_inner) => Some(_inner),
DescribeImagesErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeImagesErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DescribeImagesErrorKind::ServerException(_inner) => Some(_inner),
DescribeImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImageReplicationStatusError {
pub kind: DescribeImageReplicationStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImageReplicationStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImageReplicationStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImageReplicationStatusErrorKind {
ImageNotFoundException(crate::error::ImageNotFoundException),
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImageReplicationStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImageReplicationStatusErrorKind::ImageNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeImageReplicationStatusErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeImageReplicationStatusErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeImageReplicationStatusErrorKind::ServerException(_inner) => _inner.fmt(f),
DescribeImageReplicationStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeImageReplicationStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImageReplicationStatusError {
fn code(&self) -> Option<&str> {
DescribeImageReplicationStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImageReplicationStatusError {
pub fn new(
kind: DescribeImageReplicationStatusErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeImageReplicationStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImageReplicationStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_image_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageReplicationStatusErrorKind::ImageNotFoundException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageReplicationStatusErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageReplicationStatusErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageReplicationStatusErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageReplicationStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeImageReplicationStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImageReplicationStatusErrorKind::ImageNotFoundException(_inner) => Some(_inner),
DescribeImageReplicationStatusErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeImageReplicationStatusErrorKind::RepositoryNotFoundException(_inner) => {
Some(_inner)
}
DescribeImageReplicationStatusErrorKind::ServerException(_inner) => Some(_inner),
DescribeImageReplicationStatusErrorKind::ValidationException(_inner) => Some(_inner),
DescribeImageReplicationStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRepositoryPolicyError {
pub kind: DeleteRepositoryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRepositoryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRepositoryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
RepositoryPolicyNotFoundException(crate::error::RepositoryPolicyNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRepositoryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRepositoryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
DeleteRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteRepositoryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
DeleteRepositoryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRepositoryPolicyError {
fn code(&self) -> Option<&str> {
DeleteRepositoryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRepositoryPolicyError {
pub fn new(kind: DeleteRepositoryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRepositoryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryPolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_repository_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryPolicyErrorKind::ServerException(_)
)
}
}
impl std::error::Error for DeleteRepositoryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRepositoryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteRepositoryPolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DeleteRepositoryPolicyErrorKind::RepositoryPolicyNotFoundException(_inner) => {
Some(_inner)
}
DeleteRepositoryPolicyErrorKind::ServerException(_inner) => Some(_inner),
DeleteRepositoryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRepositoryError {
pub kind: DeleteRepositoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRepositoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRepositoryErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
KmsException(crate::error::KmsException),
RepositoryNotEmptyException(crate::error::RepositoryNotEmptyException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRepositoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::KmsException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::RepositoryNotEmptyException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::ServerException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRepositoryError {
fn code(&self) -> Option<&str> {
DeleteRepositoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRepositoryError {
pub fn new(kind: DeleteRepositoryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, DeleteRepositoryErrorKind::KmsException(_))
}
pub fn is_repository_not_empty_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::RepositoryNotEmptyException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, DeleteRepositoryErrorKind::ServerException(_))
}
}
impl std::error::Error for DeleteRepositoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRepositoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::KmsException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::RepositoryNotEmptyException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::ServerException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RepositoryNotEmptyException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RepositoryNotEmptyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RepositoryNotEmptyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RepositoryNotEmptyException")?;
if let Some(inner_26) = &self.message {
{
write!(f, ": {}", inner_26)?;
}
}
Ok(())
}
}
impl std::error::Error for RepositoryNotEmptyException {}
pub mod repository_not_empty_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RepositoryNotEmptyException {
crate::error::RepositoryNotEmptyException {
message: self.message,
}
}
}
}
impl RepositoryNotEmptyException {
pub fn builder() -> crate::error::repository_not_empty_exception::Builder {
crate::error::repository_not_empty_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRegistryPolicyError {
pub kind: DeleteRegistryPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRegistryPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRegistryPolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RegistryPolicyNotFoundException(crate::error::RegistryPolicyNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRegistryPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRegistryPolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_inner) => _inner.fmt(f),
DeleteRegistryPolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
DeleteRegistryPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteRegistryPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRegistryPolicyError {
fn code(&self) -> Option<&str> {
DeleteRegistryPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRegistryPolicyError {
pub fn new(kind: DeleteRegistryPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRegistryPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRegistryPolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_registry_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRegistryPolicyErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRegistryPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteRegistryPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRegistryPolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteRegistryPolicyErrorKind::RegistryPolicyNotFoundException(_inner) => Some(_inner),
DeleteRegistryPolicyErrorKind::ServerException(_inner) => Some(_inner),
DeleteRegistryPolicyErrorKind::ValidationException(_inner) => Some(_inner),
DeleteRegistryPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePullThroughCacheRuleError {
pub kind: DeletePullThroughCacheRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePullThroughCacheRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePullThroughCacheRuleErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
PullThroughCacheRuleNotFoundException(crate::error::PullThroughCacheRuleNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePullThroughCacheRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePullThroughCacheRuleErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeletePullThroughCacheRuleErrorKind::PullThroughCacheRuleNotFoundException(_inner) => {
_inner.fmt(f)
}
DeletePullThroughCacheRuleErrorKind::ServerException(_inner) => _inner.fmt(f),
DeletePullThroughCacheRuleErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeletePullThroughCacheRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePullThroughCacheRuleError {
fn code(&self) -> Option<&str> {
DeletePullThroughCacheRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePullThroughCacheRuleError {
pub fn new(kind: DeletePullThroughCacheRuleErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeletePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeletePullThroughCacheRuleErrorKind::InvalidParameterException(_)
)
}
pub fn is_pull_through_cache_rule_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePullThroughCacheRuleErrorKind::PullThroughCacheRuleNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePullThroughCacheRuleErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeletePullThroughCacheRuleErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeletePullThroughCacheRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePullThroughCacheRuleErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeletePullThroughCacheRuleErrorKind::PullThroughCacheRuleNotFoundException(_inner) => {
Some(_inner)
}
DeletePullThroughCacheRuleErrorKind::ServerException(_inner) => Some(_inner),
DeletePullThroughCacheRuleErrorKind::ValidationException(_inner) => Some(_inner),
DeletePullThroughCacheRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLifecyclePolicyError {
pub kind: DeleteLifecyclePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLifecyclePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLifecyclePolicyErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LifecyclePolicyNotFoundException(crate::error::LifecyclePolicyNotFoundException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLifecyclePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLifecyclePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
DeleteLifecyclePolicyErrorKind::ServerException(_inner) => _inner.fmt(f),
DeleteLifecyclePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLifecyclePolicyError {
fn code(&self) -> Option<&str> {
DeleteLifecyclePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLifecyclePolicyError {
pub fn new(kind: DeleteLifecyclePolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLifecyclePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLifecyclePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_lifecycle_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLifecyclePolicyErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLifecyclePolicyErrorKind::ServerException(_)
)
}
}
impl std::error::Error for DeleteLifecyclePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLifecyclePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteLifecyclePolicyErrorKind::LifecyclePolicyNotFoundException(_inner) => {
Some(_inner)
}
DeleteLifecyclePolicyErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
DeleteLifecyclePolicyErrorKind::ServerException(_inner) => Some(_inner),
DeleteLifecyclePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRepositoryError {
pub kind: CreateRepositoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRepositoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRepositoryErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
InvalidTagParameterException(crate::error::InvalidTagParameterException),
KmsException(crate::error::KmsException),
LimitExceededException(crate::error::LimitExceededException),
RepositoryAlreadyExistsException(crate::error::RepositoryAlreadyExistsException),
ServerException(crate::error::ServerException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRepositoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::InvalidTagParameterException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::KmsException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::RepositoryAlreadyExistsException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::ServerException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRepositoryError {
fn code(&self) -> Option<&str> {
CreateRepositoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateRepositoryError {
pub fn new(kind: CreateRepositoryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_tag_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::InvalidTagParameterException(_)
)
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, CreateRepositoryErrorKind::KmsException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::LimitExceededException(_)
)
}
pub fn is_repository_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::RepositoryAlreadyExistsException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, CreateRepositoryErrorKind::ServerException(_))
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::TooManyTagsException(_)
)
}
}
impl std::error::Error for CreateRepositoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRepositoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateRepositoryErrorKind::InvalidTagParameterException(_inner) => Some(_inner),
CreateRepositoryErrorKind::KmsException(_inner) => Some(_inner),
CreateRepositoryErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateRepositoryErrorKind::RepositoryAlreadyExistsException(_inner) => Some(_inner),
CreateRepositoryErrorKind::ServerException(_inner) => Some(_inner),
CreateRepositoryErrorKind::TooManyTagsException(_inner) => Some(_inner),
CreateRepositoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RepositoryAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RepositoryAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RepositoryAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RepositoryAlreadyExistsException")?;
if let Some(inner_27) = &self.message {
{
write!(f, ": {}", inner_27)?;
}
}
Ok(())
}
}
impl std::error::Error for RepositoryAlreadyExistsException {}
pub mod repository_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RepositoryAlreadyExistsException {
crate::error::RepositoryAlreadyExistsException {
message: self.message,
}
}
}
}
impl RepositoryAlreadyExistsException {
pub fn builder() -> crate::error::repository_already_exists_exception::Builder {
crate::error::repository_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePullThroughCacheRuleError {
pub kind: CreatePullThroughCacheRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePullThroughCacheRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePullThroughCacheRuleErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
LimitExceededException(crate::error::LimitExceededException),
PullThroughCacheRuleAlreadyExistsException(
crate::error::PullThroughCacheRuleAlreadyExistsException,
),
ServerException(crate::error::ServerException),
UnsupportedUpstreamRegistryException(crate::error::UnsupportedUpstreamRegistryException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePullThroughCacheRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePullThroughCacheRuleErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreatePullThroughCacheRuleErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreatePullThroughCacheRuleErrorKind::PullThroughCacheRuleAlreadyExistsException(
_inner,
) => _inner.fmt(f),
CreatePullThroughCacheRuleErrorKind::ServerException(_inner) => _inner.fmt(f),
CreatePullThroughCacheRuleErrorKind::UnsupportedUpstreamRegistryException(_inner) => {
_inner.fmt(f)
}
CreatePullThroughCacheRuleErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreatePullThroughCacheRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePullThroughCacheRuleError {
fn code(&self) -> Option<&str> {
CreatePullThroughCacheRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePullThroughCacheRuleError {
pub fn new(kind: CreatePullThroughCacheRuleErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreatePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePullThroughCacheRuleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::InvalidParameterException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::LimitExceededException(_)
)
}
pub fn is_pull_through_cache_rule_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::PullThroughCacheRuleAlreadyExistsException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::ServerException(_)
)
}
pub fn is_unsupported_upstream_registry_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::UnsupportedUpstreamRegistryException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreatePullThroughCacheRuleErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreatePullThroughCacheRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePullThroughCacheRuleErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreatePullThroughCacheRuleErrorKind::LimitExceededException(_inner) => Some(_inner),
CreatePullThroughCacheRuleErrorKind::PullThroughCacheRuleAlreadyExistsException(
_inner,
) => Some(_inner),
CreatePullThroughCacheRuleErrorKind::ServerException(_inner) => Some(_inner),
CreatePullThroughCacheRuleErrorKind::UnsupportedUpstreamRegistryException(_inner) => {
Some(_inner)
}
CreatePullThroughCacheRuleErrorKind::ValidationException(_inner) => Some(_inner),
CreatePullThroughCacheRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedUpstreamRegistryException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedUpstreamRegistryException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedUpstreamRegistryException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedUpstreamRegistryException")?;
if let Some(inner_28) = &self.message {
{
write!(f, ": {}", inner_28)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedUpstreamRegistryException {}
pub mod unsupported_upstream_registry_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedUpstreamRegistryException {
crate::error::UnsupportedUpstreamRegistryException {
message: self.message,
}
}
}
}
impl UnsupportedUpstreamRegistryException {
pub fn builder() -> crate::error::unsupported_upstream_registry_exception::Builder {
crate::error::unsupported_upstream_registry_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PullThroughCacheRuleAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PullThroughCacheRuleAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PullThroughCacheRuleAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PullThroughCacheRuleAlreadyExistsException")?;
if let Some(inner_29) = &self.message {
{
write!(f, ": {}", inner_29)?;
}
}
Ok(())
}
}
impl std::error::Error for PullThroughCacheRuleAlreadyExistsException {}
pub mod pull_through_cache_rule_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PullThroughCacheRuleAlreadyExistsException {
crate::error::PullThroughCacheRuleAlreadyExistsException {
message: self.message,
}
}
}
}
impl PullThroughCacheRuleAlreadyExistsException {
pub fn builder() -> crate::error::pull_through_cache_rule_already_exists_exception::Builder {
crate::error::pull_through_cache_rule_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CompleteLayerUploadError {
pub kind: CompleteLayerUploadErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CompleteLayerUploadError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CompleteLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CompleteLayerUploadErrorKind {
EmptyUploadException(crate::error::EmptyUploadException),
InvalidLayerException(crate::error::InvalidLayerException),
InvalidParameterException(crate::error::InvalidParameterException),
KmsException(crate::error::KmsException),
LayerAlreadyExistsException(crate::error::LayerAlreadyExistsException),
LayerPartTooSmallException(crate::error::LayerPartTooSmallException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
UploadNotFoundException(crate::error::UploadNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CompleteLayerUploadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CompleteLayerUploadErrorKind::EmptyUploadException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::InvalidLayerException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::KmsException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::LayerAlreadyExistsException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::LayerPartTooSmallException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::ServerException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::UploadNotFoundException(_inner) => _inner.fmt(f),
CompleteLayerUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CompleteLayerUploadError {
fn code(&self) -> Option<&str> {
CompleteLayerUploadError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CompleteLayerUploadError {
pub fn new(kind: CompleteLayerUploadErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CompleteLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CompleteLayerUploadErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_empty_upload_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::EmptyUploadException(_)
)
}
pub fn is_invalid_layer_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::InvalidLayerException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::InvalidParameterException(_)
)
}
pub fn is_kms_exception(&self) -> bool {
matches!(&self.kind, CompleteLayerUploadErrorKind::KmsException(_))
}
pub fn is_layer_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::LayerAlreadyExistsException(_)
)
}
pub fn is_layer_part_too_small_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::LayerPartTooSmallException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, CompleteLayerUploadErrorKind::ServerException(_))
}
pub fn is_upload_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CompleteLayerUploadErrorKind::UploadNotFoundException(_)
)
}
}
impl std::error::Error for CompleteLayerUploadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CompleteLayerUploadErrorKind::EmptyUploadException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::InvalidLayerException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::InvalidParameterException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::KmsException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::LayerAlreadyExistsException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::LayerPartTooSmallException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::ServerException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::UploadNotFoundException(_inner) => Some(_inner),
CompleteLayerUploadErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LayerPartTooSmallException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LayerPartTooSmallException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LayerPartTooSmallException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LayerPartTooSmallException")?;
if let Some(inner_30) = &self.message {
{
write!(f, ": {}", inner_30)?;
}
}
Ok(())
}
}
impl std::error::Error for LayerPartTooSmallException {}
pub mod layer_part_too_small_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LayerPartTooSmallException {
crate::error::LayerPartTooSmallException {
message: self.message,
}
}
}
}
impl LayerPartTooSmallException {
pub fn builder() -> crate::error::layer_part_too_small_exception::Builder {
crate::error::layer_part_too_small_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LayerAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LayerAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LayerAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LayerAlreadyExistsException")?;
if let Some(inner_31) = &self.message {
{
write!(f, ": {}", inner_31)?;
}
}
Ok(())
}
}
impl std::error::Error for LayerAlreadyExistsException {}
pub mod layer_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LayerAlreadyExistsException {
crate::error::LayerAlreadyExistsException {
message: self.message,
}
}
}
}
impl LayerAlreadyExistsException {
pub fn builder() -> crate::error::layer_already_exists_exception::Builder {
crate::error::layer_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidLayerException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidLayerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidLayerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidLayerException")?;
if let Some(inner_32) = &self.message {
{
write!(f, ": {}", inner_32)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidLayerException {}
pub mod invalid_layer_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidLayerException {
crate::error::InvalidLayerException {
message: self.message,
}
}
}
}
impl InvalidLayerException {
pub fn builder() -> crate::error::invalid_layer_exception::Builder {
crate::error::invalid_layer_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmptyUploadException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EmptyUploadException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EmptyUploadException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EmptyUploadException")?;
if let Some(inner_33) = &self.message {
{
write!(f, ": {}", inner_33)?;
}
}
Ok(())
}
}
impl std::error::Error for EmptyUploadException {}
pub mod empty_upload_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::EmptyUploadException {
crate::error::EmptyUploadException {
message: self.message,
}
}
}
}
impl EmptyUploadException {
pub fn builder() -> crate::error::empty_upload_exception::Builder {
crate::error::empty_upload_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetRepositoryScanningConfigurationError {
pub kind: BatchGetRepositoryScanningConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for BatchGetRepositoryScanningConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetRepositoryScanningConfigurationErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetRepositoryScanningConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetRepositoryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
BatchGetRepositoryScanningConfigurationErrorKind::RepositoryNotFoundException(
_inner,
) => _inner.fmt(f),
BatchGetRepositoryScanningConfigurationErrorKind::ServerException(_inner) => {
_inner.fmt(f)
}
BatchGetRepositoryScanningConfigurationErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetRepositoryScanningConfigurationError {
fn code(&self) -> Option<&str> {
BatchGetRepositoryScanningConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetRepositoryScanningConfigurationError {
pub fn new(
kind: BatchGetRepositoryScanningConfigurationErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetRepositoryScanningConfigurationErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetRepositoryScanningConfigurationErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetRepositoryScanningConfigurationErrorKind::ServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetRepositoryScanningConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchGetRepositoryScanningConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetRepositoryScanningConfigurationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
BatchGetRepositoryScanningConfigurationErrorKind::RepositoryNotFoundException(
_inner,
) => Some(_inner),
BatchGetRepositoryScanningConfigurationErrorKind::ServerException(_inner) => {
Some(_inner)
}
BatchGetRepositoryScanningConfigurationErrorKind::ValidationException(_inner) => {
Some(_inner)
}
BatchGetRepositoryScanningConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetImageError {
pub kind: BatchGetImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetImageErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetImageErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
BatchGetImageErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
BatchGetImageErrorKind::ServerException(_inner) => _inner.fmt(f),
BatchGetImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetImageError {
fn code(&self) -> Option<&str> {
BatchGetImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetImageError {
pub fn new(kind: BatchGetImageErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchGetImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetImageErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetImageErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, BatchGetImageErrorKind::ServerException(_))
}
}
impl std::error::Error for BatchGetImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetImageErrorKind::InvalidParameterException(_inner) => Some(_inner),
BatchGetImageErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
BatchGetImageErrorKind::ServerException(_inner) => Some(_inner),
BatchGetImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDeleteImageError {
pub kind: BatchDeleteImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchDeleteImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDeleteImageErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDeleteImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDeleteImageErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
BatchDeleteImageErrorKind::RepositoryNotFoundException(_inner) => _inner.fmt(f),
BatchDeleteImageErrorKind::ServerException(_inner) => _inner.fmt(f),
BatchDeleteImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchDeleteImageError {
fn code(&self) -> Option<&str> {
BatchDeleteImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchDeleteImageError {
pub fn new(kind: BatchDeleteImageErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchDeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteImageErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteImageErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(&self.kind, BatchDeleteImageErrorKind::ServerException(_))
}
}
impl std::error::Error for BatchDeleteImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDeleteImageErrorKind::InvalidParameterException(_inner) => Some(_inner),
BatchDeleteImageErrorKind::RepositoryNotFoundException(_inner) => Some(_inner),
BatchDeleteImageErrorKind::ServerException(_inner) => Some(_inner),
BatchDeleteImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchCheckLayerAvailabilityError {
pub kind: BatchCheckLayerAvailabilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchCheckLayerAvailabilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchCheckLayerAvailabilityErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchCheckLayerAvailabilityErrorKind {
InvalidParameterException(crate::error::InvalidParameterException),
RepositoryNotFoundException(crate::error::RepositoryNotFoundException),
ServerException(crate::error::ServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchCheckLayerAvailabilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchCheckLayerAvailabilityErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
BatchCheckLayerAvailabilityErrorKind::RepositoryNotFoundException(_inner) => {
_inner.fmt(f)
}
BatchCheckLayerAvailabilityErrorKind::ServerException(_inner) => _inner.fmt(f),
BatchCheckLayerAvailabilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchCheckLayerAvailabilityError {
fn code(&self) -> Option<&str> {
BatchCheckLayerAvailabilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchCheckLayerAvailabilityError {
pub fn new(kind: BatchCheckLayerAvailabilityErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchCheckLayerAvailabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchCheckLayerAvailabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
BatchCheckLayerAvailabilityErrorKind::InvalidParameterException(_)
)
}
pub fn is_repository_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchCheckLayerAvailabilityErrorKind::RepositoryNotFoundException(_)
)
}
pub fn is_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchCheckLayerAvailabilityErrorKind::ServerException(_)
)
}
}
impl std::error::Error for BatchCheckLayerAvailabilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchCheckLayerAvailabilityErrorKind::InvalidParameterException(_inner) => Some(_inner),
BatchCheckLayerAvailabilityErrorKind::RepositoryNotFoundException(_inner) => {
Some(_inner)
}
BatchCheckLayerAvailabilityErrorKind::ServerException(_inner) => Some(_inner),
BatchCheckLayerAvailabilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}