#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateInfrastructureConfigurationError {
pub kind: UpdateInfrastructureConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateInfrastructureConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateInfrastructureConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateInfrastructureConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
UpdateInfrastructureConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => _inner.fmt(f),
UpdateInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
UpdateInfrastructureConfigurationErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
UpdateInfrastructureConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
UpdateInfrastructureConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateInfrastructureConfigurationError {
fn code(&self) -> Option<&str> {
UpdateInfrastructureConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateInfrastructureConfigurationError {
pub fn new(
kind: UpdateInfrastructureConfigurationErrorKind,
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: UpdateInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateInfrastructureConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for UpdateInfrastructureConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
UpdateInfrastructureConfigurationErrorKind::ClientException(_inner) => Some(_inner),
UpdateInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => Some(_inner),
UpdateInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
UpdateInfrastructureConfigurationErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
UpdateInfrastructureConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
UpdateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
UpdateInfrastructureConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_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::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceException {}
pub mod service_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::ServiceException {
crate::error::ServiceException {
message: self.message,
}
}
}
}
impl ServiceException {
pub fn builder() -> crate::error::service_exception::Builder {
crate::error::service_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceInUseException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseException {}
pub mod resource_in_use_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::ResourceInUseException {
crate::error::ResourceInUseException {
message: self.message,
}
}
}
}
impl ResourceInUseException {
pub fn builder() -> crate::error::resource_in_use_exception::Builder {
crate::error::resource_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_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::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IdempotentParameterMismatchException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IdempotentParameterMismatchException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IdempotentParameterMismatchException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IdempotentParameterMismatchException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for IdempotentParameterMismatchException {}
pub mod idempotent_parameter_mismatch_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::IdempotentParameterMismatchException {
crate::error::IdempotentParameterMismatchException {
message: self.message,
}
}
}
}
impl IdempotentParameterMismatchException {
pub fn builder() -> crate::error::idempotent_parameter_mismatch_exception::Builder {
crate::error::idempotent_parameter_mismatch_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ForbiddenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ForbiddenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ForbiddenException {}
pub mod forbidden_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::ForbiddenException {
crate::error::ForbiddenException {
message: self.message,
}
}
}
}
impl ForbiddenException {
pub fn builder() -> crate::error::forbidden_exception::Builder {
crate::error::forbidden_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ClientException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ClientException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ClientException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ClientException {}
pub mod client_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::ClientException {
crate::error::ClientException {
message: self.message,
}
}
}
}
impl ClientException {
pub fn builder() -> crate::error::client_exception::Builder {
crate::error::client_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CallRateLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CallRateLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CallRateLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CallRateLimitExceededException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for CallRateLimitExceededException {}
pub mod call_rate_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 {
#[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::CallRateLimitExceededException {
crate::error::CallRateLimitExceededException {
message: self.message,
}
}
}
}
impl CallRateLimitExceededException {
pub fn builder() -> crate::error::call_rate_limit_exceeded_exception::Builder {
crate::error::call_rate_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateImagePipelineError {
pub kind: UpdateImagePipelineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateImagePipelineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateImagePipelineErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateImagePipelineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateImagePipelineErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
UpdateImagePipelineErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateImagePipelineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateImagePipelineError {
fn code(&self) -> Option<&str> {
UpdateImagePipelineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateImagePipelineError {
pub fn new(kind: UpdateImagePipelineErrorKind, 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: UpdateImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateImagePipelineErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, UpdateImagePipelineErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePipelineErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for UpdateImagePipelineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateImagePipelineErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::ClientException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
UpdateImagePipelineErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::ServiceException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateImagePipelineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDistributionConfigurationError {
pub kind: UpdateDistributionConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDistributionConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDistributionConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDistributionConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
UpdateDistributionConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateDistributionConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => _inner.fmt(f),
UpdateDistributionConfigurationErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
UpdateDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
UpdateDistributionConfigurationErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
UpdateDistributionConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
UpdateDistributionConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDistributionConfigurationError {
fn code(&self) -> Option<&str> {
UpdateDistributionConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDistributionConfigurationError {
pub fn new(
kind: UpdateDistributionConfigurationErrorKind,
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: UpdateDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDistributionConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDistributionConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for UpdateDistributionConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
UpdateDistributionConfigurationErrorKind::ClientException(_inner) => Some(_inner),
UpdateDistributionConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => Some(_inner),
UpdateDistributionConfigurationErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
UpdateDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
UpdateDistributionConfigurationErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
UpdateDistributionConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
UpdateDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
UpdateDistributionConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterCombinationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterCombinationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterCombinationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterCombinationException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterCombinationException {}
pub mod invalid_parameter_combination_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::InvalidParameterCombinationException {
crate::error::InvalidParameterCombinationException {
message: self.message,
}
}
}
}
impl InvalidParameterCombinationException {
pub fn builder() -> crate::error::invalid_parameter_combination_exception::Builder {
crate::error::invalid_parameter_combination_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),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
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::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ServiceException(_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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ServiceException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ServiceException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_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::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterException {
#[allow(missing_docs)] #[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_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
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 {
#[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::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::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),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
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::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceException(_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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ServiceException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartImagePipelineExecutionError {
pub kind: StartImagePipelineExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartImagePipelineExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartImagePipelineExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartImagePipelineExecutionErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartImagePipelineExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartImagePipelineExecutionErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
StartImagePipelineExecutionErrorKind::ClientException(_inner) => _inner.fmt(f),
StartImagePipelineExecutionErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
StartImagePipelineExecutionErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
StartImagePipelineExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartImagePipelineExecutionErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
StartImagePipelineExecutionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
StartImagePipelineExecutionErrorKind::ServiceException(_inner) => _inner.fmt(f),
StartImagePipelineExecutionErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
StartImagePipelineExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartImagePipelineExecutionError {
fn code(&self) -> Option<&str> {
StartImagePipelineExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartImagePipelineExecutionError {
pub fn new(kind: StartImagePipelineExecutionErrorKind, 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: StartImagePipelineExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartImagePipelineExecutionErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartImagePipelineExecutionErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for StartImagePipelineExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartImagePipelineExecutionErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
StartImagePipelineExecutionErrorKind::ClientException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::ForbiddenException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
StartImagePipelineExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::ResourceInUseException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::ServiceException(_inner) => Some(_inner),
StartImagePipelineExecutionErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
StartImagePipelineExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutImageRecipePolicyError {
pub kind: PutImageRecipePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutImageRecipePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutImageRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutImageRecipePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutImageRecipePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutImageRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::ClientException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutImageRecipePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutImageRecipePolicyError {
fn code(&self) -> Option<&str> {
PutImageRecipePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutImageRecipePolicyError {
pub fn new(kind: PutImageRecipePolicyErrorKind, 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: PutImageRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutImageRecipePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutImageRecipePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutImageRecipePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutImageRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::ClientException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::ServiceException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutImageRecipePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterValueException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterValueException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValueException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValueException {}
pub mod invalid_parameter_value_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::InvalidParameterValueException {
crate::error::InvalidParameterValueException {
message: self.message,
}
}
}
}
impl InvalidParameterValueException {
pub fn builder() -> crate::error::invalid_parameter_value_exception::Builder {
crate::error::invalid_parameter_value_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutImagePolicyError {
pub kind: PutImagePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutImagePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutImagePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutImagePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutImagePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutImagePolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::ClientException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutImagePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutImagePolicyError {
fn code(&self) -> Option<&str> {
PutImagePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutImagePolicyError {
pub fn new(kind: PutImagePolicyErrorKind, 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: PutImagePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutImagePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutImagePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, PutImagePolicyErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, PutImagePolicyErrorKind::ForbiddenException(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutImagePolicyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutImagePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutImagePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, PutImagePolicyErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutImagePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutImagePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutImagePolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
PutImagePolicyErrorKind::ClientException(_inner) => Some(_inner),
PutImagePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
PutImagePolicyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutImagePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutImagePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutImagePolicyErrorKind::ServiceException(_inner) => Some(_inner),
PutImagePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutImagePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutContainerRecipePolicyError {
pub kind: PutContainerRecipePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutContainerRecipePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutContainerRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutContainerRecipePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutContainerRecipePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutContainerRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
PutContainerRecipePolicyErrorKind::ClientException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
PutContainerRecipePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutContainerRecipePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutContainerRecipePolicyError {
fn code(&self) -> Option<&str> {
PutContainerRecipePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutContainerRecipePolicyError {
pub fn new(kind: PutContainerRecipePolicyErrorKind, 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: PutContainerRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutContainerRecipePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutContainerRecipePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutContainerRecipePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutContainerRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
PutContainerRecipePolicyErrorKind::ClientException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
PutContainerRecipePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::ServiceException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutContainerRecipePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutComponentPolicyError {
pub kind: PutComponentPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutComponentPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutComponentPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutComponentPolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutComponentPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutComponentPolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::ClientException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutComponentPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutComponentPolicyError {
fn code(&self) -> Option<&str> {
PutComponentPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutComponentPolicyError {
pub fn new(kind: PutComponentPolicyErrorKind, 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: PutComponentPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutComponentPolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, PutComponentPolicyErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, PutComponentPolicyErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutComponentPolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutComponentPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutComponentPolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::ClientException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::ServiceException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutComponentPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
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::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ServiceException(_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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ServiceException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListInfrastructureConfigurationsError {
pub kind: ListInfrastructureConfigurationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListInfrastructureConfigurationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListInfrastructureConfigurationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListInfrastructureConfigurationsErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListInfrastructureConfigurationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListInfrastructureConfigurationsErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
ListInfrastructureConfigurationsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListInfrastructureConfigurationsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListInfrastructureConfigurationsErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListInfrastructureConfigurationsErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
ListInfrastructureConfigurationsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListInfrastructureConfigurationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListInfrastructureConfigurationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListInfrastructureConfigurationsError {
fn code(&self) -> Option<&str> {
ListInfrastructureConfigurationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListInfrastructureConfigurationsError {
pub fn new(
kind: ListInfrastructureConfigurationsErrorKind,
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: ListInfrastructureConfigurationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListInfrastructureConfigurationsErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListInfrastructureConfigurationsErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListInfrastructureConfigurationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListInfrastructureConfigurationsErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
ListInfrastructureConfigurationsErrorKind::ClientException(_inner) => Some(_inner),
ListInfrastructureConfigurationsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListInfrastructureConfigurationsErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListInfrastructureConfigurationsErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
ListInfrastructureConfigurationsErrorKind::ServiceException(_inner) => Some(_inner),
ListInfrastructureConfigurationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ListInfrastructureConfigurationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPaginationTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPaginationTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPaginationTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPaginationTokenException")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPaginationTokenException {}
pub mod invalid_pagination_token_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::InvalidPaginationTokenException {
crate::error::InvalidPaginationTokenException {
message: self.message,
}
}
}
}
impl InvalidPaginationTokenException {
pub fn builder() -> crate::error::invalid_pagination_token_exception::Builder {
crate::error::invalid_pagination_token_exception::Builder::default()
}
}
#[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 {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
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::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListImagesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImagesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImagesErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListImagesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImagesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImagesErrorKind::ServiceUnavailableException(_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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImagesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListImagesErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListImagesErrorKind::ForbiddenException(_))
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImagesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, ListImagesErrorKind::InvalidRequestException(_))
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListImagesErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImagesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImagesErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListImagesErrorKind::ClientException(_inner) => Some(_inner),
ListImagesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImagesErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListImagesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImagesErrorKind::ServiceException(_inner) => Some(_inner),
ListImagesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImageRecipesError {
pub kind: ListImageRecipesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImageRecipesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImageRecipesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImageRecipesErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImageRecipesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImageRecipesErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListImageRecipesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImageRecipesError {
fn code(&self) -> Option<&str> {
ListImageRecipesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImageRecipesError {
pub fn new(kind: ListImageRecipesErrorKind, 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: ListImageRecipesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImageRecipesErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImageRecipesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListImageRecipesErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListImageRecipesErrorKind::ForbiddenException(_))
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImageRecipesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListImageRecipesErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListImageRecipesErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImageRecipesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImageRecipesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImageRecipesErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListImageRecipesErrorKind::ClientException(_inner) => Some(_inner),
ListImageRecipesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImageRecipesErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListImageRecipesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImageRecipesErrorKind::ServiceException(_inner) => Some(_inner),
ListImageRecipesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImageRecipesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImagePipelinesError {
pub kind: ListImagePipelinesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImagePipelinesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImagePipelinesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImagePipelinesErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImagePipelinesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImagePipelinesErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListImagePipelinesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImagePipelinesError {
fn code(&self) -> Option<&str> {
ListImagePipelinesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImagePipelinesError {
pub fn new(kind: ListImagePipelinesErrorKind, 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: ListImagePipelinesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImagePipelinesErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelinesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListImagePipelinesErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelinesErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelinesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelinesErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListImagePipelinesErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelinesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImagePipelinesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImagePipelinesErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::ClientException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::ServiceException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImagePipelinesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImagePipelineImagesError {
pub kind: ListImagePipelineImagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImagePipelineImagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImagePipelineImagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImagePipelineImagesErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImagePipelineImagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImagePipelineImagesErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
ListImagePipelineImagesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListImagePipelineImagesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListImagePipelineImagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImagePipelineImagesError {
fn code(&self) -> Option<&str> {
ListImagePipelineImagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImagePipelineImagesError {
pub fn new(kind: ListImagePipelineImagesErrorKind, 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: ListImagePipelineImagesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImagePipelineImagesErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePipelineImagesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImagePipelineImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImagePipelineImagesErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
ListImagePipelineImagesErrorKind::ClientException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListImagePipelineImagesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::ServiceException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImagePipelineImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImagePackagesError {
pub kind: ListImagePackagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImagePackagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImagePackagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImagePackagesErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImagePackagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImagePackagesErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListImagePackagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImagePackagesError {
fn code(&self) -> Option<&str> {
ListImagePackagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImagePackagesError {
pub fn new(kind: ListImagePackagesErrorKind, 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: ListImagePackagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImagePackagesErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListImagePackagesErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListImagePackagesErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImagePackagesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImagePackagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImagePackagesErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListImagePackagesErrorKind::ClientException(_inner) => Some(_inner),
ListImagePackagesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImagePackagesErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListImagePackagesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImagePackagesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListImagePackagesErrorKind::ServiceException(_inner) => Some(_inner),
ListImagePackagesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImagePackagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListImageBuildVersionsError {
pub kind: ListImageBuildVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListImageBuildVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListImageBuildVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListImageBuildVersionsErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListImageBuildVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListImageBuildVersionsErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
ListImageBuildVersionsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListImageBuildVersionsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListImageBuildVersionsErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListImageBuildVersionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListImageBuildVersionsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListImageBuildVersionsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListImageBuildVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListImageBuildVersionsError {
fn code(&self) -> Option<&str> {
ListImageBuildVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListImageBuildVersionsError {
pub fn new(kind: ListImageBuildVersionsErrorKind, 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: ListImageBuildVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListImageBuildVersionsErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListImageBuildVersionsErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListImageBuildVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListImageBuildVersionsErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::ClientException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListImageBuildVersionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::ServiceException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListImageBuildVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDistributionConfigurationsError {
pub kind: ListDistributionConfigurationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDistributionConfigurationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDistributionConfigurationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDistributionConfigurationsErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDistributionConfigurationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDistributionConfigurationsErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
ListDistributionConfigurationsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListDistributionConfigurationsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListDistributionConfigurationsErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListDistributionConfigurationsErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
ListDistributionConfigurationsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListDistributionConfigurationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListDistributionConfigurationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDistributionConfigurationsError {
fn code(&self) -> Option<&str> {
ListDistributionConfigurationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDistributionConfigurationsError {
pub fn new(
kind: ListDistributionConfigurationsErrorKind,
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: ListDistributionConfigurationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDistributionConfigurationsErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListDistributionConfigurationsErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListDistributionConfigurationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDistributionConfigurationsErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
ListDistributionConfigurationsErrorKind::ClientException(_inner) => Some(_inner),
ListDistributionConfigurationsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListDistributionConfigurationsErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListDistributionConfigurationsErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
ListDistributionConfigurationsErrorKind::ServiceException(_inner) => Some(_inner),
ListDistributionConfigurationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ListDistributionConfigurationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListContainerRecipesError {
pub kind: ListContainerRecipesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListContainerRecipesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListContainerRecipesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListContainerRecipesErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListContainerRecipesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListContainerRecipesErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListContainerRecipesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListContainerRecipesError {
fn code(&self) -> Option<&str> {
ListContainerRecipesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListContainerRecipesError {
pub fn new(kind: ListContainerRecipesErrorKind, 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: ListContainerRecipesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListContainerRecipesErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListContainerRecipesErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListContainerRecipesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListContainerRecipesErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::ClientException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::ServiceException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListContainerRecipesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentsError {
pub kind: ListComponentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentsErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentsErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentsError {
fn code(&self) -> Option<&str> {
ListComponentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListComponentsError {
pub fn new(kind: ListComponentsErrorKind, 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: ListComponentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentsErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ForbiddenException(_))
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListComponentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentsErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ListComponentsErrorKind::ClientException(_inner) => Some(_inner),
ListComponentsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListComponentsErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListComponentsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListComponentsErrorKind::ServiceException(_inner) => Some(_inner),
ListComponentsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListComponentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentBuildVersionsError {
pub kind: ListComponentBuildVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentBuildVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentBuildVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentBuildVersionsErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentBuildVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentBuildVersionsErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
ListComponentBuildVersionsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListComponentBuildVersionsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListComponentBuildVersionsErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListComponentBuildVersionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListComponentBuildVersionsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListComponentBuildVersionsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListComponentBuildVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentBuildVersionsError {
fn code(&self) -> Option<&str> {
ListComponentBuildVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListComponentBuildVersionsError {
pub fn new(kind: ListComponentBuildVersionsErrorKind, 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: ListComponentBuildVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentBuildVersionsErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentBuildVersionsErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListComponentBuildVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentBuildVersionsErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
ListComponentBuildVersionsErrorKind::ClientException(_inner) => Some(_inner),
ListComponentBuildVersionsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListComponentBuildVersionsErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListComponentBuildVersionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListComponentBuildVersionsErrorKind::ServiceException(_inner) => Some(_inner),
ListComponentBuildVersionsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ListComponentBuildVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportVmImageError {
pub kind: ImportVmImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportVmImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportVmImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportVmImageErrorKind {
ClientException(crate::error::ClientException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportVmImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportVmImageErrorKind::ClientException(_inner) => _inner.fmt(f),
ImportVmImageErrorKind::ServiceException(_inner) => _inner.fmt(f),
ImportVmImageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ImportVmImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportVmImageError {
fn code(&self) -> Option<&str> {
ImportVmImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportVmImageError {
pub fn new(kind: ImportVmImageErrorKind, 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: ImportVmImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportVmImageErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, ImportVmImageErrorKind::ClientException(_))
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ImportVmImageErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ImportVmImageErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ImportVmImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportVmImageErrorKind::ClientException(_inner) => Some(_inner),
ImportVmImageErrorKind::ServiceException(_inner) => Some(_inner),
ImportVmImageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ImportVmImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportComponentError {
pub kind: ImportComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportComponentErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidVersionNumberException(crate::error::InvalidVersionNumberException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportComponentErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::ClientException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::InvalidVersionNumberException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::ServiceException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ImportComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportComponentError {
fn code(&self) -> Option<&str> {
ImportComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportComponentError {
pub fn new(kind: ImportComponentErrorKind, 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: ImportComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportComponentErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ImportComponentErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ImportComponentErrorKind::ForbiddenException(_))
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_version_number_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::InvalidVersionNumberException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ImportComponentErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ImportComponentErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ImportComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportComponentErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
ImportComponentErrorKind::ClientException(_inner) => Some(_inner),
ImportComponentErrorKind::ForbiddenException(_inner) => Some(_inner),
ImportComponentErrorKind::IdempotentParameterMismatchException(_inner) => Some(_inner),
ImportComponentErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
ImportComponentErrorKind::InvalidRequestException(_inner) => Some(_inner),
ImportComponentErrorKind::InvalidVersionNumberException(_inner) => Some(_inner),
ImportComponentErrorKind::ResourceInUseException(_inner) => Some(_inner),
ImportComponentErrorKind::ServiceException(_inner) => Some(_inner),
ImportComponentErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ImportComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidVersionNumberException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidVersionNumberException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidVersionNumberException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidVersionNumberException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidVersionNumberException {}
pub mod invalid_version_number_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::InvalidVersionNumberException {
crate::error::InvalidVersionNumberException {
message: self.message,
}
}
}
}
impl InvalidVersionNumberException {
pub fn builder() -> crate::error::invalid_version_number_exception::Builder {
crate::error::invalid_version_number_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInfrastructureConfigurationError {
pub kind: GetInfrastructureConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInfrastructureConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInfrastructureConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInfrastructureConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInfrastructureConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
GetInfrastructureConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
GetInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
GetInfrastructureConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetInfrastructureConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInfrastructureConfigurationError {
fn code(&self) -> Option<&str> {
GetInfrastructureConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInfrastructureConfigurationError {
pub fn new(
kind: GetInfrastructureConfigurationErrorKind,
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: GetInfrastructureConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInfrastructureConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetInfrastructureConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetInfrastructureConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
GetInfrastructureConfigurationErrorKind::ClientException(_inner) => Some(_inner),
GetInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
GetInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
GetInfrastructureConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
GetInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetInfrastructureConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetImageRecipePolicyError {
pub kind: GetImageRecipePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetImageRecipePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetImageRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetImageRecipePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetImageRecipePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetImageRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetImageRecipePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetImageRecipePolicyError {
fn code(&self) -> Option<&str> {
GetImageRecipePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetImageRecipePolicyError {
pub fn new(kind: GetImageRecipePolicyErrorKind, 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: GetImageRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetImageRecipePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetImageRecipePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetImageRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::ServiceException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetImageRecipePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetImageRecipeError {
pub kind: GetImageRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetImageRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetImageRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetImageRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetImageRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetImageRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetImageRecipeError {
fn code(&self) -> Option<&str> {
GetImageRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetImageRecipeError {
pub fn new(kind: GetImageRecipeErrorKind, 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: GetImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetImageRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, GetImageRecipeErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, GetImageRecipeErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetImageRecipeErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetImageRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetImageRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetImageRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetImageRecipeErrorKind::ClientException(_inner) => Some(_inner),
GetImageRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
GetImageRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetImageRecipeErrorKind::ServiceException(_inner) => Some(_inner),
GetImageRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetImageRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetImagePolicyError {
pub kind: GetImagePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetImagePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetImagePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetImagePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetImagePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetImagePolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetImagePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetImagePolicyError {
fn code(&self) -> Option<&str> {
GetImagePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetImagePolicyError {
pub fn new(kind: GetImagePolicyErrorKind, 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: GetImagePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetImagePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, GetImagePolicyErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetImagePolicyErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetImagePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetImagePolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetImagePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
GetImagePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetImagePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetImagePolicyErrorKind::ServiceException(_inner) => Some(_inner),
GetImagePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetImagePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetImagePipelineError {
pub kind: GetImagePipelineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetImagePipelineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetImagePipelineErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetImagePipelineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetImagePipelineErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::ClientException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetImagePipelineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetImagePipelineError {
fn code(&self) -> Option<&str> {
GetImagePipelineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetImagePipelineError {
pub fn new(kind: GetImagePipelineErrorKind, 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: GetImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetImagePipelineErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePipelineErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, GetImagePipelineErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, GetImagePipelineErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePipelineErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetImagePipelineErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetImagePipelineErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetImagePipelineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetImagePipelineErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetImagePipelineErrorKind::ClientException(_inner) => Some(_inner),
GetImagePipelineErrorKind::ForbiddenException(_inner) => Some(_inner),
GetImagePipelineErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetImagePipelineErrorKind::ServiceException(_inner) => Some(_inner),
GetImagePipelineErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetImagePipelineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetImageError {
pub kind: GetImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetImageErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetImageErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetImageErrorKind::ClientException(_inner) => _inner.fmt(f),
GetImageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetImageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetImageErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetImageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetImageError {
fn code(&self) -> Option<&str> {
GetImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetImageError {
pub fn new(kind: GetImageErrorKind, 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: GetImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetImageErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetImageErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, GetImageErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, GetImageErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetImageErrorKind::InvalidRequestException(_))
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetImageErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetImageErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetImageErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetImageErrorKind::ClientException(_inner) => Some(_inner),
GetImageErrorKind::ForbiddenException(_inner) => Some(_inner),
GetImageErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetImageErrorKind::ServiceException(_inner) => Some(_inner),
GetImageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDistributionConfigurationError {
pub kind: GetDistributionConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDistributionConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDistributionConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDistributionConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDistributionConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
GetDistributionConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
GetDistributionConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetDistributionConfigurationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetDistributionConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetDistributionConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDistributionConfigurationError {
fn code(&self) -> Option<&str> {
GetDistributionConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDistributionConfigurationError {
pub fn new(kind: GetDistributionConfigurationErrorKind, 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: GetDistributionConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDistributionConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetDistributionConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetDistributionConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
GetDistributionConfigurationErrorKind::ClientException(_inner) => Some(_inner),
GetDistributionConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
GetDistributionConfigurationErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetDistributionConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
GetDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetDistributionConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetContainerRecipePolicyError {
pub kind: GetContainerRecipePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetContainerRecipePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetContainerRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetContainerRecipePolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetContainerRecipePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetContainerRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
GetContainerRecipePolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetContainerRecipePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetContainerRecipePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetContainerRecipePolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetContainerRecipePolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetContainerRecipePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetContainerRecipePolicyError {
fn code(&self) -> Option<&str> {
GetContainerRecipePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetContainerRecipePolicyError {
pub fn new(kind: GetContainerRecipePolicyErrorKind, 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: GetContainerRecipePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetContainerRecipePolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipePolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetContainerRecipePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetContainerRecipePolicyErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
GetContainerRecipePolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
GetContainerRecipePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetContainerRecipePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetContainerRecipePolicyErrorKind::ServiceException(_inner) => Some(_inner),
GetContainerRecipePolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetContainerRecipePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetContainerRecipeError {
pub kind: GetContainerRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetContainerRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetContainerRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetContainerRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetContainerRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetContainerRecipeError {
fn code(&self) -> Option<&str> {
GetContainerRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetContainerRecipeError {
pub fn new(kind: GetContainerRecipeErrorKind, 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: GetContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetContainerRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, GetContainerRecipeErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipeErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetContainerRecipeErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetContainerRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetContainerRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::ClientException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::ServiceException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetContainerRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetComponentPolicyError {
pub kind: GetComponentPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetComponentPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetComponentPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetComponentPolicyErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetComponentPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetComponentPolicyErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetComponentPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetComponentPolicyError {
fn code(&self) -> Option<&str> {
GetComponentPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetComponentPolicyError {
pub fn new(kind: GetComponentPolicyErrorKind, 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: GetComponentPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetComponentPolicyErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentPolicyErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentPolicyErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetComponentPolicyErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentPolicyErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetComponentPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetComponentPolicyErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::ForbiddenException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::ServiceException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetComponentPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetComponentError {
pub kind: GetComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetComponentErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetComponentErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ClientException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetComponentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetComponentError {
fn code(&self) -> Option<&str> {
GetComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetComponentError {
pub fn new(kind: GetComponentErrorKind, 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: GetComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetComponentErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for GetComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetComponentErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
GetComponentErrorKind::ClientException(_inner) => Some(_inner),
GetComponentErrorKind::ForbiddenException(_inner) => Some(_inner),
GetComponentErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetComponentErrorKind::ServiceException(_inner) => Some(_inner),
GetComponentErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInfrastructureConfigurationError {
pub kind: DeleteInfrastructureConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteInfrastructureConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInfrastructureConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInfrastructureConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
DeleteInfrastructureConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DeleteInfrastructureConfigurationErrorKind::ResourceDependencyException(_inner) => {
_inner.fmt(f)
}
DeleteInfrastructureConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DeleteInfrastructureConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInfrastructureConfigurationError {
fn code(&self) -> Option<&str> {
DeleteInfrastructureConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteInfrastructureConfigurationError {
pub fn new(
kind: DeleteInfrastructureConfigurationErrorKind,
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: DeleteInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInfrastructureConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInfrastructureConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteInfrastructureConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
DeleteInfrastructureConfigurationErrorKind::ClientException(_inner) => Some(_inner),
DeleteInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
DeleteInfrastructureConfigurationErrorKind::ResourceDependencyException(_inner) => {
Some(_inner)
}
DeleteInfrastructureConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
DeleteInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DeleteInfrastructureConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceDependencyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceDependencyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceDependencyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceDependencyException")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceDependencyException {}
pub mod resource_dependency_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::ResourceDependencyException {
crate::error::ResourceDependencyException {
message: self.message,
}
}
}
}
impl ResourceDependencyException {
pub fn builder() -> crate::error::resource_dependency_exception::Builder {
crate::error::resource_dependency_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImageRecipeError {
pub kind: DeleteImageRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImageRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImageRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImageRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImageRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::ResourceDependencyException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteImageRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImageRecipeError {
fn code(&self) -> Option<&str> {
DeleteImageRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImageRecipeError {
pub fn new(kind: DeleteImageRecipeErrorKind, 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: DeleteImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImageRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DeleteImageRecipeErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageRecipeErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageRecipeErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteImageRecipeErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteImageRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImageRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::ClientException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::ResourceDependencyException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::ServiceException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteImageRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImagePipelineError {
pub kind: DeleteImagePipelineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImagePipelineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImagePipelineErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImagePipelineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImagePipelineErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::ResourceDependencyException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteImagePipelineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImagePipelineError {
fn code(&self) -> Option<&str> {
DeleteImagePipelineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImagePipelineError {
pub fn new(kind: DeleteImagePipelineErrorKind, 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: DeleteImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImagePipelineErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DeleteImagePipelineErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePipelineErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteImagePipelineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImagePipelineErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::ClientException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::ResourceDependencyException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::ServiceException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteImagePipelineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImageError {
pub kind: DeleteImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImageErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImageErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ResourceDependencyException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImageError {
fn code(&self) -> Option<&str> {
DeleteImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImageError {
pub fn new(kind: DeleteImageErrorKind, 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: DeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImageErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DeleteImageErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DeleteImageErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, DeleteImageErrorKind::InvalidRequestException(_))
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteImageErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImageErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
DeleteImageErrorKind::ClientException(_inner) => Some(_inner),
DeleteImageErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteImageErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteImageErrorKind::ResourceDependencyException(_inner) => Some(_inner),
DeleteImageErrorKind::ServiceException(_inner) => Some(_inner),
DeleteImageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDistributionConfigurationError {
pub kind: DeleteDistributionConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDistributionConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDistributionConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDistributionConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
DeleteDistributionConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteDistributionConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DeleteDistributionConfigurationErrorKind::ResourceDependencyException(_inner) => {
_inner.fmt(f)
}
DeleteDistributionConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DeleteDistributionConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDistributionConfigurationError {
fn code(&self) -> Option<&str> {
DeleteDistributionConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDistributionConfigurationError {
pub fn new(
kind: DeleteDistributionConfigurationErrorKind,
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: DeleteDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDistributionConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDistributionConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteDistributionConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
DeleteDistributionConfigurationErrorKind::ClientException(_inner) => Some(_inner),
DeleteDistributionConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
DeleteDistributionConfigurationErrorKind::ResourceDependencyException(_inner) => {
Some(_inner)
}
DeleteDistributionConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
DeleteDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DeleteDistributionConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteContainerRecipeError {
pub kind: DeleteContainerRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteContainerRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteContainerRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteContainerRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::ResourceDependencyException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteContainerRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteContainerRecipeError {
fn code(&self) -> Option<&str> {
DeleteContainerRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteContainerRecipeError {
pub fn new(kind: DeleteContainerRecipeErrorKind, 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: DeleteContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteContainerRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::ForbiddenException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContainerRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteContainerRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::ClientException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::ResourceDependencyException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::ServiceException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteContainerRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteComponentError {
pub kind: DeleteComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteComponentErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceDependencyException(crate::error::ResourceDependencyException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteComponentErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ResourceDependencyException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteComponentError {
fn code(&self) -> Option<&str> {
DeleteComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteComponentError {
pub fn new(kind: DeleteComponentErrorKind, 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: DeleteComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteComponentErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ForbiddenException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::ResourceDependencyException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ServiceException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for DeleteComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteComponentErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
DeleteComponentErrorKind::ClientException(_inner) => Some(_inner),
DeleteComponentErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteComponentErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteComponentErrorKind::ResourceDependencyException(_inner) => Some(_inner),
DeleteComponentErrorKind::ServiceException(_inner) => Some(_inner),
DeleteComponentErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateInfrastructureConfigurationError {
pub kind: CreateInfrastructureConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateInfrastructureConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateInfrastructureConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateInfrastructureConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => _inner.fmt(f),
CreateInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateInfrastructureConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
CreateInfrastructureConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateInfrastructureConfigurationError {
fn code(&self) -> Option<&str> {
CreateInfrastructureConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateInfrastructureConfigurationError {
pub fn new(
kind: CreateInfrastructureConfigurationErrorKind,
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: CreateInfrastructureConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateInfrastructureConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateInfrastructureConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateInfrastructureConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::ClientException(_inner) => Some(_inner),
CreateInfrastructureConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateInfrastructureConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => Some(_inner),
CreateInfrastructureConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
CreateInfrastructureConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
CreateInfrastructureConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_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 {
#[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::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceAlreadyExistsException")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceAlreadyExistsException {}
pub mod resource_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::ResourceAlreadyExistsException {
crate::error::ResourceAlreadyExistsException {
message: self.message,
}
}
}
}
impl ResourceAlreadyExistsException {
pub fn builder() -> crate::error::resource_already_exists_exception::Builder {
crate::error::resource_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateImageRecipeError {
pub kind: CreateImageRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateImageRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateImageRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidVersionNumberException(crate::error::InvalidVersionNumberException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateImageRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateImageRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateImageRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::InvalidVersionNumberException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateImageRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateImageRecipeError {
fn code(&self) -> Option<&str> {
CreateImageRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateImageRecipeError {
pub fn new(kind: CreateImageRecipeErrorKind, 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: CreateImageRecipeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateImageRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateImageRecipeErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_version_number_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::InvalidVersionNumberException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateImageRecipeErrorKind::ServiceException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateImageRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateImageRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ClientException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateImageRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::InvalidVersionNumberException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ServiceException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateImageRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateImagePipelineError {
pub kind: CreateImagePipelineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateImagePipelineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateImagePipelineErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateImagePipelineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateImagePipelineErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateImagePipelineErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateImagePipelineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateImagePipelineError {
fn code(&self) -> Option<&str> {
CreateImagePipelineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateImagePipelineError {
pub fn new(kind: CreateImagePipelineErrorKind, 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: CreateImagePipelineErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateImagePipelineErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateImagePipelineErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ServiceException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateImagePipelineErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateImagePipelineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateImagePipelineErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ClientException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateImagePipelineErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ServiceException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateImagePipelineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateImageError {
pub kind: CreateImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateImageErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateImageErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateImageErrorKind::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
CreateImageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateImageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateImageError {
fn code(&self) -> Option<&str> {
CreateImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateImageError {
pub fn new(kind: CreateImageErrorKind, 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: CreateImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateImageErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateImageErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, CreateImageErrorKind::ForbiddenException(_))
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, CreateImageErrorKind::InvalidRequestException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, CreateImageErrorKind::ResourceInUseException(_))
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateImageErrorKind::ServiceException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateImageErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CreateImageErrorKind::ClientException(_inner) => Some(_inner),
CreateImageErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateImageErrorKind::IdempotentParameterMismatchException(_inner) => Some(_inner),
CreateImageErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateImageErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateImageErrorKind::ServiceException(_inner) => Some(_inner),
CreateImageErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateImageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDistributionConfigurationError {
pub kind: CreateDistributionConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDistributionConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDistributionConfigurationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDistributionConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateDistributionConfigurationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => _inner.fmt(f),
CreateDistributionConfigurationErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
CreateDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateDistributionConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
CreateDistributionConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDistributionConfigurationError {
fn code(&self) -> Option<&str> {
CreateDistributionConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDistributionConfigurationError {
pub fn new(
kind: CreateDistributionConfigurationErrorKind,
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: CreateDistributionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDistributionConfigurationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ServiceException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateDistributionConfigurationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateDistributionConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDistributionConfigurationErrorKind::CallRateLimitExceededException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::ClientException(_inner) => Some(_inner),
CreateDistributionConfigurationErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateDistributionConfigurationErrorKind::IdempotentParameterMismatchException(
_inner,
) => Some(_inner),
CreateDistributionConfigurationErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
CreateDistributionConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::ServiceException(_inner) => Some(_inner),
CreateDistributionConfigurationErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
CreateDistributionConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateContainerRecipeError {
pub kind: CreateContainerRecipeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateContainerRecipeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateContainerRecipeErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidVersionNumberException(crate::error::InvalidVersionNumberException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateContainerRecipeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateContainerRecipeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::InvalidVersionNumberException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateContainerRecipeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateContainerRecipeError {
fn code(&self) -> Option<&str> {
CreateContainerRecipeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateContainerRecipeError {
pub fn new(kind: CreateContainerRecipeErrorKind, 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: CreateContainerRecipeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateContainerRecipeErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ClientException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_version_number_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::InvalidVersionNumberException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ServiceException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateContainerRecipeErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateContainerRecipeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateContainerRecipeErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ClientException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateContainerRecipeErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::InvalidVersionNumberException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ServiceException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateContainerRecipeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateComponentError {
pub kind: CreateComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateComponentErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidVersionNumberException(crate::error::InvalidVersionNumberException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateComponentErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::InvalidVersionNumberException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateComponentError {
fn code(&self) -> Option<&str> {
CreateComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateComponentError {
pub fn new(kind: CreateComponentErrorKind, 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: CreateComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateComponentErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ForbiddenException(_))
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_version_number_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::InvalidVersionNumberException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ServiceException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CreateComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateComponentErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CreateComponentErrorKind::ClientException(_inner) => Some(_inner),
CreateComponentErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateComponentErrorKind::IdempotentParameterMismatchException(_inner) => Some(_inner),
CreateComponentErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateComponentErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateComponentErrorKind::InvalidVersionNumberException(_inner) => Some(_inner),
CreateComponentErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateComponentErrorKind::ServiceException(_inner) => Some(_inner),
CreateComponentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateComponentErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelImageCreationError {
pub kind: CancelImageCreationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelImageCreationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelImageCreationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelImageCreationErrorKind {
CallRateLimitExceededException(crate::error::CallRateLimitExceededException),
ClientException(crate::error::ClientException),
ForbiddenException(crate::error::ForbiddenException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceException(crate::error::ServiceException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelImageCreationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelImageCreationErrorKind::CallRateLimitExceededException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::ClientException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CancelImageCreationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::ServiceException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CancelImageCreationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelImageCreationError {
fn code(&self) -> Option<&str> {
CancelImageCreationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelImageCreationError {
pub fn new(kind: CancelImageCreationErrorKind, 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: CancelImageCreationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelImageCreationErrorKind::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_call_rate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::CallRateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CancelImageCreationErrorKind::ClientException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::ForbiddenException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::ServiceException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CancelImageCreationErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for CancelImageCreationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelImageCreationErrorKind::CallRateLimitExceededException(_inner) => Some(_inner),
CancelImageCreationErrorKind::ClientException(_inner) => Some(_inner),
CancelImageCreationErrorKind::ForbiddenException(_inner) => Some(_inner),
CancelImageCreationErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CancelImageCreationErrorKind::InvalidRequestException(_inner) => Some(_inner),
CancelImageCreationErrorKind::ResourceInUseException(_inner) => Some(_inner),
CancelImageCreationErrorKind::ServiceException(_inner) => Some(_inner),
CancelImageCreationErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CancelImageCreationErrorKind::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 _)
}
}