#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDatasetGroupError {
pub kind: UpdateDatasetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDatasetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDatasetGroupErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDatasetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDatasetGroupErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateDatasetGroupErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateDatasetGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDatasetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDatasetGroupError {
fn code(&self) -> Option<&str> {
UpdateDatasetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDatasetGroupError {
pub fn new(kind: UpdateDatasetGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDatasetGroupErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDatasetGroupErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDatasetGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateDatasetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDatasetGroupErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateDatasetGroupErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateDatasetGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDatasetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
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 ResourceInUseException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseException {}
pub mod resource_in_use_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceInUseException {
crate::error::ResourceInUseException {
message: self.message,
}
}
}
}
impl ResourceInUseException {
pub fn builder() -> crate::error::resource_in_use_exception::Builder {
crate::error::resource_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidInputException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidInputException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidInputException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidInputException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidInputException {}
pub mod invalid_input_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::InvalidInputException {
crate::error::InvalidInputException {
message: self.message,
}
}
}
}
impl InvalidInputException {
pub fn builder() -> crate::error::invalid_input_exception::Builder {
crate::error::invalid_input_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InvalidInputException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_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 {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InvalidInputException(_inner) => _inner.fmt(f),
TagResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidInputException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::LimitExceededException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
TagResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopResourceError {
pub kind: StopResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopResourceErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopResourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
StopResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StopResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopResourceError {
fn code(&self) -> Option<&str> {
StopResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopResourceError {
pub fn new(kind: StopResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StopResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, StopResourceErrorKind::InvalidInputException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, StopResourceErrorKind::LimitExceededException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StopResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
StopResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
StopResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResumeResourceError {
pub kind: ResumeResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResumeResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResumeResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResumeResourceErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResumeResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResumeResourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ResumeResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ResumeResourceErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
ResumeResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ResumeResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResumeResourceError {
fn code(&self) -> Option<&str> {
ResumeResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResumeResourceError {
pub fn new(kind: ResumeResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ResumeResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResumeResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ResumeResourceErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ResumeResourceErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
ResumeResourceErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ResumeResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ResumeResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResumeResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
ResumeResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
ResumeResourceErrorKind::ResourceInUseException(_inner) => Some(_inner),
ResumeResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ResumeResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWhatIfForecastsError {
pub kind: ListWhatIfForecastsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWhatIfForecastsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWhatIfForecastsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWhatIfForecastsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWhatIfForecastsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWhatIfForecastsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListWhatIfForecastsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListWhatIfForecastsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWhatIfForecastsError {
fn code(&self) -> Option<&str> {
ListWhatIfForecastsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListWhatIfForecastsError {
pub fn new(kind: ListWhatIfForecastsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListWhatIfForecastsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWhatIfForecastsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfForecastsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfForecastsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListWhatIfForecastsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWhatIfForecastsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListWhatIfForecastsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListWhatIfForecastsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_token_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWhatIfForecastExportsError {
pub kind: ListWhatIfForecastExportsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWhatIfForecastExportsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWhatIfForecastExportsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWhatIfForecastExportsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWhatIfForecastExportsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWhatIfForecastExportsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListWhatIfForecastExportsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListWhatIfForecastExportsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWhatIfForecastExportsError {
fn code(&self) -> Option<&str> {
ListWhatIfForecastExportsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListWhatIfForecastExportsError {
pub fn new(kind: ListWhatIfForecastExportsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListWhatIfForecastExportsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWhatIfForecastExportsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfForecastExportsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfForecastExportsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListWhatIfForecastExportsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWhatIfForecastExportsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListWhatIfForecastExportsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListWhatIfForecastExportsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWhatIfAnalysesError {
pub kind: ListWhatIfAnalysesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWhatIfAnalysesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWhatIfAnalysesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWhatIfAnalysesErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWhatIfAnalysesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWhatIfAnalysesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListWhatIfAnalysesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListWhatIfAnalysesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWhatIfAnalysesError {
fn code(&self) -> Option<&str> {
ListWhatIfAnalysesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListWhatIfAnalysesError {
pub fn new(kind: ListWhatIfAnalysesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListWhatIfAnalysesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWhatIfAnalysesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfAnalysesErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListWhatIfAnalysesErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListWhatIfAnalysesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWhatIfAnalysesErrorKind::InvalidInputException(_inner) => Some(_inner),
ListWhatIfAnalysesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListWhatIfAnalysesErrorKind::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 {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InvalidInputException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPredictorsError {
pub kind: ListPredictorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPredictorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPredictorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPredictorsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPredictorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPredictorsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListPredictorsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListPredictorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPredictorsError {
fn code(&self) -> Option<&str> {
ListPredictorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPredictorsError {
pub fn new(kind: ListPredictorsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListPredictorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPredictorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListPredictorsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListPredictorsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListPredictorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPredictorsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListPredictorsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListPredictorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPredictorBacktestExportJobsError {
pub kind: ListPredictorBacktestExportJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPredictorBacktestExportJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPredictorBacktestExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPredictorBacktestExportJobsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPredictorBacktestExportJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPredictorBacktestExportJobsErrorKind::InvalidInputException(_inner) => {
_inner.fmt(f)
}
ListPredictorBacktestExportJobsErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
ListPredictorBacktestExportJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPredictorBacktestExportJobsError {
fn code(&self) -> Option<&str> {
ListPredictorBacktestExportJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPredictorBacktestExportJobsError {
pub fn new(
kind: ListPredictorBacktestExportJobsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListPredictorBacktestExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPredictorBacktestExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListPredictorBacktestExportJobsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListPredictorBacktestExportJobsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListPredictorBacktestExportJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPredictorBacktestExportJobsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListPredictorBacktestExportJobsErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
ListPredictorBacktestExportJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMonitorsError {
pub kind: ListMonitorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListMonitorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListMonitorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMonitorsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListMonitorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMonitorsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListMonitorsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListMonitorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMonitorsError {
fn code(&self) -> Option<&str> {
ListMonitorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMonitorsError {
pub fn new(kind: ListMonitorsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListMonitorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMonitorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, ListMonitorsErrorKind::InvalidInputException(_))
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListMonitorsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListMonitorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMonitorsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListMonitorsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListMonitorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMonitorEvaluationsError {
pub kind: ListMonitorEvaluationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListMonitorEvaluationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListMonitorEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMonitorEvaluationsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListMonitorEvaluationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMonitorEvaluationsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListMonitorEvaluationsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListMonitorEvaluationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListMonitorEvaluationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMonitorEvaluationsError {
fn code(&self) -> Option<&str> {
ListMonitorEvaluationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMonitorEvaluationsError {
pub fn new(kind: ListMonitorEvaluationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListMonitorEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMonitorEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListMonitorEvaluationsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListMonitorEvaluationsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListMonitorEvaluationsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListMonitorEvaluationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMonitorEvaluationsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListMonitorEvaluationsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListMonitorEvaluationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListMonitorEvaluationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListForecastsError {
pub kind: ListForecastsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListForecastsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListForecastsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListForecastsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListForecastsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListForecastsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListForecastsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListForecastsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListForecastsError {
fn code(&self) -> Option<&str> {
ListForecastsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListForecastsError {
pub fn new(kind: ListForecastsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListForecastsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListForecastsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, ListForecastsErrorKind::InvalidInputException(_))
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListForecastsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListForecastsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListForecastsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListForecastsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListForecastsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListForecastExportJobsError {
pub kind: ListForecastExportJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListForecastExportJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListForecastExportJobsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListForecastExportJobsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListForecastExportJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListForecastExportJobsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListForecastExportJobsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListForecastExportJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListForecastExportJobsError {
fn code(&self) -> Option<&str> {
ListForecastExportJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListForecastExportJobsError {
pub fn new(kind: ListForecastExportJobsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListForecastExportJobsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListForecastExportJobsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListForecastExportJobsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListForecastExportJobsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListForecastExportJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListForecastExportJobsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListForecastExportJobsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListForecastExportJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListExplainabilityExportsError {
pub kind: ListExplainabilityExportsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListExplainabilityExportsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListExplainabilityExportsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListExplainabilityExportsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListExplainabilityExportsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListExplainabilityExportsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListExplainabilityExportsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListExplainabilityExportsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListExplainabilityExportsError {
fn code(&self) -> Option<&str> {
ListExplainabilityExportsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListExplainabilityExportsError {
pub fn new(kind: ListExplainabilityExportsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListExplainabilityExportsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListExplainabilityExportsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListExplainabilityExportsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListExplainabilityExportsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListExplainabilityExportsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListExplainabilityExportsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListExplainabilityExportsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListExplainabilityExportsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListExplainabilitiesError {
pub kind: ListExplainabilitiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListExplainabilitiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListExplainabilitiesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListExplainabilitiesErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListExplainabilitiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListExplainabilitiesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListExplainabilitiesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListExplainabilitiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListExplainabilitiesError {
fn code(&self) -> Option<&str> {
ListExplainabilitiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListExplainabilitiesError {
pub fn new(kind: ListExplainabilitiesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListExplainabilitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListExplainabilitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListExplainabilitiesErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListExplainabilitiesErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListExplainabilitiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListExplainabilitiesErrorKind::InvalidInputException(_inner) => Some(_inner),
ListExplainabilitiesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListExplainabilitiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDatasetsError {
pub kind: ListDatasetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDatasetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDatasetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDatasetsErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDatasetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDatasetsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListDatasetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDatasetsError {
fn code(&self) -> Option<&str> {
ListDatasetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDatasetsError {
pub fn new(kind: ListDatasetsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListDatasetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDatasetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListDatasetsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListDatasetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDatasetsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListDatasetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDatasetImportJobsError {
pub kind: ListDatasetImportJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDatasetImportJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDatasetImportJobsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDatasetImportJobsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDatasetImportJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDatasetImportJobsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListDatasetImportJobsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListDatasetImportJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDatasetImportJobsError {
fn code(&self) -> Option<&str> {
ListDatasetImportJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDatasetImportJobsError {
pub fn new(kind: ListDatasetImportJobsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListDatasetImportJobsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDatasetImportJobsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListDatasetImportJobsErrorKind::InvalidInputException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListDatasetImportJobsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListDatasetImportJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDatasetImportJobsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListDatasetImportJobsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListDatasetImportJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDatasetGroupsError {
pub kind: ListDatasetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDatasetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDatasetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDatasetGroupsErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDatasetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDatasetGroupsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListDatasetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDatasetGroupsError {
fn code(&self) -> Option<&str> {
ListDatasetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDatasetGroupsError {
pub fn new(kind: ListDatasetGroupsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListDatasetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDatasetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListDatasetGroupsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListDatasetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDatasetGroupsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListDatasetGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAccuracyMetricsError {
pub kind: GetAccuracyMetricsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAccuracyMetricsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAccuracyMetricsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAccuracyMetricsErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAccuracyMetricsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAccuracyMetricsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
GetAccuracyMetricsErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
GetAccuracyMetricsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetAccuracyMetricsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAccuracyMetricsError {
fn code(&self) -> Option<&str> {
GetAccuracyMetricsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAccuracyMetricsError {
pub fn new(kind: GetAccuracyMetricsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetAccuracyMetricsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAccuracyMetricsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
GetAccuracyMetricsErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
GetAccuracyMetricsErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetAccuracyMetricsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetAccuracyMetricsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAccuracyMetricsErrorKind::InvalidInputException(_inner) => Some(_inner),
GetAccuracyMetricsErrorKind::ResourceInUseException(_inner) => Some(_inner),
GetAccuracyMetricsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetAccuracyMetricsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWhatIfForecastExportError {
pub kind: DescribeWhatIfForecastExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWhatIfForecastExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWhatIfForecastExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWhatIfForecastExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWhatIfForecastExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeWhatIfForecastExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWhatIfForecastExportError {
fn code(&self) -> Option<&str> {
DescribeWhatIfForecastExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWhatIfForecastExportError {
pub fn new(kind: DescribeWhatIfForecastExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfForecastExportErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfForecastExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeWhatIfForecastExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWhatIfForecastExportErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeWhatIfForecastExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWhatIfForecastError {
pub kind: DescribeWhatIfForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWhatIfForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWhatIfForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWhatIfForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWhatIfForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeWhatIfForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWhatIfForecastError {
fn code(&self) -> Option<&str> {
DescribeWhatIfForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWhatIfForecastError {
pub fn new(kind: DescribeWhatIfForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeWhatIfForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWhatIfForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeWhatIfForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWhatIfAnalysisError {
pub kind: DescribeWhatIfAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWhatIfAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWhatIfAnalysisErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWhatIfAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWhatIfAnalysisErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeWhatIfAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWhatIfAnalysisError {
fn code(&self) -> Option<&str> {
DescribeWhatIfAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWhatIfAnalysisError {
pub fn new(kind: DescribeWhatIfAnalysisErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfAnalysisErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWhatIfAnalysisErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeWhatIfAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWhatIfAnalysisErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeWhatIfAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePredictorBacktestExportJobError {
pub kind: DescribePredictorBacktestExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePredictorBacktestExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePredictorBacktestExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePredictorBacktestExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
_inner.fmt(f)
}
DescribePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribePredictorBacktestExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePredictorBacktestExportJobError {
fn code(&self) -> Option<&str> {
DescribePredictorBacktestExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePredictorBacktestExportJobError {
pub fn new(
kind: DescribePredictorBacktestExportJobErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribePredictorBacktestExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribePredictorBacktestExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
Some(_inner)
}
DescribePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribePredictorBacktestExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePredictorError {
pub kind: DescribePredictorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePredictorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePredictorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePredictorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePredictorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePredictorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribePredictorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribePredictorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePredictorError {
fn code(&self) -> Option<&str> {
DescribePredictorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePredictorError {
pub fn new(kind: DescribePredictorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribePredictorErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePredictorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribePredictorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePredictorErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribePredictorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribePredictorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeMonitorError {
pub kind: DescribeMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeMonitorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeMonitorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeMonitorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeMonitorError {
fn code(&self) -> Option<&str> {
DescribeMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeMonitorError {
pub fn new(kind: DescribeMonitorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMonitorErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMonitorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeMonitorErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeMonitorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeMonitorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeForecastExportJobError {
pub kind: DescribeForecastExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeForecastExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeForecastExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeForecastExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeForecastExportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeForecastExportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeForecastExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeForecastExportJobError {
fn code(&self) -> Option<&str> {
DescribeForecastExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeForecastExportJobError {
pub fn new(kind: DescribeForecastExportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeForecastExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeForecastExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeForecastExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeForecastExportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeForecastExportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeForecastExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeForecastError {
pub kind: DescribeForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeForecastError {
fn code(&self) -> Option<&str> {
DescribeForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeForecastError {
pub fn new(kind: DescribeForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeExplainabilityExportError {
pub kind: DescribeExplainabilityExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeExplainabilityExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeExplainabilityExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeExplainabilityExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeExplainabilityExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeExplainabilityExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeExplainabilityExportError {
fn code(&self) -> Option<&str> {
DescribeExplainabilityExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeExplainabilityExportError {
pub fn new(kind: DescribeExplainabilityExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeExplainabilityExportErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeExplainabilityExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeExplainabilityExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeExplainabilityExportErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeExplainabilityExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeExplainabilityError {
pub kind: DescribeExplainabilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeExplainabilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeExplainabilityErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeExplainabilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeExplainabilityErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeExplainabilityErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeExplainabilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeExplainabilityError {
fn code(&self) -> Option<&str> {
DescribeExplainabilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeExplainabilityError {
pub fn new(kind: DescribeExplainabilityErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeExplainabilityErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeExplainabilityErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeExplainabilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeExplainabilityErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeExplainabilityErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeExplainabilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDatasetImportJobError {
pub kind: DescribeDatasetImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDatasetImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDatasetImportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDatasetImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDatasetImportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDatasetImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDatasetImportJobError {
fn code(&self) -> Option<&str> {
DescribeDatasetImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDatasetImportJobError {
pub fn new(kind: DescribeDatasetImportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetImportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetImportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDatasetImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDatasetImportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDatasetImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDatasetGroupError {
pub kind: DescribeDatasetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDatasetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDatasetGroupErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDatasetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDatasetGroupErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeDatasetGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDatasetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDatasetGroupError {
fn code(&self) -> Option<&str> {
DescribeDatasetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDatasetGroupError {
pub fn new(kind: DescribeDatasetGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetGroupErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDatasetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDatasetGroupErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeDatasetGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDatasetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDatasetError {
pub kind: DescribeDatasetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDatasetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDatasetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDatasetErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDatasetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDatasetErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeDatasetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDatasetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDatasetError {
fn code(&self) -> Option<&str> {
DescribeDatasetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDatasetError {
pub fn new(kind: DescribeDatasetErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDatasetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDatasetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDatasetErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeDatasetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDatasetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAutoPredictorError {
pub kind: DescribeAutoPredictorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAutoPredictorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAutoPredictorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAutoPredictorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAutoPredictorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeAutoPredictorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeAutoPredictorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAutoPredictorError {
fn code(&self) -> Option<&str> {
DescribeAutoPredictorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAutoPredictorError {
pub fn new(kind: DescribeAutoPredictorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAutoPredictorErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAutoPredictorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeAutoPredictorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAutoPredictorErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeAutoPredictorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeAutoPredictorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWhatIfForecastExportError {
pub kind: DeleteWhatIfForecastExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWhatIfForecastExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWhatIfForecastExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWhatIfForecastExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWhatIfForecastExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastExportErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWhatIfForecastExportError {
fn code(&self) -> Option<&str> {
DeleteWhatIfForecastExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWhatIfForecastExportError {
pub fn new(kind: DeleteWhatIfForecastExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastExportErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastExportErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteWhatIfForecastExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWhatIfForecastExportErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteWhatIfForecastExportErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWhatIfForecastExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWhatIfForecastError {
pub kind: DeleteWhatIfForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWhatIfForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWhatIfForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWhatIfForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWhatIfForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWhatIfForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWhatIfForecastError {
fn code(&self) -> Option<&str> {
DeleteWhatIfForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWhatIfForecastError {
pub fn new(kind: DeleteWhatIfForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteWhatIfForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWhatIfForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteWhatIfForecastErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWhatIfForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWhatIfAnalysisError {
pub kind: DeleteWhatIfAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWhatIfAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWhatIfAnalysisErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWhatIfAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWhatIfAnalysisErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteWhatIfAnalysisErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWhatIfAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWhatIfAnalysisError {
fn code(&self) -> Option<&str> {
DeleteWhatIfAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWhatIfAnalysisError {
pub fn new(kind: DeleteWhatIfAnalysisErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfAnalysisErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfAnalysisErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWhatIfAnalysisErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteWhatIfAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWhatIfAnalysisErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteWhatIfAnalysisErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWhatIfAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteResourceTreeError {
pub kind: DeleteResourceTreeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteResourceTreeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteResourceTreeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteResourceTreeErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteResourceTreeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteResourceTreeErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteResourceTreeErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteResourceTreeErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteResourceTreeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteResourceTreeError {
fn code(&self) -> Option<&str> {
DeleteResourceTreeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteResourceTreeError {
pub fn new(kind: DeleteResourceTreeErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteResourceTreeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteResourceTreeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourceTreeErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourceTreeErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourceTreeErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteResourceTreeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteResourceTreeErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteResourceTreeErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteResourceTreeErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteResourceTreeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePredictorBacktestExportJobError {
pub kind: DeletePredictorBacktestExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePredictorBacktestExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePredictorBacktestExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePredictorBacktestExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
_inner.fmt(f)
}
DeletePredictorBacktestExportJobErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
DeletePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeletePredictorBacktestExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePredictorBacktestExportJobError {
fn code(&self) -> Option<&str> {
DeletePredictorBacktestExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePredictorBacktestExportJobError {
pub fn new(
kind: DeletePredictorBacktestExportJobErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeletePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorBacktestExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorBacktestExportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeletePredictorBacktestExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
Some(_inner)
}
DeletePredictorBacktestExportJobErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
DeletePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeletePredictorBacktestExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePredictorError {
pub kind: DeletePredictorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePredictorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePredictorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePredictorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePredictorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePredictorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeletePredictorErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeletePredictorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePredictorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePredictorError {
fn code(&self) -> Option<&str> {
DeletePredictorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePredictorError {
pub fn new(kind: DeletePredictorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeletePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePredictorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeletePredictorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePredictorErrorKind::InvalidInputException(_inner) => Some(_inner),
DeletePredictorErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeletePredictorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePredictorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMonitorError {
pub kind: DeleteMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMonitorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMonitorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteMonitorErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteMonitorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMonitorError {
fn code(&self) -> Option<&str> {
DeleteMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteMonitorError {
pub fn new(kind: DeleteMonitorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, DeleteMonitorErrorKind::InvalidInputException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMonitorErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMonitorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMonitorErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteMonitorErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteMonitorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteMonitorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteForecastExportJobError {
pub kind: DeleteForecastExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteForecastExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteForecastExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteForecastExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteForecastExportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteForecastExportJobErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteForecastExportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteForecastExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteForecastExportJobError {
fn code(&self) -> Option<&str> {
DeleteForecastExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteForecastExportJobError {
pub fn new(kind: DeleteForecastExportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastExportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteForecastExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteForecastExportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteForecastExportJobErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteForecastExportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteForecastExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteForecastError {
pub kind: DeleteForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteForecastErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteForecastError {
fn code(&self) -> Option<&str> {
DeleteForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteForecastError {
pub fn new(kind: DeleteForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteForecastErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteExplainabilityExportError {
pub kind: DeleteExplainabilityExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteExplainabilityExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteExplainabilityExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteExplainabilityExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteExplainabilityExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteExplainabilityExportErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteExplainabilityExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteExplainabilityExportError {
fn code(&self) -> Option<&str> {
DeleteExplainabilityExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteExplainabilityExportError {
pub fn new(kind: DeleteExplainabilityExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityExportErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityExportErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteExplainabilityExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteExplainabilityExportErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteExplainabilityExportErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteExplainabilityExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteExplainabilityError {
pub kind: DeleteExplainabilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteExplainabilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteExplainabilityErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteExplainabilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteExplainabilityErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteExplainabilityErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteExplainabilityErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteExplainabilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteExplainabilityError {
fn code(&self) -> Option<&str> {
DeleteExplainabilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteExplainabilityError {
pub fn new(kind: DeleteExplainabilityErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteExplainabilityErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteExplainabilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteExplainabilityErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteExplainabilityErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteExplainabilityErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteExplainabilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDatasetImportJobError {
pub kind: DeleteDatasetImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDatasetImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDatasetImportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDatasetImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDatasetImportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteDatasetImportJobErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDatasetImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDatasetImportJobError {
fn code(&self) -> Option<&str> {
DeleteDatasetImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDatasetImportJobError {
pub fn new(kind: DeleteDatasetImportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetImportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetImportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetImportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDatasetImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDatasetImportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteDatasetImportJobErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDatasetImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDatasetGroupError {
pub kind: DeleteDatasetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDatasetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDatasetGroupErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDatasetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDatasetGroupErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteDatasetGroupErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDatasetGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDatasetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDatasetGroupError {
fn code(&self) -> Option<&str> {
DeleteDatasetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDatasetGroupError {
pub fn new(kind: DeleteDatasetGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetGroupErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetGroupErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDatasetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDatasetGroupErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteDatasetGroupErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDatasetGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDatasetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDatasetError {
pub kind: DeleteDatasetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDatasetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDatasetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDatasetErrorKind {
InvalidInputException(crate::error::InvalidInputException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDatasetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDatasetErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteDatasetErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDatasetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDatasetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDatasetError {
fn code(&self) -> Option<&str> {
DeleteDatasetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDatasetError {
pub fn new(kind: DeleteDatasetErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, DeleteDatasetErrorKind::InvalidInputException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDatasetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDatasetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDatasetErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteDatasetErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDatasetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDatasetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWhatIfForecastExportError {
pub kind: CreateWhatIfForecastExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWhatIfForecastExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWhatIfForecastExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWhatIfForecastExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWhatIfForecastExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateWhatIfForecastExportErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateWhatIfForecastExportErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateWhatIfForecastExportErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateWhatIfForecastExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWhatIfForecastExportError {
fn code(&self) -> Option<&str> {
CreateWhatIfForecastExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWhatIfForecastExportError {
pub fn new(kind: CreateWhatIfForecastExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWhatIfForecastExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastExportErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastExportErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastExportErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastExportErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateWhatIfForecastExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWhatIfForecastExportErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateWhatIfForecastExportErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateWhatIfForecastExportErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateWhatIfForecastExportErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateWhatIfForecastExportErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateWhatIfForecastExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceAlreadyExistsException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceAlreadyExistsException {}
pub mod resource_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceAlreadyExistsException {
crate::error::ResourceAlreadyExistsException {
message: self.message,
}
}
}
}
impl ResourceAlreadyExistsException {
pub fn builder() -> crate::error::resource_already_exists_exception::Builder {
crate::error::resource_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWhatIfForecastError {
pub kind: CreateWhatIfForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWhatIfForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWhatIfForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWhatIfForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWhatIfForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateWhatIfForecastErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateWhatIfForecastErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateWhatIfForecastErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateWhatIfForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWhatIfForecastError {
fn code(&self) -> Option<&str> {
CreateWhatIfForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWhatIfForecastError {
pub fn new(kind: CreateWhatIfForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWhatIfForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateWhatIfForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWhatIfForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateWhatIfForecastErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateWhatIfForecastErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateWhatIfForecastErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateWhatIfForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateWhatIfForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWhatIfAnalysisError {
pub kind: CreateWhatIfAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWhatIfAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWhatIfAnalysisErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWhatIfAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWhatIfAnalysisErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateWhatIfAnalysisErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateWhatIfAnalysisErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateWhatIfAnalysisErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateWhatIfAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWhatIfAnalysisError {
fn code(&self) -> Option<&str> {
CreateWhatIfAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWhatIfAnalysisError {
pub fn new(kind: CreateWhatIfAnalysisErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWhatIfAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfAnalysisErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfAnalysisErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfAnalysisErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfAnalysisErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateWhatIfAnalysisErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateWhatIfAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWhatIfAnalysisErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateWhatIfAnalysisErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateWhatIfAnalysisErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateWhatIfAnalysisErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateWhatIfAnalysisErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateWhatIfAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePredictorBacktestExportJobError {
pub kind: CreatePredictorBacktestExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePredictorBacktestExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePredictorBacktestExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePredictorBacktestExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
_inner.fmt(f)
}
CreatePredictorBacktestExportJobErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
CreatePredictorBacktestExportJobErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreatePredictorBacktestExportJobErrorKind::ResourceInUseException(_inner) => {
_inner.fmt(f)
}
CreatePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreatePredictorBacktestExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePredictorBacktestExportJobError {
fn code(&self) -> Option<&str> {
CreatePredictorBacktestExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePredictorBacktestExportJobError {
pub fn new(
kind: CreatePredictorBacktestExportJobErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreatePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePredictorBacktestExportJobErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorBacktestExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorBacktestExportJobErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorBacktestExportJobErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorBacktestExportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreatePredictorBacktestExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePredictorBacktestExportJobErrorKind::InvalidInputException(_inner) => {
Some(_inner)
}
CreatePredictorBacktestExportJobErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
CreatePredictorBacktestExportJobErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreatePredictorBacktestExportJobErrorKind::ResourceInUseException(_inner) => {
Some(_inner)
}
CreatePredictorBacktestExportJobErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreatePredictorBacktestExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePredictorError {
pub kind: CreatePredictorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePredictorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePredictorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePredictorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePredictorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePredictorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreatePredictorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreatePredictorErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreatePredictorErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreatePredictorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreatePredictorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePredictorError {
fn code(&self) -> Option<&str> {
CreatePredictorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePredictorError {
pub fn new(kind: CreatePredictorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreatePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreatePredictorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreatePredictorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePredictorErrorKind::InvalidInputException(_inner) => Some(_inner),
CreatePredictorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreatePredictorErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreatePredictorErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreatePredictorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreatePredictorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateMonitorError {
pub kind: CreateMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateMonitorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateMonitorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateMonitorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateMonitorErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateMonitorErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateMonitorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateMonitorError {
fn code(&self) -> Option<&str> {
CreateMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateMonitorError {
pub fn new(kind: CreateMonitorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateMonitorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, CreateMonitorErrorKind::InvalidInputException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateMonitorErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateMonitorErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateMonitorErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateMonitorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateMonitorErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateMonitorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateMonitorErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateMonitorErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateMonitorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateMonitorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateForecastExportJobError {
pub kind: CreateForecastExportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateForecastExportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateForecastExportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateForecastExportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateForecastExportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateForecastExportJobErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateForecastExportJobErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateForecastExportJobErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateForecastExportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateForecastExportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateForecastExportJobError {
fn code(&self) -> Option<&str> {
CreateForecastExportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateForecastExportJobError {
pub fn new(kind: CreateForecastExportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateForecastExportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastExportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastExportJobErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastExportJobErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastExportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastExportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateForecastExportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateForecastExportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateForecastExportJobErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateForecastExportJobErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateForecastExportJobErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateForecastExportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateForecastExportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateForecastError {
pub kind: CreateForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateForecastErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateForecastErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateForecastErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateForecastErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateForecastErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateForecastErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateForecastError {
fn code(&self) -> Option<&str> {
CreateForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateForecastError {
pub fn new(kind: CreateForecastErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateForecastErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateForecastErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateForecastErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateForecastErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateForecastErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateForecastErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateExplainabilityExportError {
pub kind: CreateExplainabilityExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateExplainabilityExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateExplainabilityExportErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateExplainabilityExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateExplainabilityExportErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateExplainabilityExportErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateExplainabilityExportErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateExplainabilityExportErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateExplainabilityExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateExplainabilityExportError {
fn code(&self) -> Option<&str> {
CreateExplainabilityExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateExplainabilityExportError {
pub fn new(kind: CreateExplainabilityExportErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateExplainabilityExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityExportErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityExportErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityExportErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityExportErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityExportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateExplainabilityExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateExplainabilityExportErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateExplainabilityExportErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateExplainabilityExportErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateExplainabilityExportErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateExplainabilityExportErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateExplainabilityExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateExplainabilityError {
pub kind: CreateExplainabilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateExplainabilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateExplainabilityErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateExplainabilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateExplainabilityErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateExplainabilityErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateExplainabilityErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateExplainabilityErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateExplainabilityErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateExplainabilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateExplainabilityError {
fn code(&self) -> Option<&str> {
CreateExplainabilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateExplainabilityError {
pub fn new(kind: CreateExplainabilityErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateExplainabilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateExplainabilityErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateExplainabilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateExplainabilityErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateExplainabilityErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateExplainabilityErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateExplainabilityErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateExplainabilityErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateExplainabilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDatasetImportJobError {
pub kind: CreateDatasetImportJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDatasetImportJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDatasetImportJobErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDatasetImportJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDatasetImportJobErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDatasetImportJobErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDatasetImportJobErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateDatasetImportJobErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDatasetImportJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDatasetImportJobError {
fn code(&self) -> Option<&str> {
CreateDatasetImportJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDatasetImportJobError {
pub fn new(kind: CreateDatasetImportJobErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDatasetImportJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetImportJobErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetImportJobErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetImportJobErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetImportJobErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetImportJobErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateDatasetImportJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDatasetImportJobErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDatasetImportJobErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDatasetImportJobErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateDatasetImportJobErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateDatasetImportJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDatasetImportJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDatasetGroupError {
pub kind: CreateDatasetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDatasetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDatasetGroupErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDatasetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDatasetGroupErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDatasetGroupErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDatasetGroupErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateDatasetGroupErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateDatasetGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDatasetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDatasetGroupError {
fn code(&self) -> Option<&str> {
CreateDatasetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDatasetGroupError {
pub fn new(kind: CreateDatasetGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDatasetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetGroupErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetGroupErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetGroupErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetGroupErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateDatasetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDatasetGroupErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDatasetGroupErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDatasetGroupErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateDatasetGroupErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateDatasetGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDatasetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDatasetError {
pub kind: CreateDatasetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDatasetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDatasetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDatasetErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDatasetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDatasetErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDatasetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDatasetErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateDatasetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDatasetError {
fn code(&self) -> Option<&str> {
CreateDatasetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDatasetError {
pub fn new(kind: CreateDatasetErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDatasetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, CreateDatasetErrorKind::InvalidInputException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDatasetErrorKind::ResourceAlreadyExistsException(_)
)
}
}
impl std::error::Error for CreateDatasetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDatasetErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDatasetErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDatasetErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateDatasetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAutoPredictorError {
pub kind: CreateAutoPredictorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAutoPredictorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAutoPredictorErrorKind {
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAutoPredictorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAutoPredictorErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateAutoPredictorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAutoPredictorErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateAutoPredictorErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateAutoPredictorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateAutoPredictorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAutoPredictorError {
fn code(&self) -> Option<&str> {
CreateAutoPredictorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAutoPredictorError {
pub fn new(kind: CreateAutoPredictorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAutoPredictorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoPredictorErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoPredictorErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoPredictorErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoPredictorErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateAutoPredictorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateAutoPredictorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAutoPredictorErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateAutoPredictorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAutoPredictorErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateAutoPredictorErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateAutoPredictorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateAutoPredictorErrorKind::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 _)
}
}