#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateMLModelError {
pub kind: UpdateMLModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateMLModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateMLModelErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateMLModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateMLModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateMLModelErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateMLModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateMLModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateMLModelError {
fn code(&self) -> Option<&str> {
UpdateMLModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateMLModelError {
pub fn new(kind: UpdateMLModelErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateMLModelErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, UpdateMLModelErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateMLModelErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateMLModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateMLModelErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateMLModelErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateMLModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateMLModelErrorKind::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>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: i32,
}
impl ResourceNotFoundException {
#[allow(missing_docs)] pub fn code(&self) -> i32 {
self.code
}
}
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>,
pub(crate) code: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn code(mut self, input: i32) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
code: self.code.unwrap_or_default(),
}
}
}
}
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 InvalidInputException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: i32,
}
impl InvalidInputException {
#[allow(missing_docs)] pub fn code(&self) -> i32 {
self.code
}
}
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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
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>,
pub(crate) code: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn code(mut self, input: i32) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InvalidInputException {
crate::error::InvalidInputException {
message: self.message,
code: self.code.unwrap_or_default(),
}
}
}
}
impl InvalidInputException {
pub fn builder() -> crate::error::invalid_input_exception::Builder {
crate::error::invalid_input_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: i32,
}
impl InternalServerException {
#[allow(missing_docs)] pub fn code(&self) -> i32 {
self.code
}
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn code(mut self, input: i32) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
code: self.code.unwrap_or_default(),
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEvaluationError {
pub kind: UpdateEvaluationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEvaluationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEvaluationErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEvaluationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEvaluationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEvaluationErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateEvaluationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEvaluationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEvaluationError {
fn code(&self) -> Option<&str> {
UpdateEvaluationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEvaluationError {
pub fn new(kind: UpdateEvaluationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEvaluationErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEvaluationErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEvaluationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateEvaluationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEvaluationErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEvaluationErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateEvaluationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEvaluationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDataSourceError {
pub kind: UpdateDataSourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDataSourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDataSourceErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDataSourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDataSourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDataSourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateDataSourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDataSourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDataSourceError {
fn code(&self) -> Option<&str> {
UpdateDataSourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDataSourceError {
pub fn new(kind: UpdateDataSourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDataSourceErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDataSourceErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDataSourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateDataSourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDataSourceErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDataSourceErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateDataSourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDataSourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBatchPredictionError {
pub kind: UpdateBatchPredictionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBatchPredictionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBatchPredictionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBatchPredictionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBatchPredictionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateBatchPredictionErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateBatchPredictionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateBatchPredictionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBatchPredictionError {
fn code(&self) -> Option<&str> {
UpdateBatchPredictionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBatchPredictionError {
pub fn new(kind: UpdateBatchPredictionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBatchPredictionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBatchPredictionErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBatchPredictionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateBatchPredictionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBatchPredictionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateBatchPredictionErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateBatchPredictionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateBatchPredictionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PredictError {
pub kind: PredictErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PredictError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PredictErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PredictErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
PredictorNotMountedException(crate::error::PredictorNotMountedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PredictError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PredictErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PredictErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
PredictErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PredictErrorKind::PredictorNotMountedException(_inner) => _inner.fmt(f),
PredictErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PredictErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PredictError {
fn code(&self) -> Option<&str> {
PredictError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PredictError {
pub fn new(kind: PredictErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PredictErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PredictErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PredictErrorKind::InternalServerException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, PredictErrorKind::InvalidInputException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, PredictErrorKind::LimitExceededException(_))
}
pub fn is_predictor_not_mounted_exception(&self) -> bool {
matches!(
&self.kind,
PredictErrorKind::PredictorNotMountedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, PredictErrorKind::ResourceNotFoundException(_))
}
}
impl std::error::Error for PredictError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PredictErrorKind::InternalServerException(_inner) => Some(_inner),
PredictErrorKind::InvalidInputException(_inner) => Some(_inner),
PredictErrorKind::LimitExceededException(_inner) => Some(_inner),
PredictErrorKind::PredictorNotMountedException(_inner) => Some(_inner),
PredictErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PredictErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PredictorNotMountedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PredictorNotMountedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PredictorNotMountedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PredictorNotMountedException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for PredictorNotMountedException {}
pub mod predictor_not_mounted_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::PredictorNotMountedException {
crate::error::PredictorNotMountedException {
message: self.message,
}
}
}
}
impl PredictorNotMountedException {
pub fn builder() -> crate::error::predictor_not_mounted_exception::Builder {
crate::error::predictor_not_mounted_exception::Builder::default()
}
}
#[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>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: i32,
}
impl LimitExceededException {
#[allow(missing_docs)] pub fn code(&self) -> i32 {
self.code
}
}
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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
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>,
pub(crate) code: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn code(mut self, input: i32) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
code: self.code.unwrap_or_default(),
}
}
}
}
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 GetMLModelError {
pub kind: GetMLModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMLModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMLModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMLModelErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMLModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMLModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetMLModelErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
GetMLModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMLModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMLModelError {
fn code(&self) -> Option<&str> {
GetMLModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMLModelError {
pub fn new(kind: GetMLModelErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetMLModelErrorKind::InternalServerException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, GetMLModelErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMLModelErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetMLModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMLModelErrorKind::InternalServerException(_inner) => Some(_inner),
GetMLModelErrorKind::InvalidInputException(_inner) => Some(_inner),
GetMLModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMLModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEvaluationError {
pub kind: GetEvaluationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEvaluationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEvaluationErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEvaluationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEvaluationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEvaluationErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
GetEvaluationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetEvaluationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEvaluationError {
fn code(&self) -> Option<&str> {
GetEvaluationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEvaluationError {
pub fn new(kind: GetEvaluationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEvaluationErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, GetEvaluationErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEvaluationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetEvaluationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEvaluationErrorKind::InternalServerException(_inner) => Some(_inner),
GetEvaluationErrorKind::InvalidInputException(_inner) => Some(_inner),
GetEvaluationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEvaluationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDataSourceError {
pub kind: GetDataSourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDataSourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDataSourceErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDataSourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDataSourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDataSourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
GetDataSourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDataSourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDataSourceError {
fn code(&self) -> Option<&str> {
GetDataSourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDataSourceError {
pub fn new(kind: GetDataSourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSourceErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, GetDataSourceErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDataSourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetDataSourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDataSourceErrorKind::InternalServerException(_inner) => Some(_inner),
GetDataSourceErrorKind::InvalidInputException(_inner) => Some(_inner),
GetDataSourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDataSourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBatchPredictionError {
pub kind: GetBatchPredictionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBatchPredictionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBatchPredictionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBatchPredictionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBatchPredictionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetBatchPredictionErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
GetBatchPredictionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetBatchPredictionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBatchPredictionError {
fn code(&self) -> Option<&str> {
GetBatchPredictionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBatchPredictionError {
pub fn new(kind: GetBatchPredictionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetBatchPredictionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetBatchPredictionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBatchPredictionErrorKind::InternalServerException(_inner) => Some(_inner),
GetBatchPredictionErrorKind::InvalidInputException(_inner) => Some(_inner),
GetBatchPredictionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetBatchPredictionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTagsError {
pub kind: DescribeTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTagsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTagsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTagsError {
fn code(&self) -> Option<&str> {
DescribeTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTagsError {
pub fn new(kind: DescribeTagsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTagsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, DescribeTagsErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTagsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTagsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeTagsErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeMLModelsError {
pub kind: DescribeMLModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeMLModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeMLModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeMLModelsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeMLModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeMLModelsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeMLModelsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeMLModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeMLModelsError {
fn code(&self) -> Option<&str> {
DescribeMLModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeMLModelsError {
pub fn new(kind: DescribeMLModelsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeMLModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeMLModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMLModelsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMLModelsErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DescribeMLModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeMLModelsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeMLModelsErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeMLModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEvaluationsError {
pub kind: DescribeEvaluationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEvaluationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEvaluationsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEvaluationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEvaluationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeEvaluationsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeEvaluationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEvaluationsError {
fn code(&self) -> Option<&str> {
DescribeEvaluationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEvaluationsError {
pub fn new(kind: DescribeEvaluationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEvaluationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEvaluationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEvaluationsErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DescribeEvaluationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEvaluationsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeEvaluationsErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeEvaluationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDataSourcesError {
pub kind: DescribeDataSourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDataSourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDataSourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDataSourcesErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDataSourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDataSourcesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeDataSourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeDataSourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDataSourcesError {
fn code(&self) -> Option<&str> {
DescribeDataSourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDataSourcesError {
pub fn new(kind: DescribeDataSourcesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeDataSourcesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDataSourcesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDataSourcesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDataSourcesErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DescribeDataSourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDataSourcesErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeDataSourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeDataSourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBatchPredictionsError {
pub kind: DescribeBatchPredictionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBatchPredictionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBatchPredictionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBatchPredictionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBatchPredictionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBatchPredictionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeBatchPredictionsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeBatchPredictionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBatchPredictionsError {
fn code(&self) -> Option<&str> {
DescribeBatchPredictionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBatchPredictionsError {
pub fn new(kind: DescribeBatchPredictionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeBatchPredictionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBatchPredictionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBatchPredictionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBatchPredictionsErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DescribeBatchPredictionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBatchPredictionsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeBatchPredictionsErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeBatchPredictionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTagsError {
pub kind: DeleteTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTagsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
#[allow(missing_docs)] InvalidTagException(crate::error::InvalidTagException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTagsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::InvalidTagException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTagsError {
fn code(&self) -> Option<&str> {
DeleteTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTagsError {
pub fn new(kind: DeleteTagsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteTagsErrorKind::InternalServerException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, DeleteTagsErrorKind::InvalidInputException(_))
}
pub fn is_invalid_tag_exception(&self) -> bool {
matches!(&self.kind, DeleteTagsErrorKind::InvalidTagException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTagsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTagsErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteTagsErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteTagsErrorKind::InvalidTagException(_inner) => Some(_inner),
DeleteTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidTagException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidTagException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidTagException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidTagException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidTagException {}
pub mod invalid_tag_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::InvalidTagException {
crate::error::InvalidTagException {
message: self.message,
}
}
}
}
impl InvalidTagException {
pub fn builder() -> crate::error::invalid_tag_exception::Builder {
crate::error::invalid_tag_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRealtimeEndpointError {
pub kind: DeleteRealtimeEndpointErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRealtimeEndpointError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRealtimeEndpointErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRealtimeEndpointError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRealtimeEndpointErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteRealtimeEndpointErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteRealtimeEndpointErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteRealtimeEndpointErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRealtimeEndpointError {
fn code(&self) -> Option<&str> {
DeleteRealtimeEndpointError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRealtimeEndpointError {
pub fn new(kind: DeleteRealtimeEndpointErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRealtimeEndpointErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRealtimeEndpointErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRealtimeEndpointErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteRealtimeEndpointError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRealtimeEndpointErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteRealtimeEndpointErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteRealtimeEndpointErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteRealtimeEndpointErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMLModelError {
pub kind: DeleteMLModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteMLModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteMLModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMLModelErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteMLModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMLModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteMLModelErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteMLModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteMLModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMLModelError {
fn code(&self) -> Option<&str> {
DeleteMLModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteMLModelError {
pub fn new(kind: DeleteMLModelErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMLModelErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, DeleteMLModelErrorKind::InvalidInputException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMLModelErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteMLModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMLModelErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteMLModelErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteMLModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteMLModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEvaluationError {
pub kind: DeleteEvaluationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEvaluationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEvaluationErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEvaluationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEvaluationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEvaluationErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteEvaluationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEvaluationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEvaluationError {
fn code(&self) -> Option<&str> {
DeleteEvaluationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEvaluationError {
pub fn new(kind: DeleteEvaluationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEvaluationErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEvaluationErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEvaluationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteEvaluationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEvaluationErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEvaluationErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteEvaluationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEvaluationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDataSourceError {
pub kind: DeleteDataSourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDataSourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDataSourceErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDataSourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDataSourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDataSourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteDataSourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDataSourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDataSourceError {
fn code(&self) -> Option<&str> {
DeleteDataSourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDataSourceError {
pub fn new(kind: DeleteDataSourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDataSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDataSourceErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDataSourceErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDataSourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDataSourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDataSourceErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDataSourceErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteDataSourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDataSourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBatchPredictionError {
pub kind: DeleteBatchPredictionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBatchPredictionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBatchPredictionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBatchPredictionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBatchPredictionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteBatchPredictionErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteBatchPredictionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteBatchPredictionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBatchPredictionError {
fn code(&self) -> Option<&str> {
DeleteBatchPredictionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBatchPredictionError {
pub fn new(kind: DeleteBatchPredictionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBatchPredictionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteBatchPredictionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBatchPredictionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteBatchPredictionErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteBatchPredictionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteBatchPredictionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRealtimeEndpointError {
pub kind: CreateRealtimeEndpointErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRealtimeEndpointError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRealtimeEndpointErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRealtimeEndpointError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRealtimeEndpointErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateRealtimeEndpointErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateRealtimeEndpointErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateRealtimeEndpointErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRealtimeEndpointError {
fn code(&self) -> Option<&str> {
CreateRealtimeEndpointError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateRealtimeEndpointError {
pub fn new(kind: CreateRealtimeEndpointErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRealtimeEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateRealtimeEndpointErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateRealtimeEndpointErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateRealtimeEndpointErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateRealtimeEndpointError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRealtimeEndpointErrorKind::InternalServerException(_inner) => Some(_inner),
CreateRealtimeEndpointErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateRealtimeEndpointErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateRealtimeEndpointErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateMLModelError {
pub kind: CreateMLModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateMLModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateMLModelErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateMLModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateMLModelErrorKind::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
CreateMLModelErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateMLModelErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateMLModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateMLModelError {
fn code(&self) -> Option<&str> {
CreateMLModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateMLModelError {
pub fn new(kind: CreateMLModelErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateMLModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateMLModelErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateMLModelErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, CreateMLModelErrorKind::InvalidInputException(_))
}
}
impl std::error::Error for CreateMLModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateMLModelErrorKind::IdempotentParameterMismatchException(_inner) => Some(_inner),
CreateMLModelErrorKind::InternalServerException(_inner) => Some(_inner),
CreateMLModelErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateMLModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IdempotentParameterMismatchException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: i32,
}
impl IdempotentParameterMismatchException {
#[allow(missing_docs)] pub fn code(&self) -> i32 {
self.code
}
}
impl IdempotentParameterMismatchException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IdempotentParameterMismatchException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IdempotentParameterMismatchException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for IdempotentParameterMismatchException {}
pub mod idempotent_parameter_mismatch_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn code(mut self, input: i32) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::IdempotentParameterMismatchException {
crate::error::IdempotentParameterMismatchException {
message: self.message,
code: self.code.unwrap_or_default(),
}
}
}
}
impl IdempotentParameterMismatchException {
pub fn builder() -> crate::error::idempotent_parameter_mismatch_exception::Builder {
crate::error::idempotent_parameter_mismatch_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEvaluationError {
pub kind: CreateEvaluationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEvaluationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEvaluationErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEvaluationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEvaluationErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateEvaluationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateEvaluationErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateEvaluationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEvaluationError {
fn code(&self) -> Option<&str> {
CreateEvaluationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateEvaluationError {
pub fn new(kind: CreateEvaluationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEvaluationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateEvaluationErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEvaluationErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateEvaluationErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for CreateEvaluationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEvaluationErrorKind::IdempotentParameterMismatchException(_inner) => Some(_inner),
CreateEvaluationErrorKind::InternalServerException(_inner) => Some(_inner),
CreateEvaluationErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateEvaluationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataSourceFromS3Error {
pub kind: CreateDataSourceFromS3ErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataSourceFromS3Error {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataSourceFromS3ErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataSourceFromS3ErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataSourceFromS3Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataSourceFromS3ErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateDataSourceFromS3ErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDataSourceFromS3ErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDataSourceFromS3ErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataSourceFromS3Error {
fn code(&self) -> Option<&str> {
CreateDataSourceFromS3Error::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataSourceFromS3Error {
pub fn new(kind: CreateDataSourceFromS3ErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDataSourceFromS3ErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataSourceFromS3ErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromS3ErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromS3ErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromS3ErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for CreateDataSourceFromS3Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataSourceFromS3ErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateDataSourceFromS3ErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDataSourceFromS3ErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDataSourceFromS3ErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataSourceFromRedshiftError {
pub kind: CreateDataSourceFromRedshiftErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataSourceFromRedshiftError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataSourceFromRedshiftErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataSourceFromRedshiftErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataSourceFromRedshiftError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataSourceFromRedshiftErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateDataSourceFromRedshiftErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDataSourceFromRedshiftErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDataSourceFromRedshiftErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataSourceFromRedshiftError {
fn code(&self) -> Option<&str> {
CreateDataSourceFromRedshiftError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataSourceFromRedshiftError {
pub fn new(kind: CreateDataSourceFromRedshiftErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDataSourceFromRedshiftErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataSourceFromRedshiftErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRedshiftErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRedshiftErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRedshiftErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for CreateDataSourceFromRedshiftError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataSourceFromRedshiftErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateDataSourceFromRedshiftErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDataSourceFromRedshiftErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDataSourceFromRedshiftErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataSourceFromRDSError {
pub kind: CreateDataSourceFromRDSErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataSourceFromRDSError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataSourceFromRDSErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataSourceFromRDSErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataSourceFromRDSError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataSourceFromRDSErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateDataSourceFromRDSErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDataSourceFromRDSErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateDataSourceFromRDSErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataSourceFromRDSError {
fn code(&self) -> Option<&str> {
CreateDataSourceFromRDSError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataSourceFromRDSError {
pub fn new(kind: CreateDataSourceFromRDSErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDataSourceFromRDSErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataSourceFromRDSErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRDSErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRDSErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataSourceFromRDSErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for CreateDataSourceFromRDSError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataSourceFromRDSErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateDataSourceFromRDSErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDataSourceFromRDSErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateDataSourceFromRDSErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBatchPredictionError {
pub kind: CreateBatchPredictionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBatchPredictionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBatchPredictionErrorKind {
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBatchPredictionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBatchPredictionErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
CreateBatchPredictionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateBatchPredictionErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateBatchPredictionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBatchPredictionError {
fn code(&self) -> Option<&str> {
CreateBatchPredictionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBatchPredictionError {
pub fn new(kind: CreateBatchPredictionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBatchPredictionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateBatchPredictionErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for CreateBatchPredictionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBatchPredictionErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
CreateBatchPredictionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateBatchPredictionErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateBatchPredictionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddTagsError {
pub kind: AddTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddTagsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidInputException(crate::error::InvalidInputException),
#[allow(missing_docs)] InvalidTagException(crate::error::InvalidTagException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
#[allow(missing_docs)] TagLimitExceededException(crate::error::TagLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddTagsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AddTagsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
AddTagsErrorKind::InvalidTagException(_inner) => _inner.fmt(f),
AddTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AddTagsErrorKind::TagLimitExceededException(_inner) => _inner.fmt(f),
AddTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddTagsError {
fn code(&self) -> Option<&str> {
AddTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddTagsError {
pub fn new(kind: AddTagsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AddTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::InternalServerException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::InvalidInputException(_))
}
pub fn is_invalid_tag_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::InvalidTagException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::ResourceNotFoundException(_))
}
pub fn is_tag_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::TagLimitExceededException(_))
}
}
impl std::error::Error for AddTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddTagsErrorKind::InternalServerException(_inner) => Some(_inner),
AddTagsErrorKind::InvalidInputException(_inner) => Some(_inner),
AddTagsErrorKind::InvalidTagException(_inner) => Some(_inner),
AddTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AddTagsErrorKind::TagLimitExceededException(_inner) => Some(_inner),
AddTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TagLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TagLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TagLimitExceededException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for TagLimitExceededException {}
pub mod tag_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::TagLimitExceededException {
crate::error::TagLimitExceededException {
message: self.message,
}
}
}
}
impl TagLimitExceededException {
pub fn builder() -> crate::error::tag_limit_exceeded_exception::Builder {
crate::error::tag_limit_exceeded_exception::Builder::default()
}
}
#[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 _)
}
}