#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTemplateSyncConfigError {
pub kind: CreateTemplateSyncConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTemplateSyncConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTemplateSyncConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTemplateSyncConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateTemplateSyncConfigErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateTemplateSyncConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateTemplateSyncConfigErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateTemplateSyncConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateTemplateSyncConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateTemplateSyncConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTemplateSyncConfigError {
fn code(&self) -> Option<&str> {
CreateTemplateSyncConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateTemplateSyncConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateTemplateSyncConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateTemplateSyncConfigError {
pub fn new(kind: CreateTemplateSyncConfigErrorKind, 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: CreateTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTemplateSyncConfigErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateTemplateSyncConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateTemplateSyncConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateTemplateSyncConfigErrorKind::ConflictException(_inner) => Some(_inner),
CreateTemplateSyncConfigErrorKind::InternalServerException(_inner) => Some(_inner),
CreateTemplateSyncConfigErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateTemplateSyncConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateTemplateSyncConfigErrorKind::ValidationException(_inner) => Some(_inner),
CreateTemplateSyncConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ThrottlingException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl ThrottlingException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ThrottlingError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceQuotaExceededException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
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")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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 std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
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)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServerException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl InternalServerException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConflictException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccessDeniedException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTemplateSyncConfigError {
pub kind: DeleteTemplateSyncConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTemplateSyncConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTemplateSyncConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTemplateSyncConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteTemplateSyncConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTemplateSyncConfigError {
fn code(&self) -> Option<&str> {
DeleteTemplateSyncConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteTemplateSyncConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteTemplateSyncConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteTemplateSyncConfigError {
pub fn new(kind: DeleteTemplateSyncConfigErrorKind, 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: DeleteTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTemplateSyncConfigErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTemplateSyncConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteTemplateSyncConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::ConflictException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::ValidationException(_inner) => Some(_inner),
DeleteTemplateSyncConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
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")?;
write!(f, ": {}", "*** Sensitive Data Redacted ***")?;
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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 std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateTemplateSyncConfigError {
pub kind: UpdateTemplateSyncConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateTemplateSyncConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateTemplateSyncConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateTemplateSyncConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateTemplateSyncConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateTemplateSyncConfigError {
fn code(&self) -> Option<&str> {
UpdateTemplateSyncConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateTemplateSyncConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateTemplateSyncConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateTemplateSyncConfigError {
pub fn new(kind: UpdateTemplateSyncConfigErrorKind, 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: UpdateTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateTemplateSyncConfigErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTemplateSyncConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateTemplateSyncConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::ConflictException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::ValidationException(_inner) => Some(_inner),
UpdateTemplateSyncConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTemplateSyncConfigError {
pub kind: GetTemplateSyncConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTemplateSyncConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTemplateSyncConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTemplateSyncConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTemplateSyncConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTemplateSyncConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTemplateSyncConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTemplateSyncConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTemplateSyncConfigError {
fn code(&self) -> Option<&str> {
GetTemplateSyncConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetTemplateSyncConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetTemplateSyncConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetTemplateSyncConfigError {
pub fn new(kind: GetTemplateSyncConfigErrorKind, 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: GetTemplateSyncConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTemplateSyncConfigErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTemplateSyncConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTemplateSyncConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTemplateSyncConfigErrorKind::InternalServerException(_inner) => Some(_inner),
GetTemplateSyncConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTemplateSyncConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTemplateSyncConfigErrorKind::ValidationException(_inner) => Some(_inner),
GetTemplateSyncConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServiceTemplateVersionsError {
pub kind: ListServiceTemplateVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServiceTemplateVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServiceTemplateVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServiceTemplateVersionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServiceTemplateVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServiceTemplateVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServiceTemplateVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServiceTemplateVersionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListServiceTemplateVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServiceTemplateVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServiceTemplateVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServiceTemplateVersionsError {
fn code(&self) -> Option<&str> {
ListServiceTemplateVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServiceTemplateVersionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServiceTemplateVersionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServiceTemplateVersionsError {
pub fn new(kind: ListServiceTemplateVersionsErrorKind, 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: ListServiceTemplateVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServiceTemplateVersionsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplateVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplateVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplateVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplateVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplateVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServiceTemplateVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServiceTemplateVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServiceTemplateVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListServiceTemplateVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListServiceTemplateVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServiceTemplateVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListServiceTemplateVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateServiceTemplateVersionError {
pub kind: CreateServiceTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateServiceTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateServiceTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateServiceTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateServiceTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateServiceTemplateVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateServiceTemplateVersionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateServiceTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateServiceTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateServiceTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateServiceTemplateVersionError {
fn code(&self) -> Option<&str> {
CreateServiceTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateServiceTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateServiceTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateServiceTemplateVersionError {
pub fn new(kind: CreateServiceTemplateVersionErrorKind, 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: CreateServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateServiceTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateServiceTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateServiceTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
CreateServiceTemplateVersionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreateServiceTemplateVersionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateServiceTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateServiceTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
CreateServiceTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteServiceTemplateVersionError {
pub kind: DeleteServiceTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteServiceTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteServiceTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteServiceTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteServiceTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteServiceTemplateVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteServiceTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteServiceTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteServiceTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteServiceTemplateVersionError {
fn code(&self) -> Option<&str> {
DeleteServiceTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteServiceTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteServiceTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteServiceTemplateVersionError {
pub fn new(kind: DeleteServiceTemplateVersionErrorKind, 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: DeleteServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteServiceTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteServiceTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteServiceTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteServiceTemplateVersionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteServiceTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteServiceTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteServiceTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServiceTemplateVersionError {
pub kind: UpdateServiceTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateServiceTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServiceTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateServiceTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateServiceTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateServiceTemplateVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateServiceTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateServiceTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateServiceTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServiceTemplateVersionError {
fn code(&self) -> Option<&str> {
UpdateServiceTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateServiceTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateServiceTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateServiceTemplateVersionError {
pub fn new(kind: UpdateServiceTemplateVersionErrorKind, 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: UpdateServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServiceTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateServiceTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateServiceTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateServiceTemplateVersionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateServiceTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateServiceTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateServiceTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceTemplateVersionError {
pub kind: GetServiceTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetServiceTemplateVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetServiceTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetServiceTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetServiceTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceTemplateVersionError {
fn code(&self) -> Option<&str> {
GetServiceTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetServiceTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetServiceTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetServiceTemplateVersionError {
pub fn new(kind: GetServiceTemplateVersionErrorKind, 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: GetServiceTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetServiceTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceTemplateVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetServiceTemplateVersionErrorKind::InternalServerException(_inner) => Some(_inner),
GetServiceTemplateVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetServiceTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetServiceTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
GetServiceTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServiceTemplatesError {
pub kind: ListServiceTemplatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServiceTemplatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServiceTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServiceTemplatesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServiceTemplatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServiceTemplatesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServiceTemplatesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServiceTemplatesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServiceTemplatesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServiceTemplatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServiceTemplatesError {
fn code(&self) -> Option<&str> {
ListServiceTemplatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServiceTemplatesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServiceTemplatesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServiceTemplatesError {
pub fn new(kind: ListServiceTemplatesErrorKind, 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: ListServiceTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServiceTemplatesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplatesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplatesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplatesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceTemplatesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServiceTemplatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServiceTemplatesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServiceTemplatesErrorKind::InternalServerException(_inner) => Some(_inner),
ListServiceTemplatesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServiceTemplatesErrorKind::ValidationException(_inner) => Some(_inner),
ListServiceTemplatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateServiceTemplateError {
pub kind: CreateServiceTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateServiceTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateServiceTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateServiceTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateServiceTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateServiceTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateServiceTemplateError {
fn code(&self) -> Option<&str> {
CreateServiceTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateServiceTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateServiceTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateServiceTemplateError {
pub fn new(kind: CreateServiceTemplateErrorKind, 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: CreateServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateServiceTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateServiceTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateServiceTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::ConflictException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::ValidationException(_inner) => Some(_inner),
CreateServiceTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteServiceTemplateError {
pub kind: DeleteServiceTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteServiceTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteServiceTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteServiceTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteServiceTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteServiceTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteServiceTemplateError {
fn code(&self) -> Option<&str> {
DeleteServiceTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteServiceTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteServiceTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteServiceTemplateError {
pub fn new(kind: DeleteServiceTemplateErrorKind, 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: DeleteServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteServiceTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteServiceTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteServiceTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::ConflictException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::ValidationException(_inner) => Some(_inner),
DeleteServiceTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServiceTemplateError {
pub kind: UpdateServiceTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateServiceTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServiceTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateServiceTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServiceTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateServiceTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServiceTemplateError {
fn code(&self) -> Option<&str> {
UpdateServiceTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateServiceTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateServiceTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateServiceTemplateError {
pub fn new(kind: UpdateServiceTemplateErrorKind, 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: UpdateServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServiceTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateServiceTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServiceTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::ConflictException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::ValidationException(_inner) => Some(_inner),
UpdateServiceTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceTemplateError {
pub kind: GetServiceTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetServiceTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetServiceTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetServiceTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetServiceTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetServiceTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceTemplateError {
fn code(&self) -> Option<&str> {
GetServiceTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetServiceTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetServiceTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetServiceTemplateError {
pub fn new(kind: GetServiceTemplateErrorKind, 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: GetServiceTemplateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetServiceTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetServiceTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
GetServiceTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetServiceTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
GetServiceTemplateErrorKind::ValidationException(_inner) => Some(_inner),
GetServiceTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServicesError {
pub kind: ListServicesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServicesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServicesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServicesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServicesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServicesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServicesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServicesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServicesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServicesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServicesError {
fn code(&self) -> Option<&str> {
ListServicesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServicesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServicesErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListServicesError {
pub fn new(kind: ListServicesErrorKind, 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: ListServicesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServicesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListServicesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServicesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListServicesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListServicesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListServicesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServicesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServicesErrorKind::InternalServerException(_inner) => Some(_inner),
ListServicesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServicesErrorKind::ValidationException(_inner) => Some(_inner),
ListServicesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateServiceError {
pub kind: CreateServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateServiceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateServiceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateServiceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateServiceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateServiceError {
fn code(&self) -> Option<&str> {
CreateServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateServiceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateServiceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateServiceError {
pub fn new(kind: CreateServiceErrorKind, 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: CreateServiceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateServiceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateServiceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateServiceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateServiceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateServiceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateServiceErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateServiceErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateServiceErrorKind::ConflictException(_inner) => Some(_inner),
CreateServiceErrorKind::InternalServerException(_inner) => Some(_inner),
CreateServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateServiceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateServiceErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateServiceErrorKind::ValidationException(_inner) => Some(_inner),
CreateServiceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteServiceError {
pub kind: DeleteServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteServiceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteServiceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteServiceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteServiceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteServiceError {
fn code(&self) -> Option<&str> {
DeleteServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteServiceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteServiceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteServiceError {
pub fn new(kind: DeleteServiceErrorKind, 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: DeleteServiceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteServiceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteServiceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteServiceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteServiceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteServiceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteServiceErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteServiceErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteServiceErrorKind::ConflictException(_inner) => Some(_inner),
DeleteServiceErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteServiceErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteServiceErrorKind::ValidationException(_inner) => Some(_inner),
DeleteServiceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServiceError {
pub kind: UpdateServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateServiceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateServiceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServiceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServiceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServiceError {
fn code(&self) -> Option<&str> {
UpdateServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateServiceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateServiceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateServiceError {
pub fn new(kind: UpdateServiceErrorKind, 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: UpdateServiceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServiceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateServiceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateServiceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateServiceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateServiceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServiceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateServiceErrorKind::ConflictException(_inner) => Some(_inner),
UpdateServiceErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateServiceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
UpdateServiceErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateServiceErrorKind::ValidationException(_inner) => Some(_inner),
UpdateServiceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceError {
pub kind: GetServiceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetServiceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetServiceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetServiceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetServiceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetServiceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceError {
fn code(&self) -> Option<&str> {
GetServiceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetServiceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetServiceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetServiceError {
pub fn new(kind: GetServiceErrorKind, 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: GetServiceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetServiceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetServiceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetServiceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetServiceErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetServiceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetServiceErrorKind::InternalServerException(_inner) => Some(_inner),
GetServiceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetServiceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetServiceErrorKind::ValidationException(_inner) => Some(_inner),
GetServiceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServicePipelineError {
pub kind: UpdateServicePipelineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateServicePipelineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateServicePipelineErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServicePipelineErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateServicePipelineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServicePipelineErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateServicePipelineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServicePipelineError {
fn code(&self) -> Option<&str> {
UpdateServicePipelineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateServicePipelineErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateServicePipelineErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateServicePipelineError {
pub fn new(kind: UpdateServicePipelineErrorKind, 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: UpdateServicePipelineErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServicePipelineErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServicePipelineErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateServicePipelineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServicePipelineErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::ConflictException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::ValidationException(_inner) => Some(_inner),
UpdateServicePipelineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServicePipelineProvisionedResourcesError {
pub kind: ListServicePipelineProvisionedResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListServicePipelineProvisionedResourcesError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServicePipelineProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServicePipelineProvisionedResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServicePipelineProvisionedResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServicePipelineProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListServicePipelineProvisionedResourcesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListServicePipelineProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListServicePipelineProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListServicePipelineProvisionedResourcesErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListServicePipelineProvisionedResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServicePipelineProvisionedResourcesError {
fn code(&self) -> Option<&str> {
ListServicePipelineProvisionedResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServicePipelineProvisionedResourcesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServicePipelineProvisionedResourcesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServicePipelineProvisionedResourcesError {
pub fn new(
kind: ListServicePipelineProvisionedResourcesErrorKind,
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: ListServicePipelineProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServicePipelineProvisionedResourcesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineProvisionedResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineProvisionedResourcesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineProvisionedResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineProvisionedResourcesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineProvisionedResourcesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServicePipelineProvisionedResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServicePipelineProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListServicePipelineProvisionedResourcesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListServicePipelineProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListServicePipelineProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListServicePipelineProvisionedResourcesErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListServicePipelineProvisionedResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServicePipelineOutputsError {
pub kind: ListServicePipelineOutputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServicePipelineOutputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServicePipelineOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServicePipelineOutputsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServicePipelineOutputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServicePipelineOutputsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServicePipelineOutputsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServicePipelineOutputsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListServicePipelineOutputsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServicePipelineOutputsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServicePipelineOutputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServicePipelineOutputsError {
fn code(&self) -> Option<&str> {
ListServicePipelineOutputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServicePipelineOutputsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServicePipelineOutputsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServicePipelineOutputsError {
pub fn new(kind: ListServicePipelineOutputsErrorKind, 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: ListServicePipelineOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServicePipelineOutputsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineOutputsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineOutputsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineOutputsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineOutputsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServicePipelineOutputsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServicePipelineOutputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServicePipelineOutputsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServicePipelineOutputsErrorKind::InternalServerException(_inner) => Some(_inner),
ListServicePipelineOutputsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListServicePipelineOutputsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServicePipelineOutputsErrorKind::ValidationException(_inner) => Some(_inner),
ListServicePipelineOutputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServiceInstancesError {
pub kind: ListServiceInstancesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServiceInstancesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServiceInstancesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServiceInstancesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServiceInstancesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServiceInstancesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServiceInstancesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServiceInstancesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListServiceInstancesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServiceInstancesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServiceInstancesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServiceInstancesError {
fn code(&self) -> Option<&str> {
ListServiceInstancesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServiceInstancesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServiceInstancesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServiceInstancesError {
pub fn new(kind: ListServiceInstancesErrorKind, 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: ListServiceInstancesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServiceInstancesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstancesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstancesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstancesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstancesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstancesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServiceInstancesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServiceInstancesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServiceInstancesErrorKind::InternalServerException(_inner) => Some(_inner),
ListServiceInstancesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListServiceInstancesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServiceInstancesErrorKind::ValidationException(_inner) => Some(_inner),
ListServiceInstancesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateServiceInstanceError {
pub kind: UpdateServiceInstanceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateServiceInstanceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateServiceInstanceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateServiceInstanceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateServiceInstanceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateServiceInstanceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateServiceInstanceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateServiceInstanceError {
fn code(&self) -> Option<&str> {
UpdateServiceInstanceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateServiceInstanceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateServiceInstanceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateServiceInstanceError {
pub fn new(kind: UpdateServiceInstanceErrorKind, 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: UpdateServiceInstanceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateServiceInstanceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateServiceInstanceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateServiceInstanceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateServiceInstanceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::ConflictException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::ValidationException(_inner) => Some(_inner),
UpdateServiceInstanceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceInstanceError {
pub kind: GetServiceInstanceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceInstanceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceInstanceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceInstanceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceInstanceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceInstanceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetServiceInstanceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetServiceInstanceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetServiceInstanceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetServiceInstanceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetServiceInstanceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceInstanceError {
fn code(&self) -> Option<&str> {
GetServiceInstanceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetServiceInstanceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetServiceInstanceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetServiceInstanceError {
pub fn new(kind: GetServiceInstanceErrorKind, 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: GetServiceInstanceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceInstanceErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceInstanceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceInstanceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceInstanceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceInstanceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceInstanceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetServiceInstanceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceInstanceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetServiceInstanceErrorKind::InternalServerException(_inner) => Some(_inner),
GetServiceInstanceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetServiceInstanceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetServiceInstanceErrorKind::ValidationException(_inner) => Some(_inner),
GetServiceInstanceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServiceInstanceProvisionedResourcesError {
pub kind: ListServiceInstanceProvisionedResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListServiceInstanceProvisionedResourcesError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServiceInstanceProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServiceInstanceProvisionedResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServiceInstanceProvisionedResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServiceInstanceProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListServiceInstanceProvisionedResourcesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListServiceInstanceProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListServiceInstanceProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListServiceInstanceProvisionedResourcesErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListServiceInstanceProvisionedResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServiceInstanceProvisionedResourcesError {
fn code(&self) -> Option<&str> {
ListServiceInstanceProvisionedResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServiceInstanceProvisionedResourcesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServiceInstanceProvisionedResourcesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServiceInstanceProvisionedResourcesError {
pub fn new(
kind: ListServiceInstanceProvisionedResourcesErrorKind,
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: ListServiceInstanceProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServiceInstanceProvisionedResourcesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceProvisionedResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceProvisionedResourcesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceProvisionedResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceProvisionedResourcesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceProvisionedResourcesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServiceInstanceProvisionedResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServiceInstanceProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListServiceInstanceProvisionedResourcesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListServiceInstanceProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListServiceInstanceProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListServiceInstanceProvisionedResourcesErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListServiceInstanceProvisionedResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListServiceInstanceOutputsError {
pub kind: ListServiceInstanceOutputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListServiceInstanceOutputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListServiceInstanceOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListServiceInstanceOutputsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListServiceInstanceOutputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListServiceInstanceOutputsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListServiceInstanceOutputsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListServiceInstanceOutputsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListServiceInstanceOutputsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListServiceInstanceOutputsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListServiceInstanceOutputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListServiceInstanceOutputsError {
fn code(&self) -> Option<&str> {
ListServiceInstanceOutputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListServiceInstanceOutputsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListServiceInstanceOutputsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListServiceInstanceOutputsError {
pub fn new(kind: ListServiceInstanceOutputsErrorKind, 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: ListServiceInstanceOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListServiceInstanceOutputsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceOutputsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceOutputsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceOutputsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceOutputsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListServiceInstanceOutputsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListServiceInstanceOutputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListServiceInstanceOutputsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListServiceInstanceOutputsErrorKind::InternalServerException(_inner) => Some(_inner),
ListServiceInstanceOutputsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListServiceInstanceOutputsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListServiceInstanceOutputsErrorKind::ValidationException(_inner) => Some(_inner),
ListServiceInstanceOutputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListRepositoriesError {
pub kind: ListRepositoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListRepositoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListRepositoriesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListRepositoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListRepositoriesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListRepositoriesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListRepositoriesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListRepositoriesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListRepositoriesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListRepositoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListRepositoriesError {
fn code(&self) -> Option<&str> {
ListRepositoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListRepositoriesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListRepositoriesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListRepositoriesError {
pub fn new(kind: ListRepositoriesErrorKind, 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: ListRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListRepositoriesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositoriesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositoriesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositoriesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositoriesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositoriesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListRepositoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListRepositoriesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListRepositoriesErrorKind::InternalServerException(_inner) => Some(_inner),
ListRepositoriesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListRepositoriesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListRepositoriesErrorKind::ValidationException(_inner) => Some(_inner),
ListRepositoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRepositoryError {
pub kind: CreateRepositoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRepositoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRepositoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRepositoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateRepositoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRepositoryError {
fn code(&self) -> Option<&str> {
CreateRepositoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateRepositoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateRepositoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateRepositoryError {
pub fn new(kind: CreateRepositoryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateRepositoryErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateRepositoryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateRepositoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRepositoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateRepositoryErrorKind::ConflictException(_inner) => Some(_inner),
CreateRepositoryErrorKind::InternalServerException(_inner) => Some(_inner),
CreateRepositoryErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateRepositoryErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateRepositoryErrorKind::ValidationException(_inner) => Some(_inner),
CreateRepositoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRepositoryError {
pub kind: DeleteRepositoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRepositoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRepositoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRepositoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteRepositoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRepositoryError {
fn code(&self) -> Option<&str> {
DeleteRepositoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteRepositoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteRepositoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteRepositoryError {
pub fn new(kind: DeleteRepositoryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteRepositoryErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRepositoryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteRepositoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRepositoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::ConflictException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::ValidationException(_inner) => Some(_inner),
DeleteRepositoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRepositoryError {
pub kind: GetRepositoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRepositoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRepositoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRepositoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRepositoryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRepositoryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRepositoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRepositoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRepositoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRepositoryError {
fn code(&self) -> Option<&str> {
GetRepositoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetRepositoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetRepositoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetRepositoryError {
pub fn new(kind: GetRepositoryErrorKind, 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: GetRepositoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRepositoryErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetRepositoryErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositoryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetRepositoryErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetRepositoryErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetRepositoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRepositoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRepositoryErrorKind::InternalServerException(_inner) => Some(_inner),
GetRepositoryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRepositoryErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRepositoryErrorKind::ValidationException(_inner) => Some(_inner),
GetRepositoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentTemplateVersionsError {
pub kind: ListEnvironmentTemplateVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentTemplateVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentTemplateVersionsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentTemplateVersionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentTemplateVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentTemplateVersionsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentTemplateVersionsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentTemplateVersionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentTemplateVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEnvironmentTemplateVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEnvironmentTemplateVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentTemplateVersionsError {
fn code(&self) -> Option<&str> {
ListEnvironmentTemplateVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentTemplateVersionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentTemplateVersionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentTemplateVersionsError {
pub fn new(
kind: ListEnvironmentTemplateVersionsErrorKind,
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: ListEnvironmentTemplateVersionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentTemplateVersionsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplateVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplateVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplateVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplateVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplateVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentTemplateVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentTemplateVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEnvironmentTemplateVersionsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListEnvironmentTemplateVersionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListEnvironmentTemplateVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentTemplateVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentTemplateVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEnvironmentTemplateVersionError {
pub kind: CreateEnvironmentTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEnvironmentTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEnvironmentTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEnvironmentTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentTemplateVersionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEnvironmentTemplateVersionError {
fn code(&self) -> Option<&str> {
CreateEnvironmentTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateEnvironmentTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateEnvironmentTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateEnvironmentTemplateVersionError {
pub fn new(
kind: CreateEnvironmentTemplateVersionErrorKind,
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: CreateEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEnvironmentTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateEnvironmentTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
CreateEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
CreateEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
CreateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreateEnvironmentTemplateVersionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
CreateEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEnvironmentTemplateVersionError {
pub kind: DeleteEnvironmentTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEnvironmentTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEnvironmentTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEnvironmentTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEnvironmentTemplateVersionError {
fn code(&self) -> Option<&str> {
DeleteEnvironmentTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteEnvironmentTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteEnvironmentTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteEnvironmentTemplateVersionError {
pub fn new(
kind: DeleteEnvironmentTemplateVersionErrorKind,
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: DeleteEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEnvironmentTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEnvironmentTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEnvironmentTemplateVersionError {
pub kind: UpdateEnvironmentTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEnvironmentTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEnvironmentTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEnvironmentTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEnvironmentTemplateVersionError {
fn code(&self) -> Option<&str> {
UpdateEnvironmentTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateEnvironmentTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateEnvironmentTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateEnvironmentTemplateVersionError {
pub fn new(
kind: UpdateEnvironmentTemplateVersionErrorKind,
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: UpdateEnvironmentTemplateVersionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEnvironmentTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEnvironmentTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
UpdateEnvironmentTemplateVersionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
UpdateEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnvironmentTemplateVersionError {
pub kind: GetEnvironmentTemplateVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnvironmentTemplateVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnvironmentTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnvironmentTemplateVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnvironmentTemplateVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnvironmentTemplateVersionError {
fn code(&self) -> Option<&str> {
GetEnvironmentTemplateVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetEnvironmentTemplateVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetEnvironmentTemplateVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetEnvironmentTemplateVersionError {
pub fn new(
kind: GetEnvironmentTemplateVersionErrorKind,
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: GetEnvironmentTemplateVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnvironmentTemplateVersionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetEnvironmentTemplateVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnvironmentTemplateVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEnvironmentTemplateVersionErrorKind::InternalServerException(_inner) => Some(_inner),
GetEnvironmentTemplateVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetEnvironmentTemplateVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEnvironmentTemplateVersionErrorKind::ValidationException(_inner) => Some(_inner),
GetEnvironmentTemplateVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentTemplatesError {
pub kind: ListEnvironmentTemplatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentTemplatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentTemplatesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentTemplatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentTemplatesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEnvironmentTemplatesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEnvironmentTemplatesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEnvironmentTemplatesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEnvironmentTemplatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentTemplatesError {
fn code(&self) -> Option<&str> {
ListEnvironmentTemplatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentTemplatesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentTemplatesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentTemplatesError {
pub fn new(kind: ListEnvironmentTemplatesErrorKind, 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: ListEnvironmentTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentTemplatesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplatesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplatesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplatesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentTemplatesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentTemplatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentTemplatesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEnvironmentTemplatesErrorKind::InternalServerException(_inner) => Some(_inner),
ListEnvironmentTemplatesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentTemplatesErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentTemplatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEnvironmentTemplateError {
pub kind: CreateEnvironmentTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEnvironmentTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEnvironmentTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEnvironmentTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateEnvironmentTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEnvironmentTemplateError {
fn code(&self) -> Option<&str> {
CreateEnvironmentTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateEnvironmentTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateEnvironmentTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateEnvironmentTemplateError {
pub fn new(kind: CreateEnvironmentTemplateErrorKind, 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: CreateEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEnvironmentTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateEnvironmentTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateEnvironmentTemplateErrorKind::ConflictException(_inner) => Some(_inner),
CreateEnvironmentTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
CreateEnvironmentTemplateErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateEnvironmentTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateEnvironmentTemplateErrorKind::ValidationException(_inner) => Some(_inner),
CreateEnvironmentTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEnvironmentTemplateError {
pub kind: DeleteEnvironmentTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEnvironmentTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEnvironmentTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEnvironmentTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEnvironmentTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEnvironmentTemplateError {
fn code(&self) -> Option<&str> {
DeleteEnvironmentTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteEnvironmentTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteEnvironmentTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteEnvironmentTemplateError {
pub fn new(kind: DeleteEnvironmentTemplateErrorKind, 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: DeleteEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEnvironmentTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEnvironmentTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEnvironmentTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEnvironmentTemplateError {
pub kind: UpdateEnvironmentTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEnvironmentTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEnvironmentTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEnvironmentTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateEnvironmentTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEnvironmentTemplateError {
fn code(&self) -> Option<&str> {
UpdateEnvironmentTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateEnvironmentTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateEnvironmentTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateEnvironmentTemplateError {
pub fn new(kind: UpdateEnvironmentTemplateErrorKind, 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: UpdateEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEnvironmentTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEnvironmentTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEnvironmentTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnvironmentTemplateError {
pub kind: GetEnvironmentTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnvironmentTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnvironmentTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnvironmentTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEnvironmentTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnvironmentTemplateError {
fn code(&self) -> Option<&str> {
GetEnvironmentTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetEnvironmentTemplateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetEnvironmentTemplateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetEnvironmentTemplateError {
pub fn new(kind: GetEnvironmentTemplateErrorKind, 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: GetEnvironmentTemplateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnvironmentTemplateErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentTemplateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetEnvironmentTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnvironmentTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEnvironmentTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
GetEnvironmentTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEnvironmentTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEnvironmentTemplateErrorKind::ValidationException(_inner) => Some(_inner),
GetEnvironmentTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentsError {
pub kind: ListEnvironmentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEnvironmentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEnvironmentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListEnvironmentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEnvironmentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEnvironmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentsError {
fn code(&self) -> Option<&str> {
ListEnvironmentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentsError {
pub fn new(kind: ListEnvironmentsErrorKind, 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: ListEnvironmentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEnvironmentError {
pub kind: CreateEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEnvironmentError {
fn code(&self) -> Option<&str> {
CreateEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateEnvironmentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateEnvironmentError {
pub fn new(kind: CreateEnvironmentErrorKind, 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: CreateEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEnvironmentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateEnvironmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEnvironmentError {
pub kind: DeleteEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEnvironmentError {
fn code(&self) -> Option<&str> {
DeleteEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteEnvironmentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteEnvironmentError {
pub fn new(kind: DeleteEnvironmentErrorKind, 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: DeleteEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEnvironmentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteEnvironmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEnvironmentError {
pub kind: UpdateEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEnvironmentError {
fn code(&self) -> Option<&str> {
UpdateEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateEnvironmentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateEnvironmentError {
pub fn new(kind: UpdateEnvironmentErrorKind, 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: UpdateEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEnvironmentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateEnvironmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnvironmentError {
pub kind: GetEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEnvironmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnvironmentError {
fn code(&self) -> Option<&str> {
GetEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetEnvironmentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetEnvironmentError {
pub fn new(kind: GetEnvironmentErrorKind, 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: GetEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnvironmentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetEnvironmentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetEnvironmentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEnvironmentErrorKind::InternalServerException(_inner) => Some(_inner),
GetEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
GetEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentProvisionedResourcesError {
pub kind: ListEnvironmentProvisionedResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentProvisionedResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentProvisionedResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentProvisionedResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentProvisionedResourcesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentProvisionedResourcesErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentProvisionedResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentProvisionedResourcesError {
fn code(&self) -> Option<&str> {
ListEnvironmentProvisionedResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentProvisionedResourcesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentProvisionedResourcesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentProvisionedResourcesError {
pub fn new(
kind: ListEnvironmentProvisionedResourcesErrorKind,
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: ListEnvironmentProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentProvisionedResourcesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentProvisionedResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentProvisionedResourcesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentProvisionedResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentProvisionedResourcesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentProvisionedResourcesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentProvisionedResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListEnvironmentProvisionedResourcesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListEnvironmentProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListEnvironmentProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListEnvironmentProvisionedResourcesErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListEnvironmentProvisionedResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentOutputsError {
pub kind: ListEnvironmentOutputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentOutputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentOutputsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentOutputsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentOutputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentOutputsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEnvironmentOutputsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEnvironmentOutputsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListEnvironmentOutputsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEnvironmentOutputsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEnvironmentOutputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentOutputsError {
fn code(&self) -> Option<&str> {
ListEnvironmentOutputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentOutputsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentOutputsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentOutputsError {
pub fn new(kind: ListEnvironmentOutputsErrorKind, 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: ListEnvironmentOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentOutputsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentOutputsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentOutputsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentOutputsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentOutputsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentOutputsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentOutputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentOutputsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEnvironmentOutputsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEnvironmentOutputsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListEnvironmentOutputsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentOutputsErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentOutputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RejectEnvironmentAccountConnectionError {
pub kind: RejectEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RejectEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RejectEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RejectEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RejectEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
RejectEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
RejectEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
RejectEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
RejectEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
RejectEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RejectEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
RejectEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
RejectEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
RejectEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl RejectEnvironmentAccountConnectionError {
pub fn new(
kind: RejectEnvironmentAccountConnectionErrorKind,
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: RejectEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RejectEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RejectEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RejectEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RejectEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
RejectEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => Some(_inner),
RejectEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
RejectEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
RejectEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
RejectEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
Some(_inner)
}
RejectEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AcceptEnvironmentAccountConnectionError {
pub kind: AcceptEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AcceptEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AcceptEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AcceptEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AcceptEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AcceptEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
AcceptEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
AcceptEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
AcceptEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AcceptEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
AcceptEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
AcceptEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AcceptEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
AcceptEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
AcceptEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
AcceptEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl AcceptEnvironmentAccountConnectionError {
pub fn new(
kind: AcceptEnvironmentAccountConnectionErrorKind,
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: AcceptEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AcceptEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AcceptEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AcceptEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AcceptEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
AcceptEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => Some(_inner),
AcceptEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
AcceptEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AcceptEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
AcceptEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
Some(_inner)
}
AcceptEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEnvironmentAccountConnectionsError {
pub kind: ListEnvironmentAccountConnectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEnvironmentAccountConnectionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEnvironmentAccountConnectionsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEnvironmentAccountConnectionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEnvironmentAccountConnectionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEnvironmentAccountConnectionsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentAccountConnectionsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentAccountConnectionsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentAccountConnectionsErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListEnvironmentAccountConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEnvironmentAccountConnectionsError {
fn code(&self) -> Option<&str> {
ListEnvironmentAccountConnectionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEnvironmentAccountConnectionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEnvironmentAccountConnectionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEnvironmentAccountConnectionsError {
pub fn new(
kind: ListEnvironmentAccountConnectionsErrorKind,
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: ListEnvironmentAccountConnectionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEnvironmentAccountConnectionsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentAccountConnectionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentAccountConnectionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentAccountConnectionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEnvironmentAccountConnectionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEnvironmentAccountConnectionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEnvironmentAccountConnectionsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListEnvironmentAccountConnectionsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListEnvironmentAccountConnectionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentAccountConnectionsErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentAccountConnectionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEnvironmentAccountConnectionError {
pub kind: CreateEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentAccountConnectionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
CreateEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
CreateEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateEnvironmentAccountConnectionError {
pub fn new(
kind: CreateEnvironmentAccountConnectionErrorKind,
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: CreateEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
CreateEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => Some(_inner),
CreateEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
CreateEnvironmentAccountConnectionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
CreateEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
Some(_inner)
}
CreateEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEnvironmentAccountConnectionError {
pub kind: DeleteEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DeleteEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
DeleteEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteEnvironmentAccountConnectionError {
pub fn new(
kind: DeleteEnvironmentAccountConnectionErrorKind,
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: DeleteEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DeleteEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DeleteEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEnvironmentAccountConnectionError {
pub kind: UpdateEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
UpdateEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
UpdateEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateEnvironmentAccountConnectionError {
pub fn new(
kind: UpdateEnvironmentAccountConnectionErrorKind,
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: UpdateEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
UpdateEnvironmentAccountConnectionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
UpdateEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
UpdateEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => {
Some(_inner)
}
UpdateEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnvironmentAccountConnectionError {
pub kind: GetEnvironmentAccountConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnvironmentAccountConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnvironmentAccountConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnvironmentAccountConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEnvironmentAccountConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnvironmentAccountConnectionError {
fn code(&self) -> Option<&str> {
GetEnvironmentAccountConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetEnvironmentAccountConnectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetEnvironmentAccountConnectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetEnvironmentAccountConnectionError {
pub fn new(
kind: GetEnvironmentAccountConnectionErrorKind,
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: GetEnvironmentAccountConnectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnvironmentAccountConnectionErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentAccountConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentAccountConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentAccountConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetEnvironmentAccountConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetEnvironmentAccountConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnvironmentAccountConnectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEnvironmentAccountConnectionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetEnvironmentAccountConnectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetEnvironmentAccountConnectionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEnvironmentAccountConnectionErrorKind::ValidationException(_inner) => Some(_inner),
GetEnvironmentAccountConnectionErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ValidationException(_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> {
match &self.kind {
ListComponentsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListComponentsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListComponentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListComponentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListComponentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListComponentsErrorKind::ValidationException(_inner) => Some(_inner),
ListComponentsErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateComponentErrorKind::ValidationException(_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> {
match &self.kind {
CreateComponentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateComponentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateComponentErrorKind::ConflictException(_inner) => Some(_inner),
CreateComponentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateComponentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateComponentErrorKind::ValidationException(_inner) => Some(_inner),
CreateComponentErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ValidationException(_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> {
match &self.kind {
DeleteComponentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteComponentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteComponentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteComponentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteComponentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateComponentError {
pub kind: UpdateComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateComponentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateComponentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateComponentError {
fn code(&self) -> Option<&str> {
UpdateComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateComponentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateComponentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateComponentError {
pub fn new(kind: UpdateComponentErrorKind, 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: UpdateComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateComponentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateComponentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateComponentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateComponentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateComponentErrorKind::ConflictException(_inner) => Some(_inner),
UpdateComponentErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateComponentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
UpdateComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateComponentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateComponentErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
GetComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ValidationException(_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> {
match &self.kind {
GetComponentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetComponentErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => 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_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetComponentErrorKind::InternalServerException(_inner) => Some(_inner),
GetComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetComponentErrorKind::ValidationException(_inner) => Some(_inner),
GetComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentProvisionedResourcesError {
pub kind: ListComponentProvisionedResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentProvisionedResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentProvisionedResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentProvisionedResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListComponentProvisionedResourcesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListComponentProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListComponentProvisionedResourcesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListComponentProvisionedResourcesErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListComponentProvisionedResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentProvisionedResourcesError {
fn code(&self) -> Option<&str> {
ListComponentProvisionedResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListComponentProvisionedResourcesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListComponentProvisionedResourcesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListComponentProvisionedResourcesError {
pub fn new(
kind: ListComponentProvisionedResourcesErrorKind,
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: ListComponentProvisionedResourcesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentProvisionedResourcesErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentProvisionedResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentProvisionedResourcesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentProvisionedResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentProvisionedResourcesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentProvisionedResourcesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListComponentProvisionedResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentProvisionedResourcesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListComponentProvisionedResourcesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListComponentProvisionedResourcesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListComponentProvisionedResourcesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListComponentProvisionedResourcesErrorKind::ValidationException(_inner) => Some(_inner),
ListComponentProvisionedResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentOutputsError {
pub kind: ListComponentOutputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentOutputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentOutputsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentOutputsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentOutputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentOutputsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListComponentOutputsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListComponentOutputsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListComponentOutputsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListComponentOutputsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListComponentOutputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentOutputsError {
fn code(&self) -> Option<&str> {
ListComponentOutputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListComponentOutputsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListComponentOutputsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListComponentOutputsError {
pub fn new(kind: ListComponentOutputsErrorKind, 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: ListComponentOutputsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentOutputsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentOutputsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentOutputsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentOutputsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentOutputsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentOutputsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListComponentOutputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentOutputsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListComponentOutputsErrorKind::InternalServerException(_inner) => Some(_inner),
ListComponentOutputsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListComponentOutputsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListComponentOutputsErrorKind::ValidationException(_inner) => Some(_inner),
ListComponentOutputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAccountSettingsError {
pub kind: UpdateAccountSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAccountSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAccountSettingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAccountSettingsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAccountSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAccountSettingsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateAccountSettingsErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateAccountSettingsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateAccountSettingsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateAccountSettingsErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateAccountSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAccountSettingsError {
fn code(&self) -> Option<&str> {
UpdateAccountSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateAccountSettingsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateAccountSettingsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateAccountSettingsError {
pub fn new(kind: UpdateAccountSettingsErrorKind, 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: UpdateAccountSettingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAccountSettingsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAccountSettingsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAccountSettingsErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAccountSettingsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAccountSettingsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAccountSettingsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateAccountSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAccountSettingsErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateAccountSettingsErrorKind::ConflictException(_inner) => Some(_inner),
UpdateAccountSettingsErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateAccountSettingsErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateAccountSettingsErrorKind::ValidationException(_inner) => Some(_inner),
UpdateAccountSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAccountSettingsError {
pub kind: GetAccountSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAccountSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAccountSettingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAccountSettingsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAccountSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAccountSettingsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetAccountSettingsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetAccountSettingsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetAccountSettingsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetAccountSettingsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetAccountSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAccountSettingsError {
fn code(&self) -> Option<&str> {
GetAccountSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetAccountSettingsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetAccountSettingsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetAccountSettingsError {
pub fn new(kind: GetAccountSettingsErrorKind, 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: GetAccountSettingsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAccountSettingsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetAccountSettingsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetAccountSettingsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetAccountSettingsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetAccountSettingsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetAccountSettingsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetAccountSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAccountSettingsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetAccountSettingsErrorKind::InternalServerException(_inner) => Some(_inner),
GetAccountSettingsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetAccountSettingsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetAccountSettingsErrorKind::ValidationException(_inner) => Some(_inner),
GetAccountSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_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> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UntagResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::ConflictException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_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> {
match &self.kind {
TagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
TagResourceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => 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_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::ConflictException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct NotifyResourceDeploymentStatusChangeError {
pub kind: NotifyResourceDeploymentStatusChangeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for NotifyResourceDeploymentStatusChangeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: NotifyResourceDeploymentStatusChangeErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum NotifyResourceDeploymentStatusChangeErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for NotifyResourceDeploymentStatusChangeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
NotifyResourceDeploymentStatusChangeErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException(
_inner,
) => _inner.fmt(f),
NotifyResourceDeploymentStatusChangeErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
NotifyResourceDeploymentStatusChangeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for NotifyResourceDeploymentStatusChangeError {
fn code(&self) -> Option<&str> {
NotifyResourceDeploymentStatusChangeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
NotifyResourceDeploymentStatusChangeErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
NotifyResourceDeploymentStatusChangeErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl NotifyResourceDeploymentStatusChangeError {
pub fn new(
kind: NotifyResourceDeploymentStatusChangeErrorKind,
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: NotifyResourceDeploymentStatusChangeErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: NotifyResourceDeploymentStatusChangeErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
NotifyResourceDeploymentStatusChangeErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for NotifyResourceDeploymentStatusChangeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
NotifyResourceDeploymentStatusChangeErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::ConflictException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::ServiceQuotaExceededException(
_inner,
) => Some(_inner),
NotifyResourceDeploymentStatusChangeErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::ValidationException(_inner) => {
Some(_inner)
}
NotifyResourceDeploymentStatusChangeErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_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> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListRepositorySyncDefinitionsError {
pub kind: ListRepositorySyncDefinitionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListRepositorySyncDefinitionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListRepositorySyncDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListRepositorySyncDefinitionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListRepositorySyncDefinitionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListRepositorySyncDefinitionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListRepositorySyncDefinitionsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListRepositorySyncDefinitionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListRepositorySyncDefinitionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListRepositorySyncDefinitionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListRepositorySyncDefinitionsError {
fn code(&self) -> Option<&str> {
ListRepositorySyncDefinitionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListRepositorySyncDefinitionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListRepositorySyncDefinitionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListRepositorySyncDefinitionsError {
pub fn new(
kind: ListRepositorySyncDefinitionsErrorKind,
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: ListRepositorySyncDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListRepositorySyncDefinitionsErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositorySyncDefinitionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositorySyncDefinitionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositorySyncDefinitionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListRepositorySyncDefinitionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListRepositorySyncDefinitionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListRepositorySyncDefinitionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListRepositorySyncDefinitionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListRepositorySyncDefinitionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListRepositorySyncDefinitionsErrorKind::ValidationException(_inner) => Some(_inner),
ListRepositorySyncDefinitionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTemplateSyncStatusError {
pub kind: GetTemplateSyncStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTemplateSyncStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTemplateSyncStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTemplateSyncStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTemplateSyncStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTemplateSyncStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTemplateSyncStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTemplateSyncStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTemplateSyncStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTemplateSyncStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTemplateSyncStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTemplateSyncStatusError {
fn code(&self) -> Option<&str> {
GetTemplateSyncStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetTemplateSyncStatusErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetTemplateSyncStatusErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetTemplateSyncStatusError {
pub fn new(kind: GetTemplateSyncStatusErrorKind, 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: GetTemplateSyncStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTemplateSyncStatusErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateSyncStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTemplateSyncStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTemplateSyncStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTemplateSyncStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetTemplateSyncStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTemplateSyncStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTemplateSyncStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetTemplateSyncStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRepositorySyncStatusError {
pub kind: GetRepositorySyncStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRepositorySyncStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRepositorySyncStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRepositorySyncStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRepositorySyncStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRepositorySyncStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRepositorySyncStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRepositorySyncStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRepositorySyncStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRepositorySyncStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRepositorySyncStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRepositorySyncStatusError {
fn code(&self) -> Option<&str> {
GetRepositorySyncStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetRepositorySyncStatusErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetRepositorySyncStatusErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetRepositorySyncStatusError {
pub fn new(kind: GetRepositorySyncStatusErrorKind, 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: GetRepositorySyncStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRepositorySyncStatusErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositorySyncStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositorySyncStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositorySyncStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositorySyncStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRepositorySyncStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRepositorySyncStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRepositorySyncStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRepositorySyncStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetRepositorySyncStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRepositorySyncStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRepositorySyncStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetRepositorySyncStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelServicePipelineDeploymentError {
pub kind: CancelServicePipelineDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelServicePipelineDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelServicePipelineDeploymentErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelServicePipelineDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelServicePipelineDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelServicePipelineDeploymentErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CancelServicePipelineDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelServicePipelineDeploymentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CancelServicePipelineDeploymentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CancelServicePipelineDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelServicePipelineDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelServicePipelineDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelServicePipelineDeploymentError {
fn code(&self) -> Option<&str> {
CancelServicePipelineDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CancelServicePipelineDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CancelServicePipelineDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CancelServicePipelineDeploymentError {
pub fn new(
kind: CancelServicePipelineDeploymentErrorKind,
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: CancelServicePipelineDeploymentErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelServicePipelineDeploymentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelServicePipelineDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelServicePipelineDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelServicePipelineDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelServicePipelineDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CancelServicePipelineDeploymentErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
CancelServicePipelineDeploymentErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CancelServicePipelineDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelServicePipelineDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CancelServicePipelineDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelServiceInstanceDeploymentError {
pub kind: CancelServiceInstanceDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelServiceInstanceDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelServiceInstanceDeploymentErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelServiceInstanceDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelServiceInstanceDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelServiceInstanceDeploymentErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CancelServiceInstanceDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelServiceInstanceDeploymentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CancelServiceInstanceDeploymentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CancelServiceInstanceDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelServiceInstanceDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelServiceInstanceDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelServiceInstanceDeploymentError {
fn code(&self) -> Option<&str> {
CancelServiceInstanceDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CancelServiceInstanceDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CancelServiceInstanceDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CancelServiceInstanceDeploymentError {
pub fn new(
kind: CancelServiceInstanceDeploymentErrorKind,
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: CancelServiceInstanceDeploymentErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelServiceInstanceDeploymentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelServiceInstanceDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelServiceInstanceDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelServiceInstanceDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelServiceInstanceDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CancelServiceInstanceDeploymentErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
CancelServiceInstanceDeploymentErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CancelServiceInstanceDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelServiceInstanceDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CancelServiceInstanceDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelEnvironmentDeploymentError {
pub kind: CancelEnvironmentDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelEnvironmentDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelEnvironmentDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelEnvironmentDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelEnvironmentDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelEnvironmentDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelEnvironmentDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelEnvironmentDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelEnvironmentDeploymentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CancelEnvironmentDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelEnvironmentDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelEnvironmentDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelEnvironmentDeploymentError {
fn code(&self) -> Option<&str> {
CancelEnvironmentDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CancelEnvironmentDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CancelEnvironmentDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CancelEnvironmentDeploymentError {
pub fn new(kind: CancelEnvironmentDeploymentErrorKind, 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: CancelEnvironmentDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelEnvironmentDeploymentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelEnvironmentDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelEnvironmentDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelEnvironmentDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CancelEnvironmentDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelComponentDeploymentError {
pub kind: CancelComponentDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelComponentDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelComponentDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelComponentDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelComponentDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelComponentDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelComponentDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelComponentDeploymentError {
fn code(&self) -> Option<&str> {
CancelComponentDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CancelComponentDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CancelComponentDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CancelComponentDeploymentError {
pub fn new(kind: CancelComponentDeploymentErrorKind, 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: CancelComponentDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelComponentDeploymentErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelComponentDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelComponentDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelComponentDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CancelComponentDeploymentErrorKind::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 _)
}
}