#[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),
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::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_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::ThrottlingException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::ValidationException(_inner) => Some(_inner),
ListEnvironmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
pub field_list: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn field_list(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.field_list.as_deref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) field_list:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
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 reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn field_list(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.field_list.unwrap_or_default();
v.push(input);
self.field_list = Some(v);
self
}
pub fn set_field_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.field_list = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
field_list: self.field_list,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl ThrottlingException {
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
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")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
pub(crate) quota_code: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
service_code: self.service_code,
quota_code: self.quota_code,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
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, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl InternalServerException {
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
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")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
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, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
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")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
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 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),
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::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_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::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
pub(crate) quota_code: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
service_code: self.service_code,
quota_code: self.quota_code,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
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")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[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),
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::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_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::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),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
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::ServiceQuotaExceededException(_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_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
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::ServiceQuotaExceededException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
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 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 StopApplicationError {
pub kind: StopApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopApplicationErrorKind {
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 StopApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::ConflictException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
StopApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopApplicationError {
fn code(&self) -> Option<&str> {
StopApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StopApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StopApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StopApplicationError {
pub fn new(kind: StopApplicationErrorKind, 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: StopApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopApplicationErrorKind::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,
StopApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StopApplicationErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopApplicationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StopApplicationErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StopApplicationErrorKind::ValidationException(_))
}
}
impl std::error::Error for StopApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
StopApplicationErrorKind::ConflictException(_inner) => Some(_inner),
StopApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
StopApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
StopApplicationErrorKind::ValidationException(_inner) => Some(_inner),
StopApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartBatchJobError {
pub kind: StartBatchJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartBatchJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartBatchJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartBatchJobErrorKind {
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 StartBatchJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartBatchJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartBatchJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartBatchJobError {
fn code(&self) -> Option<&str> {
StartBatchJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartBatchJobErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StartBatchJobErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartBatchJobError {
pub fn new(kind: StartBatchJobErrorKind, 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: StartBatchJobErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartBatchJobErrorKind::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, StartBatchJobErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StartBatchJobErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartBatchJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartBatchJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StartBatchJobErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StartBatchJobErrorKind::ValidationException(_))
}
}
impl std::error::Error for StartBatchJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartBatchJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartBatchJobErrorKind::ConflictException(_inner) => Some(_inner),
StartBatchJobErrorKind::InternalServerException(_inner) => Some(_inner),
StartBatchJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartBatchJobErrorKind::ThrottlingException(_inner) => Some(_inner),
StartBatchJobErrorKind::ValidationException(_inner) => Some(_inner),
StartBatchJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartApplicationError {
pub kind: StartApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartApplicationErrorKind {
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 StartApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartApplicationError {
fn code(&self) -> Option<&str> {
StartApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StartApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartApplicationError {
pub fn new(kind: StartApplicationErrorKind, 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: StartApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartApplicationErrorKind::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,
StartApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StartApplicationErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartApplicationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartApplicationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartApplicationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartApplicationErrorKind::ConflictException(_inner) => Some(_inner),
StartApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
StartApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
StartApplicationErrorKind::ValidationException(_inner) => Some(_inner),
StartApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDeploymentsError {
pub kind: ListDeploymentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDeploymentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDeploymentsErrorKind {
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 ListDeploymentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDeploymentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDeploymentsError {
fn code(&self) -> Option<&str> {
ListDeploymentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListDeploymentsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListDeploymentsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListDeploymentsError {
pub fn new(kind: ListDeploymentsErrorKind, 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: ListDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDeploymentsErrorKind::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,
ListDeploymentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDeploymentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDeploymentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListDeploymentsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListDeploymentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListDeploymentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDeploymentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDeploymentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDeploymentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDeploymentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDeploymentsErrorKind::ValidationException(_inner) => Some(_inner),
ListDeploymentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDataSetsError {
pub kind: ListDataSetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDataSetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDataSetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDataSetsErrorKind {
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 ListDataSetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDataSetsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDataSetsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDataSetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDataSetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDataSetsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDataSetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDataSetsError {
fn code(&self) -> Option<&str> {
ListDataSetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListDataSetsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListDataSetsErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListDataSetsError {
pub fn new(kind: ListDataSetsErrorKind, 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: ListDataSetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDataSetsErrorKind::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, ListDataSetsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListDataSetsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListDataSetsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListDataSetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDataSetsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDataSetsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDataSetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDataSetsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDataSetsErrorKind::ValidationException(_inner) => Some(_inner),
ListDataSetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDataSetImportHistoryError {
pub kind: ListDataSetImportHistoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDataSetImportHistoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDataSetImportHistoryErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDataSetImportHistoryErrorKind {
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 ListDataSetImportHistoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDataSetImportHistoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDataSetImportHistoryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDataSetImportHistoryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDataSetImportHistoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDataSetImportHistoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDataSetImportHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDataSetImportHistoryError {
fn code(&self) -> Option<&str> {
ListDataSetImportHistoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListDataSetImportHistoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListDataSetImportHistoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListDataSetImportHistoryError {
pub fn new(kind: ListDataSetImportHistoryErrorKind, 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: ListDataSetImportHistoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDataSetImportHistoryErrorKind::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,
ListDataSetImportHistoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetImportHistoryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetImportHistoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetImportHistoryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDataSetImportHistoryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDataSetImportHistoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDataSetImportHistoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDataSetImportHistoryErrorKind::InternalServerException(_inner) => Some(_inner),
ListDataSetImportHistoryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDataSetImportHistoryErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDataSetImportHistoryErrorKind::ValidationException(_inner) => Some(_inner),
ListDataSetImportHistoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListBatchJobExecutionsError {
pub kind: ListBatchJobExecutionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListBatchJobExecutionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListBatchJobExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListBatchJobExecutionsErrorKind {
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 ListBatchJobExecutionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListBatchJobExecutionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListBatchJobExecutionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListBatchJobExecutionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListBatchJobExecutionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListBatchJobExecutionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListBatchJobExecutionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListBatchJobExecutionsError {
fn code(&self) -> Option<&str> {
ListBatchJobExecutionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListBatchJobExecutionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListBatchJobExecutionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListBatchJobExecutionsError {
pub fn new(kind: ListBatchJobExecutionsErrorKind, 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: ListBatchJobExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListBatchJobExecutionsErrorKind::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,
ListBatchJobExecutionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobExecutionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobExecutionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobExecutionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobExecutionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListBatchJobExecutionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListBatchJobExecutionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListBatchJobExecutionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListBatchJobExecutionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListBatchJobExecutionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListBatchJobExecutionsErrorKind::ValidationException(_inner) => Some(_inner),
ListBatchJobExecutionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListBatchJobDefinitionsError {
pub kind: ListBatchJobDefinitionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListBatchJobDefinitionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListBatchJobDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListBatchJobDefinitionsErrorKind {
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 ListBatchJobDefinitionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListBatchJobDefinitionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListBatchJobDefinitionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListBatchJobDefinitionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListBatchJobDefinitionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListBatchJobDefinitionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListBatchJobDefinitionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListBatchJobDefinitionsError {
fn code(&self) -> Option<&str> {
ListBatchJobDefinitionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListBatchJobDefinitionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListBatchJobDefinitionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListBatchJobDefinitionsError {
pub fn new(kind: ListBatchJobDefinitionsErrorKind, 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: ListBatchJobDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListBatchJobDefinitionsErrorKind::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,
ListBatchJobDefinitionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobDefinitionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobDefinitionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobDefinitionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListBatchJobDefinitionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListBatchJobDefinitionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListBatchJobDefinitionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListBatchJobDefinitionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListBatchJobDefinitionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListBatchJobDefinitionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListBatchJobDefinitionsErrorKind::ValidationException(_inner) => Some(_inner),
ListBatchJobDefinitionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListApplicationVersionsError {
pub kind: ListApplicationVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListApplicationVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListApplicationVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListApplicationVersionsErrorKind {
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 ListApplicationVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListApplicationVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListApplicationVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListApplicationVersionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListApplicationVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListApplicationVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListApplicationVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListApplicationVersionsError {
fn code(&self) -> Option<&str> {
ListApplicationVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListApplicationVersionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListApplicationVersionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListApplicationVersionsError {
pub fn new(kind: ListApplicationVersionsErrorKind, 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: ListApplicationVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListApplicationVersionsErrorKind::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,
ListApplicationVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListApplicationVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListApplicationVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListApplicationVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListApplicationVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListApplicationVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListApplicationVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListApplicationVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDeploymentError {
pub kind: GetDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDeploymentErrorKind {
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 GetDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDeploymentError {
fn code(&self) -> Option<&str> {
GetDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDeploymentError {
pub fn new(kind: GetDeploymentErrorKind, 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: GetDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDeploymentErrorKind::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, GetDeploymentErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetDeploymentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetDeploymentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
GetDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
GetDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDataSetImportTaskError {
pub kind: GetDataSetImportTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDataSetImportTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDataSetImportTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDataSetImportTaskErrorKind {
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 GetDataSetImportTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDataSetImportTaskErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDataSetImportTaskErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDataSetImportTaskErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDataSetImportTaskErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDataSetImportTaskErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDataSetImportTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDataSetImportTaskError {
fn code(&self) -> Option<&str> {
GetDataSetImportTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDataSetImportTaskErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetDataSetImportTaskErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDataSetImportTaskError {
pub fn new(kind: GetDataSetImportTaskErrorKind, 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: GetDataSetImportTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDataSetImportTaskErrorKind::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,
GetDataSetImportTaskErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetImportTaskErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetImportTaskErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetImportTaskErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetImportTaskErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDataSetImportTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDataSetImportTaskErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDataSetImportTaskErrorKind::InternalServerException(_inner) => Some(_inner),
GetDataSetImportTaskErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDataSetImportTaskErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDataSetImportTaskErrorKind::ValidationException(_inner) => Some(_inner),
GetDataSetImportTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDataSetDetailsError {
pub kind: GetDataSetDetailsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDataSetDetailsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDataSetDetailsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDataSetDetailsErrorKind {
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 GetDataSetDetailsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDataSetDetailsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDataSetDetailsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDataSetDetailsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDataSetDetailsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDataSetDetailsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDataSetDetailsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDataSetDetailsError {
fn code(&self) -> Option<&str> {
GetDataSetDetailsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDataSetDetailsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetDataSetDetailsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDataSetDetailsError {
pub fn new(kind: GetDataSetDetailsErrorKind, 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: GetDataSetDetailsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDataSetDetailsErrorKind::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,
GetDataSetDetailsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetDetailsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetDetailsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetDetailsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSetDetailsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDataSetDetailsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDataSetDetailsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDataSetDetailsErrorKind::InternalServerException(_inner) => Some(_inner),
GetDataSetDetailsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDataSetDetailsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDataSetDetailsErrorKind::ValidationException(_inner) => Some(_inner),
GetDataSetDetailsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBatchJobExecutionError {
pub kind: GetBatchJobExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBatchJobExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBatchJobExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBatchJobExecutionErrorKind {
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 GetBatchJobExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBatchJobExecutionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetBatchJobExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetBatchJobExecutionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetBatchJobExecutionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetBatchJobExecutionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetBatchJobExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBatchJobExecutionError {
fn code(&self) -> Option<&str> {
GetBatchJobExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetBatchJobExecutionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetBatchJobExecutionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetBatchJobExecutionError {
pub fn new(kind: GetBatchJobExecutionErrorKind, 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: GetBatchJobExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBatchJobExecutionErrorKind::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,
GetBatchJobExecutionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchJobExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchJobExecutionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchJobExecutionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchJobExecutionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetBatchJobExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBatchJobExecutionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetBatchJobExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
GetBatchJobExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetBatchJobExecutionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetBatchJobExecutionErrorKind::ValidationException(_inner) => Some(_inner),
GetBatchJobExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetApplicationVersionError {
pub kind: GetApplicationVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetApplicationVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetApplicationVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetApplicationVersionErrorKind {
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 GetApplicationVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetApplicationVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetApplicationVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetApplicationVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetApplicationVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetApplicationVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetApplicationVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetApplicationVersionError {
fn code(&self) -> Option<&str> {
GetApplicationVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetApplicationVersionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetApplicationVersionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetApplicationVersionError {
pub fn new(kind: GetApplicationVersionErrorKind, 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: GetApplicationVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetApplicationVersionErrorKind::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,
GetApplicationVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetApplicationVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetApplicationVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetApplicationVersionErrorKind::InternalServerException(_inner) => Some(_inner),
GetApplicationVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetApplicationVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetApplicationVersionErrorKind::ValidationException(_inner) => Some(_inner),
GetApplicationVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteApplicationFromEnvironmentError {
pub kind: DeleteApplicationFromEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteApplicationFromEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteApplicationFromEnvironmentErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteApplicationFromEnvironmentErrorKind {
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 DeleteApplicationFromEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteApplicationFromEnvironmentErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteApplicationFromEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteApplicationFromEnvironmentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteApplicationFromEnvironmentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteApplicationFromEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteApplicationFromEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteApplicationFromEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteApplicationFromEnvironmentError {
fn code(&self) -> Option<&str> {
DeleteApplicationFromEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteApplicationFromEnvironmentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteApplicationFromEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteApplicationFromEnvironmentError {
pub fn new(
kind: DeleteApplicationFromEnvironmentErrorKind,
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: DeleteApplicationFromEnvironmentErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteApplicationFromEnvironmentErrorKind::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,
DeleteApplicationFromEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationFromEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationFromEnvironmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationFromEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationFromEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationFromEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteApplicationFromEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteApplicationFromEnvironmentErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteApplicationFromEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteApplicationFromEnvironmentErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteApplicationFromEnvironmentErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteApplicationFromEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteApplicationFromEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteApplicationFromEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDeploymentError {
pub kind: CreateDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDeploymentErrorKind {
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 CreateDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDeploymentError {
fn code(&self) -> Option<&str> {
CreateDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateDeploymentErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateDeploymentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateDeploymentError {
pub fn new(kind: CreateDeploymentErrorKind, 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: CreateDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDeploymentErrorKind::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,
CreateDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateDeploymentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CreateDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CreateDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataSetImportTaskError {
pub kind: CreateDataSetImportTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataSetImportTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataSetImportTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataSetImportTaskErrorKind {
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 CreateDataSetImportTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataSetImportTaskErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateDataSetImportTaskErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDataSetImportTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataSetImportTaskError {
fn code(&self) -> Option<&str> {
CreateDataSetImportTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateDataSetImportTaskErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateDataSetImportTaskErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateDataSetImportTaskError {
pub fn new(kind: CreateDataSetImportTaskErrorKind, 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: CreateDataSetImportTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataSetImportTaskErrorKind::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,
CreateDataSetImportTaskErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSetImportTaskErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateDataSetImportTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataSetImportTaskErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::ConflictException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::ValidationException(_inner) => Some(_inner),
CreateDataSetImportTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelBatchJobExecutionError {
pub kind: CancelBatchJobExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelBatchJobExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelBatchJobExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelBatchJobExecutionErrorKind {
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 CancelBatchJobExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelBatchJobExecutionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelBatchJobExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelBatchJobExecutionError {
fn code(&self) -> Option<&str> {
CancelBatchJobExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CancelBatchJobExecutionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CancelBatchJobExecutionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CancelBatchJobExecutionError {
pub fn new(kind: CancelBatchJobExecutionErrorKind, 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: CancelBatchJobExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelBatchJobExecutionErrorKind::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,
CancelBatchJobExecutionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchJobExecutionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchJobExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchJobExecutionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchJobExecutionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchJobExecutionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelBatchJobExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelBatchJobExecutionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::ConflictException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::ValidationException(_inner) => Some(_inner),
CancelBatchJobExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListApplicationsError {
pub kind: ListApplicationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListApplicationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListApplicationsErrorKind {
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 ListApplicationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListApplicationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListApplicationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListApplicationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListApplicationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListApplicationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListApplicationsError {
fn code(&self) -> Option<&str> {
ListApplicationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListApplicationsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListApplicationsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListApplicationsError {
pub fn new(kind: ListApplicationsErrorKind, 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: ListApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListApplicationsErrorKind::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,
ListApplicationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListApplicationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListApplicationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListApplicationsErrorKind::InternalServerException(_inner) => Some(_inner),
ListApplicationsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListApplicationsErrorKind::ValidationException(_inner) => Some(_inner),
ListApplicationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateApplicationError {
pub kind: CreateApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateApplicationErrorKind {
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 CreateApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateApplicationError {
fn code(&self) -> Option<&str> {
CreateApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateApplicationError {
pub fn new(kind: CreateApplicationErrorKind, 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: CreateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateApplicationErrorKind::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,
CreateApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateApplicationErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateApplicationErrorKind::ConflictException(_inner) => Some(_inner),
CreateApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
CreateApplicationErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateApplicationErrorKind::ValidationException(_inner) => Some(_inner),
CreateApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteApplicationError {
pub kind: DeleteApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteApplicationErrorKind {
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 DeleteApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteApplicationError {
fn code(&self) -> Option<&str> {
DeleteApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteApplicationError {
pub fn new(kind: DeleteApplicationErrorKind, 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: DeleteApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteApplicationErrorKind::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,
DeleteApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteApplicationErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteApplicationErrorKind::ConflictException(_inner) => Some(_inner),
DeleteApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteApplicationErrorKind::ValidationException(_inner) => Some(_inner),
DeleteApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateApplicationError {
pub kind: UpdateApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateApplicationErrorKind {
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 UpdateApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateApplicationError {
fn code(&self) -> Option<&str> {
UpdateApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateApplicationError {
pub fn new(kind: UpdateApplicationErrorKind, 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: UpdateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateApplicationErrorKind::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,
UpdateApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateApplicationErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateApplicationErrorKind::ConflictException(_inner) => Some(_inner),
UpdateApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateApplicationErrorKind::ValidationException(_inner) => Some(_inner),
UpdateApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetApplicationError {
pub kind: GetApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetApplicationErrorKind {
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 GetApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetApplicationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetApplicationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetApplicationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetApplicationErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetApplicationError {
fn code(&self) -> Option<&str> {
GetApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetApplicationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetApplicationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetApplicationError {
pub fn new(kind: GetApplicationErrorKind, 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: GetApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetApplicationErrorKind::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,
GetApplicationErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetApplicationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetApplicationErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetApplicationErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetApplicationErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetApplicationErrorKind::InternalServerException(_inner) => Some(_inner),
GetApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetApplicationErrorKind::ThrottlingException(_inner) => Some(_inner),
GetApplicationErrorKind::ValidationException(_inner) => Some(_inner),
GetApplicationErrorKind::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),
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::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_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::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),
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 TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceQuotaExceededException(_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_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_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ServiceQuotaExceededException(_)
)
}
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::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceQuotaExceededException(_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 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 ListEngineVersionsError {
pub kind: ListEngineVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEngineVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEngineVersionsErrorKind {
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 ListEngineVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEngineVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEngineVersionsError {
fn code(&self) -> Option<&str> {
ListEngineVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEngineVersionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListEngineVersionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEngineVersionsError {
pub fn new(kind: ListEngineVersionsErrorKind, 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: ListEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEngineVersionsErrorKind::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,
ListEngineVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEngineVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEngineVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEngineVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEngineVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEngineVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::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 _)
}
}