#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateVariableError {
pub kind: UpdateVariableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateVariableError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateVariableErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateVariableErrorKind {
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 UpdateVariableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateVariableErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateVariableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateVariableError {
fn code(&self) -> Option<&str> {
UpdateVariableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateVariableError {
pub fn new(kind: UpdateVariableErrorKind, 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: UpdateVariableErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateVariableErrorKind::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,
UpdateVariableErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateVariableErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVariableErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVariableErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateVariableErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateVariableErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateVariableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateVariableErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateVariableErrorKind::ConflictException(_inner) => Some(_inner),
UpdateVariableErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateVariableErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateVariableErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateVariableErrorKind::ValidationException(_inner) => Some(_inner),
UpdateVariableErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_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>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
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>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl 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 ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
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>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl 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 ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
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>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_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_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
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 UpdateRuleVersionError {
pub kind: UpdateRuleVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRuleVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRuleVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRuleVersionErrorKind {
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 UpdateRuleVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRuleVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateRuleVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRuleVersionError {
fn code(&self) -> Option<&str> {
UpdateRuleVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateRuleVersionError {
pub fn new(kind: UpdateRuleVersionErrorKind, 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: UpdateRuleVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRuleVersionErrorKind::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,
UpdateRuleVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateRuleVersionErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateRuleVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRuleVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateRuleVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRuleMetadataError {
pub kind: UpdateRuleMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRuleMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRuleMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRuleMetadataErrorKind {
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 UpdateRuleMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRuleMetadataErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateRuleMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRuleMetadataError {
fn code(&self) -> Option<&str> {
UpdateRuleMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateRuleMetadataError {
pub fn new(kind: UpdateRuleMetadataErrorKind, 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: UpdateRuleMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRuleMetadataErrorKind::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,
UpdateRuleMetadataErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleMetadataErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleMetadataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleMetadataErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleMetadataErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateRuleMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRuleMetadataErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::ConflictException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::ValidationException(_inner) => Some(_inner),
UpdateRuleMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateModelVersionStatusError {
pub kind: UpdateModelVersionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateModelVersionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateModelVersionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateModelVersionStatusErrorKind {
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 UpdateModelVersionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateModelVersionStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateModelVersionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateModelVersionStatusError {
fn code(&self) -> Option<&str> {
UpdateModelVersionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateModelVersionStatusError {
pub fn new(kind: UpdateModelVersionStatusErrorKind, 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: UpdateModelVersionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateModelVersionStatusErrorKind::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,
UpdateModelVersionStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionStatusErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateModelVersionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateModelVersionStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::ConflictException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::ValidationException(_inner) => Some(_inner),
UpdateModelVersionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateModelVersionError {
pub kind: UpdateModelVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateModelVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateModelVersionErrorKind {
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 UpdateModelVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateModelVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateModelVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateModelVersionError {
fn code(&self) -> Option<&str> {
UpdateModelVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateModelVersionError {
pub fn new(kind: UpdateModelVersionErrorKind, 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: UpdateModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateModelVersionErrorKind::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,
UpdateModelVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateModelVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateModelVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateModelVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateModelError {
pub kind: UpdateModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateModelErrorKind {
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 UpdateModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateModelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateModelError {
fn code(&self) -> Option<&str> {
UpdateModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateModelError {
pub fn new(kind: UpdateModelErrorKind, 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: UpdateModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateModelErrorKind::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, UpdateModelErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateModelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdateModelErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateModelErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateModelErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateModelErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateModelErrorKind::ConflictException(_inner) => Some(_inner),
UpdateModelErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateModelErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateModelErrorKind::ValidationException(_inner) => Some(_inner),
UpdateModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEventLabelError {
pub kind: UpdateEventLabelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEventLabelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEventLabelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEventLabelErrorKind {
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 UpdateEventLabelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEventLabelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateEventLabelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEventLabelError {
fn code(&self) -> Option<&str> {
UpdateEventLabelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEventLabelError {
pub fn new(kind: UpdateEventLabelErrorKind, 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: UpdateEventLabelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEventLabelErrorKind::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,
UpdateEventLabelErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateEventLabelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventLabelErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventLabelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventLabelErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventLabelErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEventLabelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEventLabelErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEventLabelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDetectorVersionStatusError {
pub kind: UpdateDetectorVersionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDetectorVersionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDetectorVersionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDetectorVersionStatusErrorKind {
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 UpdateDetectorVersionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDetectorVersionStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDetectorVersionStatusErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDetectorVersionStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDetectorVersionStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateDetectorVersionStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDetectorVersionStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDetectorVersionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDetectorVersionStatusError {
fn code(&self) -> Option<&str> {
UpdateDetectorVersionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDetectorVersionStatusError {
pub fn new(kind: UpdateDetectorVersionStatusErrorKind, 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: UpdateDetectorVersionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDetectorVersionStatusErrorKind::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,
UpdateDetectorVersionStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionStatusErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateDetectorVersionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDetectorVersionStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDetectorVersionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDetectorVersionMetadataError {
pub kind: UpdateDetectorVersionMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDetectorVersionMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDetectorVersionMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDetectorVersionMetadataErrorKind {
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 UpdateDetectorVersionMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDetectorVersionMetadataErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDetectorVersionMetadataErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDetectorVersionMetadataErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
UpdateDetectorVersionMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDetectorVersionMetadataErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDetectorVersionMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDetectorVersionMetadataError {
fn code(&self) -> Option<&str> {
UpdateDetectorVersionMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDetectorVersionMetadataError {
pub fn new(
kind: UpdateDetectorVersionMetadataErrorKind,
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: UpdateDetectorVersionMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDetectorVersionMetadataErrorKind::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,
UpdateDetectorVersionMetadataErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionMetadataErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionMetadataErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionMetadataErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateDetectorVersionMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDetectorVersionMetadataErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDetectorVersionMetadataErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDetectorVersionMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDetectorVersionMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDetectorVersionMetadataErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDetectorVersionMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDetectorVersionError {
pub kind: UpdateDetectorVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDetectorVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDetectorVersionErrorKind {
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 UpdateDetectorVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDetectorVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDetectorVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDetectorVersionError {
fn code(&self) -> Option<&str> {
UpdateDetectorVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDetectorVersionError {
pub fn new(kind: UpdateDetectorVersionErrorKind, 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: UpdateDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDetectorVersionErrorKind::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,
UpdateDetectorVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateDetectorVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDetectorVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDetectorVersionErrorKind::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),
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::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> {
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_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::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),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendEventError {
pub kind: SendEventErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendEventError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendEventErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendEventErrorKind {
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 SendEventError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendEventErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SendEventErrorKind::ConflictException(_inner) => _inner.fmt(f),
SendEventErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SendEventErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SendEventErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SendEventErrorKind::ValidationException(_inner) => _inner.fmt(f),
SendEventErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendEventError {
fn code(&self) -> Option<&str> {
SendEventError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SendEventError {
pub fn new(kind: SendEventErrorKind, 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: SendEventErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendEventErrorKind::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, SendEventErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, SendEventErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, SendEventErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, SendEventErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, SendEventErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, SendEventErrorKind::ValidationException(_))
}
}
impl std::error::Error for SendEventError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendEventErrorKind::AccessDeniedException(_inner) => Some(_inner),
SendEventErrorKind::ConflictException(_inner) => Some(_inner),
SendEventErrorKind::InternalServerException(_inner) => Some(_inner),
SendEventErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SendEventErrorKind::ThrottlingException(_inner) => Some(_inner),
SendEventErrorKind::ValidationException(_inner) => Some(_inner),
SendEventErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutOutcomeError {
pub kind: PutOutcomeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutOutcomeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutOutcomeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutOutcomeErrorKind {
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 PutOutcomeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutOutcomeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutOutcomeErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutOutcomeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutOutcomeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutOutcomeErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutOutcomeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutOutcomeError {
fn code(&self) -> Option<&str> {
PutOutcomeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutOutcomeError {
pub fn new(kind: PutOutcomeErrorKind, 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: PutOutcomeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutOutcomeErrorKind::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, PutOutcomeErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutOutcomeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PutOutcomeErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutOutcomeErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutOutcomeErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutOutcomeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutOutcomeErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutOutcomeErrorKind::ConflictException(_inner) => Some(_inner),
PutOutcomeErrorKind::InternalServerException(_inner) => Some(_inner),
PutOutcomeErrorKind::ThrottlingException(_inner) => Some(_inner),
PutOutcomeErrorKind::ValidationException(_inner) => Some(_inner),
PutOutcomeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutLabelError {
pub kind: PutLabelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutLabelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutLabelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutLabelErrorKind {
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 PutLabelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutLabelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutLabelErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutLabelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutLabelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutLabelErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutLabelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutLabelError {
fn code(&self) -> Option<&str> {
PutLabelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutLabelError {
pub fn new(kind: PutLabelErrorKind, 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: PutLabelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutLabelErrorKind::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, PutLabelErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutLabelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PutLabelErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutLabelErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutLabelErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutLabelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutLabelErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutLabelErrorKind::ConflictException(_inner) => Some(_inner),
PutLabelErrorKind::InternalServerException(_inner) => Some(_inner),
PutLabelErrorKind::ThrottlingException(_inner) => Some(_inner),
PutLabelErrorKind::ValidationException(_inner) => Some(_inner),
PutLabelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutKMSEncryptionKeyError {
pub kind: PutKMSEncryptionKeyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutKMSEncryptionKeyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutKMSEncryptionKeyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutKMSEncryptionKeyErrorKind {
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 PutKMSEncryptionKeyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutKMSEncryptionKeyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutKMSEncryptionKeyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutKMSEncryptionKeyError {
fn code(&self) -> Option<&str> {
PutKMSEncryptionKeyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutKMSEncryptionKeyError {
pub fn new(kind: PutKMSEncryptionKeyErrorKind, 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: PutKMSEncryptionKeyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutKMSEncryptionKeyErrorKind::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,
PutKMSEncryptionKeyErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutKMSEncryptionKeyErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutKMSEncryptionKeyErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutKMSEncryptionKeyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutKMSEncryptionKeyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutKMSEncryptionKeyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutKMSEncryptionKeyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutKMSEncryptionKeyErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::ConflictException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::InternalServerException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::ThrottlingException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::ValidationException(_inner) => Some(_inner),
PutKMSEncryptionKeyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutExternalModelError {
pub kind: PutExternalModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutExternalModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutExternalModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutExternalModelErrorKind {
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 PutExternalModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutExternalModelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutExternalModelErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutExternalModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutExternalModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutExternalModelErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutExternalModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutExternalModelError {
fn code(&self) -> Option<&str> {
PutExternalModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutExternalModelError {
pub fn new(kind: PutExternalModelErrorKind, 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: PutExternalModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutExternalModelErrorKind::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,
PutExternalModelErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutExternalModelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutExternalModelErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutExternalModelErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutExternalModelErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutExternalModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutExternalModelErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutExternalModelErrorKind::ConflictException(_inner) => Some(_inner),
PutExternalModelErrorKind::InternalServerException(_inner) => Some(_inner),
PutExternalModelErrorKind::ThrottlingException(_inner) => Some(_inner),
PutExternalModelErrorKind::ValidationException(_inner) => Some(_inner),
PutExternalModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutEventTypeError {
pub kind: PutEventTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutEventTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutEventTypeErrorKind {
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 PutEventTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutEventTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutEventTypeErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutEventTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutEventTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutEventTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutEventTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutEventTypeError {
fn code(&self) -> Option<&str> {
PutEventTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutEventTypeError {
pub fn new(kind: PutEventTypeErrorKind, 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: PutEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutEventTypeErrorKind::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, PutEventTypeErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutEventTypeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutEventTypeErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutEventTypeErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutEventTypeErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutEventTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutEventTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutEventTypeErrorKind::ConflictException(_inner) => Some(_inner),
PutEventTypeErrorKind::InternalServerException(_inner) => Some(_inner),
PutEventTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
PutEventTypeErrorKind::ValidationException(_inner) => Some(_inner),
PutEventTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutEntityTypeError {
pub kind: PutEntityTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutEntityTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutEntityTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutEntityTypeErrorKind {
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 PutEntityTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutEntityTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutEntityTypeErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutEntityTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutEntityTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutEntityTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutEntityTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutEntityTypeError {
fn code(&self) -> Option<&str> {
PutEntityTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutEntityTypeError {
pub fn new(kind: PutEntityTypeErrorKind, 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: PutEntityTypeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutEntityTypeErrorKind::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, PutEntityTypeErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutEntityTypeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutEntityTypeErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutEntityTypeErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutEntityTypeErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutEntityTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutEntityTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutEntityTypeErrorKind::ConflictException(_inner) => Some(_inner),
PutEntityTypeErrorKind::InternalServerException(_inner) => Some(_inner),
PutEntityTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
PutEntityTypeErrorKind::ValidationException(_inner) => Some(_inner),
PutEntityTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutDetectorError {
pub kind: PutDetectorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutDetectorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutDetectorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutDetectorErrorKind {
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 PutDetectorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutDetectorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutDetectorErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutDetectorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutDetectorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutDetectorErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutDetectorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutDetectorError {
fn code(&self) -> Option<&str> {
PutDetectorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutDetectorError {
pub fn new(kind: PutDetectorErrorKind, 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: PutDetectorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutDetectorErrorKind::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, PutDetectorErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutDetectorErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PutDetectorErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutDetectorErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutDetectorErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutDetectorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutDetectorErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutDetectorErrorKind::ConflictException(_inner) => Some(_inner),
PutDetectorErrorKind::InternalServerException(_inner) => Some(_inner),
PutDetectorErrorKind::ThrottlingException(_inner) => Some(_inner),
PutDetectorErrorKind::ValidationException(_inner) => Some(_inner),
PutDetectorErrorKind::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),
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::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> {
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_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::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 ListEventPredictionsError {
pub kind: ListEventPredictionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEventPredictionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEventPredictionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEventPredictionsErrorKind {
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 ListEventPredictionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEventPredictionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEventPredictionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEventPredictionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEventPredictionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEventPredictionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEventPredictionsError {
fn code(&self) -> Option<&str> {
ListEventPredictionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEventPredictionsError {
pub fn new(kind: ListEventPredictionsErrorKind, 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: ListEventPredictionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEventPredictionsErrorKind::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,
ListEventPredictionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEventPredictionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEventPredictionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEventPredictionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEventPredictionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEventPredictionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEventPredictionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEventPredictionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEventPredictionsErrorKind::ValidationException(_inner) => Some(_inner),
ListEventPredictionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetVariablesError {
pub kind: GetVariablesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetVariablesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetVariablesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetVariablesErrorKind {
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 GetVariablesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetVariablesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetVariablesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetVariablesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetVariablesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetVariablesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetVariablesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetVariablesError {
fn code(&self) -> Option<&str> {
GetVariablesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetVariablesError {
pub fn new(kind: GetVariablesErrorKind, 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: GetVariablesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetVariablesErrorKind::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, GetVariablesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetVariablesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetVariablesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetVariablesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetVariablesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetVariablesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetVariablesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetVariablesErrorKind::InternalServerException(_inner) => Some(_inner),
GetVariablesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetVariablesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetVariablesErrorKind::ValidationException(_inner) => Some(_inner),
GetVariablesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRulesError {
pub kind: GetRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRulesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRulesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRulesErrorKind {
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 GetRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRulesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRulesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRulesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRulesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRulesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRulesError {
fn code(&self) -> Option<&str> {
GetRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRulesError {
pub fn new(kind: GetRulesErrorKind, 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: GetRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRulesErrorKind::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, GetRulesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetRulesErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetRulesErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetRulesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetRulesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRulesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRulesErrorKind::InternalServerException(_inner) => Some(_inner),
GetRulesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRulesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRulesErrorKind::ValidationException(_inner) => Some(_inner),
GetRulesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetOutcomesError {
pub kind: GetOutcomesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetOutcomesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetOutcomesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetOutcomesErrorKind {
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 GetOutcomesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetOutcomesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetOutcomesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetOutcomesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetOutcomesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetOutcomesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetOutcomesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetOutcomesError {
fn code(&self) -> Option<&str> {
GetOutcomesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetOutcomesError {
pub fn new(kind: GetOutcomesErrorKind, 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: GetOutcomesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetOutcomesErrorKind::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, GetOutcomesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetOutcomesErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetOutcomesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetOutcomesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetOutcomesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetOutcomesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetOutcomesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetOutcomesErrorKind::InternalServerException(_inner) => Some(_inner),
GetOutcomesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetOutcomesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetOutcomesErrorKind::ValidationException(_inner) => Some(_inner),
GetOutcomesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetModelVersionError {
pub kind: GetModelVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetModelVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetModelVersionErrorKind {
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 GetModelVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetModelVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetModelVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetModelVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetModelVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetModelVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetModelVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetModelVersionError {
fn code(&self) -> Option<&str> {
GetModelVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetModelVersionError {
pub fn new(kind: GetModelVersionErrorKind, 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: GetModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetModelVersionErrorKind::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,
GetModelVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetModelVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetModelVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetModelVersionErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetModelVersionErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetModelVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetModelVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetModelVersionErrorKind::InternalServerException(_inner) => Some(_inner),
GetModelVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetModelVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetModelVersionErrorKind::ValidationException(_inner) => Some(_inner),
GetModelVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetModelsError {
pub kind: GetModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetModelsErrorKind {
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 GetModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetModelsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetModelsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetModelsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetModelsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetModelsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetModelsError {
fn code(&self) -> Option<&str> {
GetModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetModelsError {
pub fn new(kind: GetModelsErrorKind, 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: GetModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetModelsErrorKind::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, GetModelsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetModelsErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetModelsErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetModelsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetModelsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetModelsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetModelsErrorKind::InternalServerException(_inner) => Some(_inner),
GetModelsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetModelsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetModelsErrorKind::ValidationException(_inner) => Some(_inner),
GetModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLabelsError {
pub kind: GetLabelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLabelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLabelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLabelsErrorKind {
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 GetLabelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLabelsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLabelsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetLabelsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetLabelsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLabelsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetLabelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLabelsError {
fn code(&self) -> Option<&str> {
GetLabelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLabelsError {
pub fn new(kind: GetLabelsErrorKind, 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: GetLabelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLabelsErrorKind::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, GetLabelsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetLabelsErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetLabelsErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetLabelsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetLabelsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetLabelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLabelsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLabelsErrorKind::InternalServerException(_inner) => Some(_inner),
GetLabelsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetLabelsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLabelsErrorKind::ValidationException(_inner) => Some(_inner),
GetLabelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetKMSEncryptionKeyError {
pub kind: GetKMSEncryptionKeyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetKMSEncryptionKeyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetKMSEncryptionKeyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetKMSEncryptionKeyErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetKMSEncryptionKeyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetKMSEncryptionKeyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetKMSEncryptionKeyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetKMSEncryptionKeyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetKMSEncryptionKeyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetKMSEncryptionKeyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetKMSEncryptionKeyError {
fn code(&self) -> Option<&str> {
GetKMSEncryptionKeyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetKMSEncryptionKeyError {
pub fn new(kind: GetKMSEncryptionKeyErrorKind, 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: GetKMSEncryptionKeyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetKMSEncryptionKeyErrorKind::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,
GetKMSEncryptionKeyErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetKMSEncryptionKeyErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetKMSEncryptionKeyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetKMSEncryptionKeyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetKMSEncryptionKeyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetKMSEncryptionKeyErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetKMSEncryptionKeyErrorKind::InternalServerException(_inner) => Some(_inner),
GetKMSEncryptionKeyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetKMSEncryptionKeyErrorKind::ThrottlingException(_inner) => Some(_inner),
GetKMSEncryptionKeyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetExternalModelsError {
pub kind: GetExternalModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetExternalModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetExternalModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetExternalModelsErrorKind {
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 GetExternalModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetExternalModelsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetExternalModelsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetExternalModelsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetExternalModelsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetExternalModelsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetExternalModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetExternalModelsError {
fn code(&self) -> Option<&str> {
GetExternalModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetExternalModelsError {
pub fn new(kind: GetExternalModelsErrorKind, 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: GetExternalModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetExternalModelsErrorKind::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,
GetExternalModelsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetExternalModelsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetExternalModelsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetExternalModelsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetExternalModelsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetExternalModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetExternalModelsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetExternalModelsErrorKind::InternalServerException(_inner) => Some(_inner),
GetExternalModelsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetExternalModelsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetExternalModelsErrorKind::ValidationException(_inner) => Some(_inner),
GetExternalModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEventTypesError {
pub kind: GetEventTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEventTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEventTypesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEventTypesErrorKind {
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 GetEventTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEventTypesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEventTypesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEventTypesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEventTypesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEventTypesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEventTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEventTypesError {
fn code(&self) -> Option<&str> {
GetEventTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEventTypesError {
pub fn new(kind: GetEventTypesErrorKind, 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: GetEventTypesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEventTypesErrorKind::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, GetEventTypesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEventTypesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEventTypesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetEventTypesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetEventTypesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetEventTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEventTypesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEventTypesErrorKind::InternalServerException(_inner) => Some(_inner),
GetEventTypesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEventTypesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEventTypesErrorKind::ValidationException(_inner) => Some(_inner),
GetEventTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEventPredictionMetadataError {
pub kind: GetEventPredictionMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEventPredictionMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEventPredictionMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEventPredictionMetadataErrorKind {
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 GetEventPredictionMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEventPredictionMetadataErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEventPredictionMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEventPredictionMetadataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEventPredictionMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEventPredictionMetadataErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEventPredictionMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEventPredictionMetadataError {
fn code(&self) -> Option<&str> {
GetEventPredictionMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEventPredictionMetadataError {
pub fn new(kind: GetEventPredictionMetadataErrorKind, 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: GetEventPredictionMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEventPredictionMetadataErrorKind::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,
GetEventPredictionMetadataErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionMetadataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionMetadataErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionMetadataErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetEventPredictionMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEventPredictionMetadataErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEventPredictionMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
GetEventPredictionMetadataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEventPredictionMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEventPredictionMetadataErrorKind::ValidationException(_inner) => Some(_inner),
GetEventPredictionMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEventPredictionError {
pub kind: GetEventPredictionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEventPredictionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEventPredictionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEventPredictionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEventPredictionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEventPredictionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEventPredictionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEventPredictionError {
fn code(&self) -> Option<&str> {
GetEventPredictionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEventPredictionError {
pub fn new(kind: GetEventPredictionErrorKind, 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: GetEventPredictionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEventPredictionErrorKind::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,
GetEventPredictionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::ResourceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetEventPredictionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetEventPredictionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEventPredictionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEventPredictionErrorKind::ConflictException(_inner) => Some(_inner),
GetEventPredictionErrorKind::InternalServerException(_inner) => Some(_inner),
GetEventPredictionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEventPredictionErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
GetEventPredictionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEventPredictionErrorKind::ValidationException(_inner) => Some(_inner),
GetEventPredictionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceUnavailableException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceUnavailableException {}
pub mod resource_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceUnavailableException {
crate::error::ResourceUnavailableException {
message: self.message,
}
}
}
}
impl ResourceUnavailableException {
pub fn builder() -> crate::error::resource_unavailable_exception::Builder {
crate::error::resource_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEventError {
pub kind: GetEventErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEventError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEventErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEventErrorKind {
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 GetEventError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEventErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEventErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEventErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEventErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEventErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEventErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEventError {
fn code(&self) -> Option<&str> {
GetEventError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEventError {
pub fn new(kind: GetEventErrorKind, 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: GetEventErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEventErrorKind::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, GetEventErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetEventErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetEventErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetEventErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetEventErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetEventError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEventErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEventErrorKind::InternalServerException(_inner) => Some(_inner),
GetEventErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEventErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEventErrorKind::ValidationException(_inner) => Some(_inner),
GetEventErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEntityTypesError {
pub kind: GetEntityTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEntityTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEntityTypesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEntityTypesErrorKind {
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 GetEntityTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEntityTypesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEntityTypesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEntityTypesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEntityTypesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEntityTypesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetEntityTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEntityTypesError {
fn code(&self) -> Option<&str> {
GetEntityTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEntityTypesError {
pub fn new(kind: GetEntityTypesErrorKind, 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: GetEntityTypesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEntityTypesErrorKind::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,
GetEntityTypesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEntityTypesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEntityTypesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetEntityTypesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetEntityTypesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetEntityTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEntityTypesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEntityTypesErrorKind::InternalServerException(_inner) => Some(_inner),
GetEntityTypesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEntityTypesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEntityTypesErrorKind::ValidationException(_inner) => Some(_inner),
GetEntityTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDetectorVersionError {
pub kind: GetDetectorVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDetectorVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDetectorVersionErrorKind {
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 GetDetectorVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDetectorVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDetectorVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDetectorVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDetectorVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDetectorVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDetectorVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDetectorVersionError {
fn code(&self) -> Option<&str> {
GetDetectorVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDetectorVersionError {
pub fn new(kind: GetDetectorVersionErrorKind, 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: GetDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDetectorVersionErrorKind::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,
GetDetectorVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDetectorVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDetectorVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDetectorVersionErrorKind::InternalServerException(_inner) => Some(_inner),
GetDetectorVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDetectorVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDetectorVersionErrorKind::ValidationException(_inner) => Some(_inner),
GetDetectorVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDetectorsError {
pub kind: GetDetectorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDetectorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDetectorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDetectorsErrorKind {
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 GetDetectorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDetectorsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDetectorsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDetectorsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDetectorsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDetectorsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDetectorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDetectorsError {
fn code(&self) -> Option<&str> {
GetDetectorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDetectorsError {
pub fn new(kind: GetDetectorsErrorKind, 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: GetDetectorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDetectorsErrorKind::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, GetDetectorsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetDetectorsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetDetectorsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetDetectorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDetectorsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDetectorsErrorKind::InternalServerException(_inner) => Some(_inner),
GetDetectorsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDetectorsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDetectorsErrorKind::ValidationException(_inner) => Some(_inner),
GetDetectorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDeleteEventsByEventTypeStatusError {
pub kind: GetDeleteEventsByEventTypeStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDeleteEventsByEventTypeStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDeleteEventsByEventTypeStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDeleteEventsByEventTypeStatusErrorKind {
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 GetDeleteEventsByEventTypeStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDeleteEventsByEventTypeStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetDeleteEventsByEventTypeStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetDeleteEventsByEventTypeStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetDeleteEventsByEventTypeStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDeleteEventsByEventTypeStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDeleteEventsByEventTypeStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDeleteEventsByEventTypeStatusError {
fn code(&self) -> Option<&str> {
GetDeleteEventsByEventTypeStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDeleteEventsByEventTypeStatusError {
pub fn new(
kind: GetDeleteEventsByEventTypeStatusErrorKind,
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: GetDeleteEventsByEventTypeStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDeleteEventsByEventTypeStatusErrorKind::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,
GetDeleteEventsByEventTypeStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDeleteEventsByEventTypeStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDeleteEventsByEventTypeStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDeleteEventsByEventTypeStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDeleteEventsByEventTypeStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDeleteEventsByEventTypeStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDeleteEventsByEventTypeStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetDeleteEventsByEventTypeStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetDeleteEventsByEventTypeStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetDeleteEventsByEventTypeStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDeleteEventsByEventTypeStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetDeleteEventsByEventTypeStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBatchPredictionJobsError {
pub kind: GetBatchPredictionJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBatchPredictionJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBatchPredictionJobsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBatchPredictionJobsErrorKind {
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 GetBatchPredictionJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBatchPredictionJobsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetBatchPredictionJobsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetBatchPredictionJobsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetBatchPredictionJobsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetBatchPredictionJobsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetBatchPredictionJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBatchPredictionJobsError {
fn code(&self) -> Option<&str> {
GetBatchPredictionJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBatchPredictionJobsError {
pub fn new(kind: GetBatchPredictionJobsErrorKind, 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: GetBatchPredictionJobsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBatchPredictionJobsErrorKind::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,
GetBatchPredictionJobsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionJobsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionJobsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionJobsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionJobsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetBatchPredictionJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBatchPredictionJobsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetBatchPredictionJobsErrorKind::InternalServerException(_inner) => Some(_inner),
GetBatchPredictionJobsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetBatchPredictionJobsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetBatchPredictionJobsErrorKind::ValidationException(_inner) => Some(_inner),
GetBatchPredictionJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBatchImportJobsError {
pub kind: GetBatchImportJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBatchImportJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBatchImportJobsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBatchImportJobsErrorKind {
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 GetBatchImportJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBatchImportJobsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetBatchImportJobsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetBatchImportJobsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetBatchImportJobsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetBatchImportJobsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetBatchImportJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBatchImportJobsError {
fn code(&self) -> Option<&str> {
GetBatchImportJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBatchImportJobsError {
pub fn new(kind: GetBatchImportJobsErrorKind, 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: GetBatchImportJobsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBatchImportJobsErrorKind::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,
GetBatchImportJobsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchImportJobsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchImportJobsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchImportJobsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchImportJobsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetBatchImportJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBatchImportJobsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetBatchImportJobsErrorKind::InternalServerException(_inner) => Some(_inner),
GetBatchImportJobsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetBatchImportJobsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetBatchImportJobsErrorKind::ValidationException(_inner) => Some(_inner),
GetBatchImportJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeModelVersionsError {
pub kind: DescribeModelVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeModelVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeModelVersionsErrorKind {
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 DescribeModelVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeModelVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeModelVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeModelVersionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeModelVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeModelVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeModelVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeModelVersionsError {
fn code(&self) -> Option<&str> {
DescribeModelVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeModelVersionsError {
pub fn new(kind: DescribeModelVersionsErrorKind, 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: DescribeModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeModelVersionsErrorKind::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,
DescribeModelVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeModelVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeModelVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeModelVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeModelVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeModelVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeModelVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeModelVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeModelVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeModelVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeModelVersionsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeModelVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDetectorError {
pub kind: DescribeDetectorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDetectorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDetectorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDetectorErrorKind {
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 DescribeDetectorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDetectorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeDetectorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeDetectorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDetectorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeDetectorErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeDetectorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDetectorError {
fn code(&self) -> Option<&str> {
DescribeDetectorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDetectorError {
pub fn new(kind: DescribeDetectorErrorKind, 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: DescribeDetectorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDetectorErrorKind::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,
DescribeDetectorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeDetectorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDetectorErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeDetectorErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeDetectorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDetectorErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeDetectorErrorKind::ValidationException(_inner) => Some(_inner),
DescribeDetectorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteVariableError {
pub kind: DeleteVariableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteVariableError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteVariableErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteVariableErrorKind {
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 DeleteVariableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteVariableErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteVariableErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteVariableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteVariableErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteVariableErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteVariableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteVariableError {
fn code(&self) -> Option<&str> {
DeleteVariableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteVariableError {
pub fn new(kind: DeleteVariableErrorKind, 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: DeleteVariableErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteVariableErrorKind::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,
DeleteVariableErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteVariableErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVariableErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteVariableErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteVariableErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteVariableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteVariableErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteVariableErrorKind::ConflictException(_inner) => Some(_inner),
DeleteVariableErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteVariableErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteVariableErrorKind::ValidationException(_inner) => Some(_inner),
DeleteVariableErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRuleError {
pub kind: DeleteRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRuleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRuleErrorKind {
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 DeleteRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRuleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteRuleErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteRuleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteRuleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteRuleErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRuleError {
fn code(&self) -> Option<&str> {
DeleteRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRuleError {
pub fn new(kind: DeleteRuleErrorKind, 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: DeleteRuleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRuleErrorKind::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, DeleteRuleErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteRuleErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteRuleErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteRuleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteRuleErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRuleErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteRuleErrorKind::ConflictException(_inner) => Some(_inner),
DeleteRuleErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteRuleErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteRuleErrorKind::ValidationException(_inner) => Some(_inner),
DeleteRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteOutcomeError {
pub kind: DeleteOutcomeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteOutcomeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteOutcomeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteOutcomeErrorKind {
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 DeleteOutcomeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteOutcomeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteOutcomeErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteOutcomeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteOutcomeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteOutcomeErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteOutcomeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteOutcomeError {
fn code(&self) -> Option<&str> {
DeleteOutcomeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteOutcomeError {
pub fn new(kind: DeleteOutcomeErrorKind, 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: DeleteOutcomeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteOutcomeErrorKind::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, DeleteOutcomeErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteOutcomeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOutcomeErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteOutcomeErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteOutcomeErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteOutcomeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteOutcomeErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteOutcomeErrorKind::ConflictException(_inner) => Some(_inner),
DeleteOutcomeErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteOutcomeErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteOutcomeErrorKind::ValidationException(_inner) => Some(_inner),
DeleteOutcomeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteModelVersionError {
pub kind: DeleteModelVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteModelVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteModelVersionErrorKind {
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 DeleteModelVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteModelVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteModelVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteModelVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteModelVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteModelVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteModelVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteModelVersionError {
fn code(&self) -> Option<&str> {
DeleteModelVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteModelVersionError {
pub fn new(kind: DeleteModelVersionErrorKind, 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: DeleteModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteModelVersionErrorKind::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,
DeleteModelVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelVersionErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteModelVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteModelVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteModelVersionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteModelVersionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteModelVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteModelVersionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteModelVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteModelError {
pub kind: DeleteModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteModelErrorKind {
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 DeleteModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteModelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteModelErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteModelErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteModelError {
fn code(&self) -> Option<&str> {
DeleteModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteModelError {
pub fn new(kind: DeleteModelErrorKind, 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: DeleteModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteModelErrorKind::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, DeleteModelErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteModelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteModelErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteModelErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteModelErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteModelErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteModelErrorKind::ConflictException(_inner) => Some(_inner),
DeleteModelErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteModelErrorKind::ValidationException(_inner) => Some(_inner),
DeleteModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLabelError {
pub kind: DeleteLabelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLabelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLabelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLabelErrorKind {
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 DeleteLabelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLabelErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteLabelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteLabelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteLabelErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteLabelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLabelError {
fn code(&self) -> Option<&str> {
DeleteLabelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLabelError {
pub fn new(kind: DeleteLabelErrorKind, 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: DeleteLabelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLabelErrorKind::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_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteLabelErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteLabelErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteLabelErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteLabelErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteLabelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLabelErrorKind::ConflictException(_inner) => Some(_inner),
DeleteLabelErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteLabelErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteLabelErrorKind::ValidationException(_inner) => Some(_inner),
DeleteLabelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteExternalModelError {
pub kind: DeleteExternalModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteExternalModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteExternalModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteExternalModelErrorKind {
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 DeleteExternalModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteExternalModelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteExternalModelErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteExternalModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteExternalModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteExternalModelErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteExternalModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteExternalModelError {
fn code(&self) -> Option<&str> {
DeleteExternalModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteExternalModelError {
pub fn new(kind: DeleteExternalModelErrorKind, 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: DeleteExternalModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteExternalModelErrorKind::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,
DeleteExternalModelErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExternalModelErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExternalModelErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExternalModelErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExternalModelErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteExternalModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteExternalModelErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteExternalModelErrorKind::ConflictException(_inner) => Some(_inner),
DeleteExternalModelErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteExternalModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteExternalModelErrorKind::ValidationException(_inner) => Some(_inner),
DeleteExternalModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEventTypeError {
pub kind: DeleteEventTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEventTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEventTypeErrorKind {
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 DeleteEventTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEventTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEventTypeErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEventTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEventTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEventTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEventTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEventTypeError {
fn code(&self) -> Option<&str> {
DeleteEventTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEventTypeError {
pub fn new(kind: DeleteEventTypeErrorKind, 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: DeleteEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEventTypeErrorKind::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,
DeleteEventTypeErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteEventTypeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventTypeErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteEventTypeErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteEventTypeErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteEventTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEventTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEventTypeErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEventTypeErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEventTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEventTypeErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEventTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEventsByEventTypeError {
pub kind: DeleteEventsByEventTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEventsByEventTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEventsByEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEventsByEventTypeErrorKind {
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 DeleteEventsByEventTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEventsByEventTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEventsByEventTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEventsByEventTypeError {
fn code(&self) -> Option<&str> {
DeleteEventsByEventTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEventsByEventTypeError {
pub fn new(kind: DeleteEventsByEventTypeErrorKind, 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: DeleteEventsByEventTypeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEventsByEventTypeErrorKind::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,
DeleteEventsByEventTypeErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventsByEventTypeErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventsByEventTypeErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventsByEventTypeErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventsByEventTypeErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventsByEventTypeErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEventsByEventTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEventsByEventTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEventsByEventTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEventError {
pub kind: DeleteEventErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEventError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEventErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEventErrorKind {
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 DeleteEventError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEventErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEventErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEventErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEventErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEventErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEventError {
fn code(&self) -> Option<&str> {
DeleteEventError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEventError {
pub fn new(kind: DeleteEventErrorKind, 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: DeleteEventErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEventErrorKind::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, DeleteEventErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteEventErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteEventErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteEventErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteEventError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEventErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEventErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEventErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEventErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEventErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEntityTypeError {
pub kind: DeleteEntityTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEntityTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEntityTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEntityTypeErrorKind {
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 DeleteEntityTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEntityTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEntityTypeErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteEntityTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEntityTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEntityTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEntityTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEntityTypeError {
fn code(&self) -> Option<&str> {
DeleteEntityTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEntityTypeError {
pub fn new(kind: DeleteEntityTypeErrorKind, 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: DeleteEntityTypeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEntityTypeErrorKind::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,
DeleteEntityTypeErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteEntityTypeErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntityTypeErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntityTypeErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntityTypeErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEntityTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEntityTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEntityTypeErrorKind::ConflictException(_inner) => Some(_inner),
DeleteEntityTypeErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEntityTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEntityTypeErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEntityTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDetectorVersionError {
pub kind: DeleteDetectorVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDetectorVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDetectorVersionErrorKind {
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 DeleteDetectorVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDetectorVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDetectorVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDetectorVersionError {
fn code(&self) -> Option<&str> {
DeleteDetectorVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDetectorVersionError {
pub fn new(kind: DeleteDetectorVersionErrorKind, 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: DeleteDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDetectorVersionErrorKind::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,
DeleteDetectorVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDetectorVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDetectorVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDetectorVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDetectorError {
pub kind: DeleteDetectorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDetectorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDetectorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDetectorErrorKind {
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 DeleteDetectorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDetectorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDetectorErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDetectorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDetectorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDetectorErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDetectorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDetectorError {
fn code(&self) -> Option<&str> {
DeleteDetectorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDetectorError {
pub fn new(kind: DeleteDetectorErrorKind, 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: DeleteDetectorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDetectorErrorKind::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,
DeleteDetectorErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteDetectorErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteDetectorErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteDetectorErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteDetectorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDetectorErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDetectorErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDetectorErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDetectorErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDetectorErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDetectorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBatchPredictionJobError {
pub kind: DeleteBatchPredictionJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBatchPredictionJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBatchPredictionJobErrorKind {
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 DeleteBatchPredictionJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBatchPredictionJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteBatchPredictionJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteBatchPredictionJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteBatchPredictionJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteBatchPredictionJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBatchPredictionJobError {
fn code(&self) -> Option<&str> {
DeleteBatchPredictionJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBatchPredictionJobError {
pub fn new(kind: DeleteBatchPredictionJobErrorKind, 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: DeleteBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBatchPredictionJobErrorKind::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,
DeleteBatchPredictionJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionJobErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteBatchPredictionJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBatchPredictionJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteBatchPredictionJobErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteBatchPredictionJobErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteBatchPredictionJobErrorKind::ValidationException(_inner) => Some(_inner),
DeleteBatchPredictionJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBatchImportJobError {
pub kind: DeleteBatchImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBatchImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBatchImportJobErrorKind {
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 DeleteBatchImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBatchImportJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteBatchImportJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteBatchImportJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteBatchImportJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteBatchImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBatchImportJobError {
fn code(&self) -> Option<&str> {
DeleteBatchImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBatchImportJobError {
pub fn new(kind: DeleteBatchImportJobErrorKind, 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: DeleteBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBatchImportJobErrorKind::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,
DeleteBatchImportJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchImportJobErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchImportJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchImportJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteBatchImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBatchImportJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteBatchImportJobErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteBatchImportJobErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteBatchImportJobErrorKind::ValidationException(_inner) => Some(_inner),
DeleteBatchImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateVariableError {
pub kind: CreateVariableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateVariableError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateVariableErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateVariableErrorKind {
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 CreateVariableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateVariableErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateVariableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateVariableErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateVariableErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateVariableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateVariableError {
fn code(&self) -> Option<&str> {
CreateVariableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateVariableError {
pub fn new(kind: CreateVariableErrorKind, 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: CreateVariableErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateVariableErrorKind::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,
CreateVariableErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateVariableErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateVariableErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateVariableErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateVariableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateVariableErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateVariableErrorKind::InternalServerException(_inner) => Some(_inner),
CreateVariableErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateVariableErrorKind::ValidationException(_inner) => Some(_inner),
CreateVariableErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRuleError {
pub kind: CreateRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRuleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRuleErrorKind {
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 CreateRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRuleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateRuleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateRuleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateRuleErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRuleError {
fn code(&self) -> Option<&str> {
CreateRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateRuleError {
pub fn new(kind: CreateRuleErrorKind, 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: CreateRuleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRuleErrorKind::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, CreateRuleErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateRuleErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateRuleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateRuleErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRuleErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateRuleErrorKind::InternalServerException(_inner) => Some(_inner),
CreateRuleErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateRuleErrorKind::ValidationException(_inner) => Some(_inner),
CreateRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateModelVersionError {
pub kind: CreateModelVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateModelVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateModelVersionErrorKind {
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 CreateModelVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateModelVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateModelVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateModelVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateModelVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateModelVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateModelVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateModelVersionError {
fn code(&self) -> Option<&str> {
CreateModelVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateModelVersionError {
pub fn new(kind: CreateModelVersionErrorKind, 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: CreateModelVersionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateModelVersionErrorKind::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,
CreateModelVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateModelVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateModelVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateModelVersionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateModelVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateModelVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateModelVersionErrorKind::ValidationException(_inner) => Some(_inner),
CreateModelVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateModelError {
pub kind: CreateModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateModelErrorKind {
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 CreateModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateModelErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateModelErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateModelError {
fn code(&self) -> Option<&str> {
CreateModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateModelError {
pub fn new(kind: CreateModelErrorKind, 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: CreateModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateModelErrorKind::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, CreateModelErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateModelErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateModelErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateModelErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateModelErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateModelErrorKind::InternalServerException(_inner) => Some(_inner),
CreateModelErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateModelErrorKind::ValidationException(_inner) => Some(_inner),
CreateModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDetectorVersionError {
pub kind: CreateDetectorVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDetectorVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDetectorVersionErrorKind {
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 CreateDetectorVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDetectorVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDetectorVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDetectorVersionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDetectorVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDetectorVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDetectorVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDetectorVersionError {
fn code(&self) -> Option<&str> {
CreateDetectorVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDetectorVersionError {
pub fn new(kind: CreateDetectorVersionErrorKind, 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: CreateDetectorVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDetectorVersionErrorKind::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,
CreateDetectorVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateDetectorVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDetectorVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDetectorVersionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDetectorVersionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDetectorVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDetectorVersionErrorKind::ValidationException(_inner) => Some(_inner),
CreateDetectorVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBatchPredictionJobError {
pub kind: CreateBatchPredictionJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBatchPredictionJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBatchPredictionJobErrorKind {
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 CreateBatchPredictionJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBatchPredictionJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateBatchPredictionJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateBatchPredictionJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateBatchPredictionJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateBatchPredictionJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateBatchPredictionJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBatchPredictionJobError {
fn code(&self) -> Option<&str> {
CreateBatchPredictionJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBatchPredictionJobError {
pub fn new(kind: CreateBatchPredictionJobErrorKind, 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: CreateBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBatchPredictionJobErrorKind::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,
CreateBatchPredictionJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateBatchPredictionJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBatchPredictionJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateBatchPredictionJobErrorKind::InternalServerException(_inner) => Some(_inner),
CreateBatchPredictionJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateBatchPredictionJobErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateBatchPredictionJobErrorKind::ValidationException(_inner) => Some(_inner),
CreateBatchPredictionJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBatchImportJobError {
pub kind: CreateBatchImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBatchImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBatchImportJobErrorKind {
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 CreateBatchImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBatchImportJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateBatchImportJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateBatchImportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateBatchImportJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateBatchImportJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateBatchImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBatchImportJobError {
fn code(&self) -> Option<&str> {
CreateBatchImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBatchImportJobError {
pub fn new(kind: CreateBatchImportJobErrorKind, 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: CreateBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBatchImportJobErrorKind::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,
CreateBatchImportJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchImportJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchImportJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchImportJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchImportJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateBatchImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBatchImportJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateBatchImportJobErrorKind::InternalServerException(_inner) => Some(_inner),
CreateBatchImportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateBatchImportJobErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateBatchImportJobErrorKind::ValidationException(_inner) => Some(_inner),
CreateBatchImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelBatchPredictionJobError {
pub kind: CancelBatchPredictionJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelBatchPredictionJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelBatchPredictionJobErrorKind {
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 CancelBatchPredictionJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelBatchPredictionJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelBatchPredictionJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelBatchPredictionJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelBatchPredictionJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelBatchPredictionJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelBatchPredictionJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelBatchPredictionJobError {
fn code(&self) -> Option<&str> {
CancelBatchPredictionJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelBatchPredictionJobError {
pub fn new(kind: CancelBatchPredictionJobErrorKind, 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: CancelBatchPredictionJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelBatchPredictionJobErrorKind::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,
CancelBatchPredictionJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchPredictionJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchPredictionJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchPredictionJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchPredictionJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelBatchPredictionJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelBatchPredictionJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelBatchPredictionJobErrorKind::InternalServerException(_inner) => Some(_inner),
CancelBatchPredictionJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelBatchPredictionJobErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelBatchPredictionJobErrorKind::ValidationException(_inner) => Some(_inner),
CancelBatchPredictionJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelBatchImportJobError {
pub kind: CancelBatchImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelBatchImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelBatchImportJobErrorKind {
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 CancelBatchImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelBatchImportJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelBatchImportJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelBatchImportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelBatchImportJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelBatchImportJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelBatchImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelBatchImportJobError {
fn code(&self) -> Option<&str> {
CancelBatchImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelBatchImportJobError {
pub fn new(kind: CancelBatchImportJobErrorKind, 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: CancelBatchImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelBatchImportJobErrorKind::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,
CancelBatchImportJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchImportJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchImportJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchImportJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelBatchImportJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelBatchImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelBatchImportJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelBatchImportJobErrorKind::InternalServerException(_inner) => Some(_inner),
CancelBatchImportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelBatchImportJobErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelBatchImportJobErrorKind::ValidationException(_inner) => Some(_inner),
CancelBatchImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetVariableError {
pub kind: BatchGetVariableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetVariableError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetVariableErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetVariableErrorKind {
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 BatchGetVariableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetVariableErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchGetVariableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchGetVariableErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchGetVariableErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchGetVariableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetVariableError {
fn code(&self) -> Option<&str> {
BatchGetVariableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetVariableError {
pub fn new(kind: BatchGetVariableErrorKind, 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: BatchGetVariableErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetVariableErrorKind::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,
BatchGetVariableErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetVariableErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetVariableErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetVariableErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchGetVariableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetVariableErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchGetVariableErrorKind::InternalServerException(_inner) => Some(_inner),
BatchGetVariableErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchGetVariableErrorKind::ValidationException(_inner) => Some(_inner),
BatchGetVariableErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchCreateVariableError {
pub kind: BatchCreateVariableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchCreateVariableError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchCreateVariableErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchCreateVariableErrorKind {
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 BatchCreateVariableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchCreateVariableErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchCreateVariableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchCreateVariableErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchCreateVariableErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchCreateVariableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchCreateVariableError {
fn code(&self) -> Option<&str> {
BatchCreateVariableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchCreateVariableError {
pub fn new(kind: BatchCreateVariableErrorKind, 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: BatchCreateVariableErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchCreateVariableErrorKind::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,
BatchCreateVariableErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVariableErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVariableErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVariableErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchCreateVariableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchCreateVariableErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchCreateVariableErrorKind::InternalServerException(_inner) => Some(_inner),
BatchCreateVariableErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchCreateVariableErrorKind::ValidationException(_inner) => Some(_inner),
BatchCreateVariableErrorKind::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 _)
}
}