#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateTaskExecutionError {
pub kind: UpdateTaskExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateTaskExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateTaskExecutionErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateTaskExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateTaskExecutionErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateTaskExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateTaskExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateTaskExecutionError {
fn code(&self) -> Option<&str> {
UpdateTaskExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateTaskExecutionError {
pub fn new(kind: UpdateTaskExecutionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTaskExecutionErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTaskExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateTaskExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateTaskExecutionErrorKind::InternalException(_inner) => Some(_inner),
UpdateTaskExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateTaskExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub datasync_error_code: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
#[allow(missing_docs)] pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
#[allow(missing_docs)] pub fn datasync_error_code(&self) -> std::option::Option<&str> {
self.datasync_error_code.as_deref()
}
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_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) error_code: std::option::Option<std::string::String>,
pub(crate) datasync_error_code: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
#[allow(missing_docs)] pub fn datasync_error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.datasync_error_code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_datasync_error_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.datasync_error_code = input;
self
}
pub fn build(self) -> crate::error::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
error_code: self.error_code,
datasync_error_code: self.datasync_error_code,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
}
impl InternalException {
#[allow(missing_docs)] pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
}
impl InternalException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalException {}
pub mod internal_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) error_code: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
pub fn build(self) -> crate::error::InternalException {
crate::error::InternalException {
message: self.message,
error_code: self.error_code,
}
}
}
}
impl InternalException {
pub fn builder() -> crate::error::internal_exception::Builder {
crate::error::internal_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateTaskError {
pub kind: UpdateTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateTaskErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateTaskErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateTaskErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateTaskError {
fn code(&self) -> Option<&str> {
UpdateTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateTaskError {
pub fn new(kind: UpdateTaskErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, UpdateTaskErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, UpdateTaskErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for UpdateTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateTaskErrorKind::InternalException(_inner) => Some(_inner),
UpdateTaskErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLocationSmbError {
pub kind: UpdateLocationSmbErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLocationSmbError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLocationSmbErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateLocationSmbError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLocationSmbErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateLocationSmbErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateLocationSmbErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLocationSmbError {
fn code(&self) -> Option<&str> {
UpdateLocationSmbError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLocationSmbError {
pub fn new(kind: UpdateLocationSmbErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, UpdateLocationSmbErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationSmbErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateLocationSmbError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLocationSmbErrorKind::InternalException(_inner) => Some(_inner),
UpdateLocationSmbErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateLocationSmbErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLocationObjectStorageError {
pub kind: UpdateLocationObjectStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLocationObjectStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLocationObjectStorageErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateLocationObjectStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLocationObjectStorageErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateLocationObjectStorageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateLocationObjectStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLocationObjectStorageError {
fn code(&self) -> Option<&str> {
UpdateLocationObjectStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLocationObjectStorageError {
pub fn new(kind: UpdateLocationObjectStorageErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationObjectStorageErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationObjectStorageErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateLocationObjectStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLocationObjectStorageErrorKind::InternalException(_inner) => Some(_inner),
UpdateLocationObjectStorageErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateLocationObjectStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLocationNfsError {
pub kind: UpdateLocationNfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLocationNfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLocationNfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateLocationNfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLocationNfsErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateLocationNfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateLocationNfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLocationNfsError {
fn code(&self) -> Option<&str> {
UpdateLocationNfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLocationNfsError {
pub fn new(kind: UpdateLocationNfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, UpdateLocationNfsErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationNfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateLocationNfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLocationNfsErrorKind::InternalException(_inner) => Some(_inner),
UpdateLocationNfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateLocationNfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLocationHdfsError {
pub kind: UpdateLocationHdfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLocationHdfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLocationHdfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateLocationHdfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLocationHdfsErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateLocationHdfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateLocationHdfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLocationHdfsError {
fn code(&self) -> Option<&str> {
UpdateLocationHdfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLocationHdfsError {
pub fn new(kind: UpdateLocationHdfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationHdfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLocationHdfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateLocationHdfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLocationHdfsErrorKind::InternalException(_inner) => Some(_inner),
UpdateLocationHdfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateLocationHdfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAgentError {
pub kind: UpdateAgentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAgentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAgentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAgentErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAgentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAgentErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateAgentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateAgentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAgentError {
fn code(&self) -> Option<&str> {
UpdateAgentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAgentError {
pub fn new(kind: UpdateAgentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, UpdateAgentErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, UpdateAgentErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for UpdateAgentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAgentErrorKind::InternalException(_inner) => Some(_inner),
UpdateAgentErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateAgentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartTaskExecutionError {
pub kind: StartTaskExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartTaskExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartTaskExecutionErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartTaskExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartTaskExecutionErrorKind::InternalException(_inner) => _inner.fmt(f),
StartTaskExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartTaskExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartTaskExecutionError {
fn code(&self) -> Option<&str> {
StartTaskExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartTaskExecutionError {
pub fn new(kind: StartTaskExecutionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
StartTaskExecutionErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartTaskExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for StartTaskExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartTaskExecutionErrorKind::InternalException(_inner) => Some(_inner),
StartTaskExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartTaskExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTasksError {
pub kind: ListTasksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTasksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTasksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTasksErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTasksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTasksErrorKind::InternalException(_inner) => _inner.fmt(f),
ListTasksErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTasksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTasksError {
fn code(&self) -> Option<&str> {
ListTasksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTasksError {
pub fn new(kind: ListTasksErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTasksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTasksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, ListTasksErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, ListTasksErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for ListTasksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTasksErrorKind::InternalException(_inner) => Some(_inner),
ListTasksErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTasksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTaskExecutionsError {
pub kind: ListTaskExecutionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTaskExecutionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTaskExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTaskExecutionsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTaskExecutionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTaskExecutionsErrorKind::InternalException(_inner) => _inner.fmt(f),
ListTaskExecutionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTaskExecutionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTaskExecutionsError {
fn code(&self) -> Option<&str> {
ListTaskExecutionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTaskExecutionsError {
pub fn new(kind: ListTaskExecutionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTaskExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTaskExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
ListTaskExecutionsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTaskExecutionsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListTaskExecutionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTaskExecutionsErrorKind::InternalException(_inner) => Some(_inner),
ListTaskExecutionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTaskExecutionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListLocationsError {
pub kind: ListLocationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListLocationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListLocationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListLocationsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListLocationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListLocationsErrorKind::InternalException(_inner) => _inner.fmt(f),
ListLocationsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListLocationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListLocationsError {
fn code(&self) -> Option<&str> {
ListLocationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListLocationsError {
pub fn new(kind: ListLocationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListLocationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListLocationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, ListLocationsErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListLocationsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListLocationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListLocationsErrorKind::InternalException(_inner) => Some(_inner),
ListLocationsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListLocationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAgentsError {
pub kind: ListAgentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAgentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAgentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAgentsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAgentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAgentsErrorKind::InternalException(_inner) => _inner.fmt(f),
ListAgentsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListAgentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAgentsError {
fn code(&self) -> Option<&str> {
ListAgentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAgentsError {
pub fn new(kind: ListAgentsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListAgentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAgentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, ListAgentsErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, ListAgentsErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for ListAgentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAgentsErrorKind::InternalException(_inner) => Some(_inner),
ListAgentsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListAgentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTaskExecutionError {
pub kind: DescribeTaskExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTaskExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTaskExecutionErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTaskExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTaskExecutionErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeTaskExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeTaskExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTaskExecutionError {
fn code(&self) -> Option<&str> {
DescribeTaskExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTaskExecutionError {
pub fn new(kind: DescribeTaskExecutionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTaskExecutionErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTaskExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeTaskExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTaskExecutionErrorKind::InternalException(_inner) => Some(_inner),
DescribeTaskExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeTaskExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTaskError {
pub kind: DescribeTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTaskErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTaskErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeTaskErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTaskError {
fn code(&self) -> Option<&str> {
DescribeTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTaskError {
pub fn new(kind: DescribeTaskErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, DescribeTaskErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTaskErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTaskErrorKind::InternalException(_inner) => Some(_inner),
DescribeTaskErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationSmbError {
pub kind: DescribeLocationSmbErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationSmbError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationSmbErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationSmbError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationSmbErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationSmbErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationSmbErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationSmbError {
fn code(&self) -> Option<&str> {
DescribeLocationSmbError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationSmbError {
pub fn new(kind: DescribeLocationSmbErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationSmbErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationSmbErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationSmbError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationSmbErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationSmbErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationSmbErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationS3Error {
pub kind: DescribeLocationS3ErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationS3Error {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationS3ErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationS3Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationS3ErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationS3ErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationS3ErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationS3Error {
fn code(&self) -> Option<&str> {
DescribeLocationS3Error::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationS3Error {
pub fn new(kind: DescribeLocationS3ErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationS3ErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationS3ErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationS3Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationS3ErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationS3ErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationS3ErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationObjectStorageError {
pub kind: DescribeLocationObjectStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationObjectStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationObjectStorageErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationObjectStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationObjectStorageErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationObjectStorageErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DescribeLocationObjectStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationObjectStorageError {
fn code(&self) -> Option<&str> {
DescribeLocationObjectStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationObjectStorageError {
pub fn new(
kind: DescribeLocationObjectStorageErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationObjectStorageErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationObjectStorageErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationObjectStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationObjectStorageErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationObjectStorageErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationObjectStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationNfsError {
pub kind: DescribeLocationNfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationNfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationNfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationNfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationNfsErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationNfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationNfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationNfsError {
fn code(&self) -> Option<&str> {
DescribeLocationNfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationNfsError {
pub fn new(kind: DescribeLocationNfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationNfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationNfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationNfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationNfsErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationNfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationNfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationHdfsError {
pub kind: DescribeLocationHdfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationHdfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationHdfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationHdfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationHdfsErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationHdfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationHdfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationHdfsError {
fn code(&self) -> Option<&str> {
DescribeLocationHdfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationHdfsError {
pub fn new(kind: DescribeLocationHdfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationHdfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationHdfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationHdfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationHdfsErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationHdfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationHdfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationFsxWindowsError {
pub kind: DescribeLocationFsxWindowsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationFsxWindowsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationFsxWindowsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationFsxWindowsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationFsxWindowsErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationFsxWindowsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationFsxWindowsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationFsxWindowsError {
fn code(&self) -> Option<&str> {
DescribeLocationFsxWindowsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationFsxWindowsError {
pub fn new(kind: DescribeLocationFsxWindowsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxWindowsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxWindowsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationFsxWindowsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationFsxWindowsErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationFsxWindowsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationFsxWindowsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationFsxOpenZfsError {
pub kind: DescribeLocationFsxOpenZfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationFsxOpenZfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationFsxOpenZfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationFsxOpenZfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationFsxOpenZfsErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationFsxOpenZfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationFsxOpenZfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationFsxOpenZfsError {
fn code(&self) -> Option<&str> {
DescribeLocationFsxOpenZfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationFsxOpenZfsError {
pub fn new(kind: DescribeLocationFsxOpenZfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxOpenZfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxOpenZfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationFsxOpenZfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationFsxOpenZfsErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationFsxOpenZfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationFsxOpenZfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationFsxOntapError {
pub kind: DescribeLocationFsxOntapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationFsxOntapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationFsxOntapErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationFsxOntapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationFsxOntapErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationFsxOntapErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationFsxOntapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationFsxOntapError {
fn code(&self) -> Option<&str> {
DescribeLocationFsxOntapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationFsxOntapError {
pub fn new(kind: DescribeLocationFsxOntapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxOntapErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxOntapErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationFsxOntapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationFsxOntapErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationFsxOntapErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationFsxOntapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationFsxLustreError {
pub kind: DescribeLocationFsxLustreErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationFsxLustreError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationFsxLustreErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationFsxLustreError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationFsxLustreErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationFsxLustreErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationFsxLustreErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationFsxLustreError {
fn code(&self) -> Option<&str> {
DescribeLocationFsxLustreError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationFsxLustreError {
pub fn new(kind: DescribeLocationFsxLustreErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxLustreErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationFsxLustreErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationFsxLustreError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationFsxLustreErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationFsxLustreErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationFsxLustreErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLocationEfsError {
pub kind: DescribeLocationEfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLocationEfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLocationEfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLocationEfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLocationEfsErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeLocationEfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLocationEfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLocationEfsError {
fn code(&self) -> Option<&str> {
DescribeLocationEfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLocationEfsError {
pub fn new(kind: DescribeLocationEfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationEfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLocationEfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeLocationEfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLocationEfsErrorKind::InternalException(_inner) => Some(_inner),
DescribeLocationEfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLocationEfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAgentError {
pub kind: DescribeAgentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAgentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAgentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAgentErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAgentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAgentErrorKind::InternalException(_inner) => _inner.fmt(f),
DescribeAgentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeAgentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAgentError {
fn code(&self) -> Option<&str> {
DescribeAgentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAgentError {
pub fn new(kind: DescribeAgentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, DescribeAgentErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAgentErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DescribeAgentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAgentErrorKind::InternalException(_inner) => Some(_inner),
DescribeAgentErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeAgentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTaskError {
pub kind: DeleteTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTaskErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTaskErrorKind::InternalException(_inner) => _inner.fmt(f),
DeleteTaskErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTaskError {
fn code(&self) -> Option<&str> {
DeleteTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTaskError {
pub fn new(kind: DeleteTaskErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, DeleteTaskErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, DeleteTaskErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for DeleteTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTaskErrorKind::InternalException(_inner) => Some(_inner),
DeleteTaskErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLocationError {
pub kind: DeleteLocationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLocationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLocationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLocationErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLocationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLocationErrorKind::InternalException(_inner) => _inner.fmt(f),
DeleteLocationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteLocationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLocationError {
fn code(&self) -> Option<&str> {
DeleteLocationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLocationError {
pub fn new(kind: DeleteLocationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteLocationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLocationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, DeleteLocationErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLocationErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DeleteLocationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLocationErrorKind::InternalException(_inner) => Some(_inner),
DeleteLocationErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteLocationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAgentError {
pub kind: DeleteAgentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAgentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAgentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAgentErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAgentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAgentErrorKind::InternalException(_inner) => _inner.fmt(f),
DeleteAgentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteAgentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAgentError {
fn code(&self) -> Option<&str> {
DeleteAgentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAgentError {
pub fn new(kind: DeleteAgentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, DeleteAgentErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, DeleteAgentErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for DeleteAgentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAgentErrorKind::InternalException(_inner) => Some(_inner),
DeleteAgentErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteAgentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTaskError {
pub kind: CreateTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTaskErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTaskErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateTaskErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTaskError {
fn code(&self) -> Option<&str> {
CreateTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTaskError {
pub fn new(kind: CreateTaskErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateTaskErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, CreateTaskErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for CreateTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTaskErrorKind::InternalException(_inner) => Some(_inner),
CreateTaskErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationSmbError {
pub kind: CreateLocationSmbErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationSmbError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationSmbErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationSmbError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationSmbErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationSmbErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationSmbErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationSmbError {
fn code(&self) -> Option<&str> {
CreateLocationSmbError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationSmbError {
pub fn new(kind: CreateLocationSmbErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationSmbErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateLocationSmbErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationSmbErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationSmbError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationSmbErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationSmbErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationSmbErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationS3Error {
pub kind: CreateLocationS3ErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationS3Error {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationS3ErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationS3Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationS3ErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationS3ErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationS3ErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationS3Error {
fn code(&self) -> Option<&str> {
CreateLocationS3Error::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationS3Error {
pub fn new(kind: CreateLocationS3ErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationS3ErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateLocationS3ErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationS3ErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationS3Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationS3ErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationS3ErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationS3ErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationObjectStorageError {
pub kind: CreateLocationObjectStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationObjectStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationObjectStorageErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationObjectStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationObjectStorageErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationObjectStorageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationObjectStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationObjectStorageError {
fn code(&self) -> Option<&str> {
CreateLocationObjectStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationObjectStorageError {
pub fn new(kind: CreateLocationObjectStorageErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationObjectStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationObjectStorageErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationObjectStorageErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationObjectStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationObjectStorageErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationObjectStorageErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationObjectStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationNfsError {
pub kind: CreateLocationNfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationNfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationNfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationNfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationNfsErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationNfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationNfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationNfsError {
fn code(&self) -> Option<&str> {
CreateLocationNfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationNfsError {
pub fn new(kind: CreateLocationNfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationNfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateLocationNfsErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationNfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationNfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationNfsErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationNfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationNfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationHdfsError {
pub kind: CreateLocationHdfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationHdfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationHdfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationHdfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationHdfsErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationHdfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationHdfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationHdfsError {
fn code(&self) -> Option<&str> {
CreateLocationHdfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationHdfsError {
pub fn new(kind: CreateLocationHdfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationHdfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationHdfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationHdfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationHdfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationHdfsErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationHdfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationHdfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationFsxWindowsError {
pub kind: CreateLocationFsxWindowsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationFsxWindowsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationFsxWindowsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationFsxWindowsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationFsxWindowsErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationFsxWindowsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationFsxWindowsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationFsxWindowsError {
fn code(&self) -> Option<&str> {
CreateLocationFsxWindowsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationFsxWindowsError {
pub fn new(kind: CreateLocationFsxWindowsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationFsxWindowsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxWindowsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxWindowsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationFsxWindowsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationFsxWindowsErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationFsxWindowsErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationFsxWindowsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationFsxOpenZfsError {
pub kind: CreateLocationFsxOpenZfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationFsxOpenZfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationFsxOpenZfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationFsxOpenZfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationFsxOpenZfsErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationFsxOpenZfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationFsxOpenZfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationFsxOpenZfsError {
fn code(&self) -> Option<&str> {
CreateLocationFsxOpenZfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationFsxOpenZfsError {
pub fn new(kind: CreateLocationFsxOpenZfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationFsxOpenZfsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxOpenZfsErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxOpenZfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationFsxOpenZfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationFsxOpenZfsErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationFsxOpenZfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationFsxOpenZfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationFsxOntapError {
pub kind: CreateLocationFsxOntapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationFsxOntapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationFsxOntapErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationFsxOntapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationFsxOntapErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationFsxOntapErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationFsxOntapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationFsxOntapError {
fn code(&self) -> Option<&str> {
CreateLocationFsxOntapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationFsxOntapError {
pub fn new(kind: CreateLocationFsxOntapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationFsxOntapErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxOntapErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxOntapErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationFsxOntapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationFsxOntapErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationFsxOntapErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationFsxOntapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationFsxLustreError {
pub kind: CreateLocationFsxLustreErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationFsxLustreError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationFsxLustreErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationFsxLustreError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationFsxLustreErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationFsxLustreErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationFsxLustreErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationFsxLustreError {
fn code(&self) -> Option<&str> {
CreateLocationFsxLustreError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationFsxLustreError {
pub fn new(kind: CreateLocationFsxLustreErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationFsxLustreErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxLustreErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationFsxLustreErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationFsxLustreError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationFsxLustreErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationFsxLustreErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationFsxLustreErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLocationEfsError {
pub kind: CreateLocationEfsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLocationEfsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLocationEfsErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLocationEfsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLocationEfsErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateLocationEfsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateLocationEfsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLocationEfsError {
fn code(&self) -> Option<&str> {
CreateLocationEfsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLocationEfsError {
pub fn new(kind: CreateLocationEfsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLocationEfsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateLocationEfsErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLocationEfsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateLocationEfsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLocationEfsErrorKind::InternalException(_inner) => Some(_inner),
CreateLocationEfsErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateLocationEfsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAgentError {
pub kind: CreateAgentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAgentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAgentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAgentErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAgentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAgentErrorKind::InternalException(_inner) => _inner.fmt(f),
CreateAgentErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateAgentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAgentError {
fn code(&self) -> Option<&str> {
CreateAgentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAgentError {
pub fn new(kind: CreateAgentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAgentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(&self.kind, CreateAgentErrorKind::InternalException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, CreateAgentErrorKind::InvalidRequestException(_))
}
}
impl std::error::Error for CreateAgentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAgentErrorKind::InternalException(_inner) => Some(_inner),
CreateAgentErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateAgentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelTaskExecutionError {
pub kind: CancelTaskExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelTaskExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelTaskExecutionErrorKind {
InternalException(crate::error::InternalException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelTaskExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelTaskExecutionErrorKind::InternalException(_inner) => _inner.fmt(f),
CancelTaskExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CancelTaskExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelTaskExecutionError {
fn code(&self) -> Option<&str> {
CancelTaskExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelTaskExecutionError {
pub fn new(kind: CancelTaskExecutionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CancelTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelTaskExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_exception(&self) -> bool {
matches!(
&self.kind,
CancelTaskExecutionErrorKind::InternalException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CancelTaskExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CancelTaskExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelTaskExecutionErrorKind::InternalException(_inner) => Some(_inner),
CancelTaskExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
CancelTaskExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}