#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkGroupError {
pub kind: UpdateWorkGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkGroupErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateWorkGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateWorkGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkGroupError {
fn code(&self) -> Option<&str> {
UpdateWorkGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateWorkGroupError {
pub fn new(kind: UpdateWorkGroupErrorKind, 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: UpdateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkGroupErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkGroupErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateWorkGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkGroupErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateWorkGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateWorkGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[doc(hidden)]
pub athena_error_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn athena_error_code(&self) -> std::option::Option<&str> {
self.athena_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) athena_error_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn athena_error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.athena_error_code = Some(input.into());
self
}
pub fn set_athena_error_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.athena_error_code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidRequestException {
crate::error::InvalidRequestException {
athena_error_code: self.athena_error_code,
message: self.message,
}
}
}
}
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 InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdatePreparedStatementError {
pub kind: UpdatePreparedStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdatePreparedStatementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdatePreparedStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdatePreparedStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdatePreparedStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdatePreparedStatementErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdatePreparedStatementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdatePreparedStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdatePreparedStatementError {
fn code(&self) -> Option<&str> {
UpdatePreparedStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdatePreparedStatementError {
pub fn new(kind: UpdatePreparedStatementErrorKind, 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: UpdatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePreparedStatementErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePreparedStatementErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePreparedStatementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdatePreparedStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdatePreparedStatementErrorKind::InternalServerException(_inner) => Some(_inner),
UpdatePreparedStatementErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdatePreparedStatementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdatePreparedStatementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNotebookMetadataError {
pub kind: UpdateNotebookMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNotebookMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNotebookMetadataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateNotebookMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNotebookMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateNotebookMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateNotebookMetadataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateNotebookMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNotebookMetadataError {
fn code(&self) -> Option<&str> {
UpdateNotebookMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNotebookMetadataError {
pub fn new(kind: UpdateNotebookMetadataErrorKind, 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: UpdateNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookMetadataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateNotebookMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNotebookMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateNotebookMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateNotebookMetadataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateNotebookMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyRequestsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ThrottleReason>,
}
impl TooManyRequestsException {
pub fn reason(&self) -> std::option::Option<&crate::model::ThrottleReason> {
self.reason.as_ref()
}
}
impl TooManyRequestsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyRequestsException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyRequestsException {}
pub mod too_many_requests_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ThrottleReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ThrottleReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ThrottleReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::TooManyRequestsException {
crate::error::TooManyRequestsException {
message: self.message,
reason: self.reason,
}
}
}
}
impl TooManyRequestsException {
pub fn builder() -> crate::error::too_many_requests_exception::Builder {
crate::error::too_many_requests_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNotebookError {
pub kind: UpdateNotebookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNotebookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNotebookErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateNotebookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNotebookErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateNotebookErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateNotebookErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateNotebookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNotebookError {
fn code(&self) -> Option<&str> {
UpdateNotebookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNotebookError {
pub fn new(kind: UpdateNotebookErrorKind, 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: UpdateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotebookErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateNotebookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNotebookErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateNotebookErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateNotebookErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateNotebookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNamedQueryError {
pub kind: UpdateNamedQueryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNamedQueryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNamedQueryErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateNamedQueryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNamedQueryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateNamedQueryErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateNamedQueryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNamedQueryError {
fn code(&self) -> Option<&str> {
UpdateNamedQueryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNamedQueryError {
pub fn new(kind: UpdateNamedQueryErrorKind, 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: UpdateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNamedQueryErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNamedQueryErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateNamedQueryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNamedQueryErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateNamedQueryErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateNamedQueryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDataCatalogError {
pub kind: UpdateDataCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDataCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDataCatalogErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDataCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDataCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDataCatalogErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateDataCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDataCatalogError {
fn code(&self) -> Option<&str> {
UpdateDataCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDataCatalogError {
pub fn new(kind: UpdateDataCatalogErrorKind, 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: UpdateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDataCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDataCatalogErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for UpdateDataCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDataCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDataCatalogErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateDataCatalogErrorKind::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 {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TerminateSessionError {
pub kind: TerminateSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TerminateSessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TerminateSessionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TerminateSessionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TerminateSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TerminateSessionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TerminateSessionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TerminateSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TerminateSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TerminateSessionError {
fn code(&self) -> Option<&str> {
TerminateSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TerminateSessionError {
pub fn new(kind: TerminateSessionErrorKind, 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: TerminateSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TerminateSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
TerminateSessionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
TerminateSessionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TerminateSessionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TerminateSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TerminateSessionErrorKind::InternalServerException(_inner) => Some(_inner),
TerminateSessionErrorKind::InvalidRequestException(_inner) => Some(_inner),
TerminateSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TerminateSessionErrorKind::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 {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopQueryExecutionError {
pub kind: StopQueryExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopQueryExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopQueryExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopQueryExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopQueryExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopQueryExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StopQueryExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopQueryExecutionError {
fn code(&self) -> Option<&str> {
StopQueryExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopQueryExecutionError {
pub fn new(kind: StopQueryExecutionErrorKind, 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: StopQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopQueryExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StopQueryExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for StopQueryExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopQueryExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
StopQueryExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StopQueryExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopCalculationExecutionError {
pub kind: StopCalculationExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopCalculationExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopCalculationExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopCalculationExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopCalculationExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopCalculationExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StopCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopCalculationExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopCalculationExecutionError {
fn code(&self) -> Option<&str> {
StopCalculationExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopCalculationExecutionError {
pub fn new(kind: StopCalculationExecutionErrorKind, 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: StopCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopCalculationExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StopCalculationExecutionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopCalculationExecutionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StopCalculationExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopCalculationExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
StopCalculationExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StopCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopCalculationExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartSessionError {
pub kind: StartSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartSessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartSessionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartSessionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
SessionAlreadyExistsException(crate::error::SessionAlreadyExistsException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartSessionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartSessionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartSessionErrorKind::SessionAlreadyExistsException(_inner) => _inner.fmt(f),
StartSessionErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StartSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartSessionError {
fn code(&self) -> Option<&str> {
StartSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartSessionError {
pub fn new(kind: StartSessionErrorKind, 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: StartSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartSessionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartSessionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartSessionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_session_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
StartSessionErrorKind::SessionAlreadyExistsException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
StartSessionErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for StartSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartSessionErrorKind::InternalServerException(_inner) => Some(_inner),
StartSessionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartSessionErrorKind::SessionAlreadyExistsException(_inner) => Some(_inner),
StartSessionErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StartSessionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SessionAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SessionAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SessionAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SessionAlreadyExistsException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for SessionAlreadyExistsException {}
pub mod session_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::SessionAlreadyExistsException {
crate::error::SessionAlreadyExistsException {
message: self.message,
}
}
}
}
impl SessionAlreadyExistsException {
pub fn builder() -> crate::error::session_already_exists_exception::Builder {
crate::error::session_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartQueryExecutionError {
pub kind: StartQueryExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartQueryExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartQueryExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartQueryExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartQueryExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartQueryExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartQueryExecutionErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StartQueryExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartQueryExecutionError {
fn code(&self) -> Option<&str> {
StartQueryExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartQueryExecutionError {
pub fn new(kind: StartQueryExecutionErrorKind, 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: StartQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartQueryExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartQueryExecutionErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
StartQueryExecutionErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for StartQueryExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartQueryExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
StartQueryExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartQueryExecutionErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StartQueryExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartCalculationExecutionError {
pub kind: StartCalculationExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartCalculationExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartCalculationExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartCalculationExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartCalculationExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartCalculationExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartCalculationExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartCalculationExecutionError {
fn code(&self) -> Option<&str> {
StartCalculationExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartCalculationExecutionError {
pub fn new(kind: StartCalculationExecutionErrorKind, 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: StartCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartCalculationExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartCalculationExecutionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartCalculationExecutionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StartCalculationExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartCalculationExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
StartCalculationExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartCalculationExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWorkGroupsError {
pub kind: ListWorkGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWorkGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWorkGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWorkGroupsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWorkGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWorkGroupsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListWorkGroupsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListWorkGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWorkGroupsError {
fn code(&self) -> Option<&str> {
ListWorkGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListWorkGroupsError {
pub fn new(kind: ListWorkGroupsErrorKind, 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: ListWorkGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWorkGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkGroupsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkGroupsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListWorkGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWorkGroupsErrorKind::InternalServerException(_inner) => Some(_inner),
ListWorkGroupsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListWorkGroupsErrorKind::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 {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTableMetadataError {
pub kind: ListTableMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTableMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTableMetadataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
MetadataException(crate::error::MetadataException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTableMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTableMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTableMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTableMetadataErrorKind::MetadataException(_inner) => _inner.fmt(f),
ListTableMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTableMetadataError {
fn code(&self) -> Option<&str> {
ListTableMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTableMetadataError {
pub fn new(kind: ListTableMetadataErrorKind, 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: ListTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTableMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTableMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_metadata_exception(&self) -> bool {
matches!(&self.kind, ListTableMetadataErrorKind::MetadataException(_))
}
}
impl std::error::Error for ListTableMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTableMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
ListTableMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTableMetadataErrorKind::MetadataException(_inner) => Some(_inner),
ListTableMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MetadataException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MetadataException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MetadataException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MetadataException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for MetadataException {}
pub mod metadata_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::MetadataException {
crate::error::MetadataException {
message: self.message,
}
}
}
}
impl MetadataException {
pub fn builder() -> crate::error::metadata_exception::Builder {
crate::error::metadata_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSessionsError {
pub kind: ListSessionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSessionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSessionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSessionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSessionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSessionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListSessionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListSessionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSessionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSessionsError {
fn code(&self) -> Option<&str> {
ListSessionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSessionsError {
pub fn new(kind: ListSessionsErrorKind, 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: ListSessionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSessionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListSessionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListSessionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSessionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListSessionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSessionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListSessionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListSessionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSessionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListQueryExecutionsError {
pub kind: ListQueryExecutionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListQueryExecutionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListQueryExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListQueryExecutionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListQueryExecutionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListQueryExecutionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListQueryExecutionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListQueryExecutionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListQueryExecutionsError {
fn code(&self) -> Option<&str> {
ListQueryExecutionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListQueryExecutionsError {
pub fn new(kind: ListQueryExecutionsErrorKind, 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: ListQueryExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListQueryExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListQueryExecutionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListQueryExecutionsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListQueryExecutionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListQueryExecutionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListQueryExecutionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListQueryExecutionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPreparedStatementsError {
pub kind: ListPreparedStatementsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPreparedStatementsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPreparedStatementsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPreparedStatementsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPreparedStatementsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPreparedStatementsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListPreparedStatementsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListPreparedStatementsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPreparedStatementsError {
fn code(&self) -> Option<&str> {
ListPreparedStatementsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPreparedStatementsError {
pub fn new(kind: ListPreparedStatementsErrorKind, 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: ListPreparedStatementsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPreparedStatementsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPreparedStatementsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListPreparedStatementsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListPreparedStatementsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPreparedStatementsErrorKind::InternalServerException(_inner) => Some(_inner),
ListPreparedStatementsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListPreparedStatementsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListNotebookSessionsError {
pub kind: ListNotebookSessionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListNotebookSessionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListNotebookSessionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListNotebookSessionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListNotebookSessionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListNotebookSessionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListNotebookSessionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListNotebookSessionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListNotebookSessionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListNotebookSessionsError {
fn code(&self) -> Option<&str> {
ListNotebookSessionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListNotebookSessionsError {
pub fn new(kind: ListNotebookSessionsErrorKind, 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: ListNotebookSessionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListNotebookSessionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookSessionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookSessionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookSessionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListNotebookSessionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListNotebookSessionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListNotebookSessionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListNotebookSessionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListNotebookSessionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListNotebookMetadataError {
pub kind: ListNotebookMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListNotebookMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListNotebookMetadataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListNotebookMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListNotebookMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListNotebookMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListNotebookMetadataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListNotebookMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListNotebookMetadataError {
fn code(&self) -> Option<&str> {
ListNotebookMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListNotebookMetadataError {
pub fn new(kind: ListNotebookMetadataErrorKind, 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: ListNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListNotebookMetadataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListNotebookMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListNotebookMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
ListNotebookMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListNotebookMetadataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListNotebookMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListNamedQueriesError {
pub kind: ListNamedQueriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListNamedQueriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListNamedQueriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListNamedQueriesErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListNamedQueriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListNamedQueriesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListNamedQueriesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListNamedQueriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListNamedQueriesError {
fn code(&self) -> Option<&str> {
ListNamedQueriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListNamedQueriesError {
pub fn new(kind: ListNamedQueriesErrorKind, 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: ListNamedQueriesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListNamedQueriesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedQueriesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedQueriesErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListNamedQueriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListNamedQueriesErrorKind::InternalServerException(_inner) => Some(_inner),
ListNamedQueriesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListNamedQueriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListExecutorsError {
pub kind: ListExecutorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListExecutorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListExecutorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListExecutorsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListExecutorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListExecutorsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListExecutorsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListExecutorsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListExecutorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListExecutorsError {
fn code(&self) -> Option<&str> {
ListExecutorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListExecutorsError {
pub fn new(kind: ListExecutorsErrorKind, 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: ListExecutorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListExecutorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListExecutorsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListExecutorsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListExecutorsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListExecutorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListExecutorsErrorKind::InternalServerException(_inner) => Some(_inner),
ListExecutorsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListExecutorsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListExecutorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEngineVersionsError {
pub kind: ListEngineVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEngineVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEngineVersionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEngineVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEngineVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListEngineVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEngineVersionsError {
fn code(&self) -> Option<&str> {
ListEngineVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEngineVersionsError {
pub fn new(kind: ListEngineVersionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEngineVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListEngineVersionsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListEngineVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEngineVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListEngineVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDataCatalogsError {
pub kind: ListDataCatalogsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDataCatalogsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDataCatalogsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDataCatalogsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDataCatalogsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDataCatalogsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDataCatalogsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListDataCatalogsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDataCatalogsError {
fn code(&self) -> Option<&str> {
ListDataCatalogsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDataCatalogsError {
pub fn new(kind: ListDataCatalogsErrorKind, 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: ListDataCatalogsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDataCatalogsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDataCatalogsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListDataCatalogsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for ListDataCatalogsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDataCatalogsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDataCatalogsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListDataCatalogsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDatabasesError {
pub kind: ListDatabasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDatabasesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDatabasesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDatabasesErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
MetadataException(crate::error::MetadataException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDatabasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDatabasesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDatabasesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListDatabasesErrorKind::MetadataException(_inner) => _inner.fmt(f),
ListDatabasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDatabasesError {
fn code(&self) -> Option<&str> {
ListDatabasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDatabasesError {
pub fn new(kind: ListDatabasesErrorKind, 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: ListDatabasesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDatabasesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDatabasesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListDatabasesErrorKind::InvalidRequestException(_)
)
}
pub fn is_metadata_exception(&self) -> bool {
matches!(&self.kind, ListDatabasesErrorKind::MetadataException(_))
}
}
impl std::error::Error for ListDatabasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDatabasesErrorKind::InternalServerException(_inner) => Some(_inner),
ListDatabasesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListDatabasesErrorKind::MetadataException(_inner) => Some(_inner),
ListDatabasesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCalculationExecutionsError {
pub kind: ListCalculationExecutionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCalculationExecutionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCalculationExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCalculationExecutionsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCalculationExecutionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCalculationExecutionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListCalculationExecutionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListCalculationExecutionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListCalculationExecutionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCalculationExecutionsError {
fn code(&self) -> Option<&str> {
ListCalculationExecutionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCalculationExecutionsError {
pub fn new(kind: ListCalculationExecutionsErrorKind, 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: ListCalculationExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCalculationExecutionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCalculationExecutionsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListCalculationExecutionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCalculationExecutionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListCalculationExecutionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCalculationExecutionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListCalculationExecutionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListCalculationExecutionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListCalculationExecutionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListApplicationDPUSizesError {
pub kind: ListApplicationDPUSizesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListApplicationDPUSizesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListApplicationDPUSizesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListApplicationDPUSizesErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListApplicationDPUSizesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListApplicationDPUSizesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListApplicationDPUSizesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListApplicationDPUSizesErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListApplicationDPUSizesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListApplicationDPUSizesError {
fn code(&self) -> Option<&str> {
ListApplicationDPUSizesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListApplicationDPUSizesError {
pub fn new(kind: ListApplicationDPUSizesErrorKind, 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: ListApplicationDPUSizesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListApplicationDPUSizesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationDPUSizesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationDPUSizesErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationDPUSizesErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListApplicationDPUSizesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListApplicationDPUSizesErrorKind::InternalServerException(_inner) => Some(_inner),
ListApplicationDPUSizesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListApplicationDPUSizesErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListApplicationDPUSizesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportNotebookError {
pub kind: ImportNotebookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportNotebookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportNotebookErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportNotebookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportNotebookErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ImportNotebookErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ImportNotebookErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ImportNotebookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportNotebookError {
fn code(&self) -> Option<&str> {
ImportNotebookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportNotebookError {
pub fn new(kind: ImportNotebookErrorKind, 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: ImportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ImportNotebookErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ImportNotebookErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ImportNotebookErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ImportNotebookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportNotebookErrorKind::InternalServerException(_inner) => Some(_inner),
ImportNotebookErrorKind::InvalidRequestException(_inner) => Some(_inner),
ImportNotebookErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ImportNotebookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetWorkGroupError {
pub kind: GetWorkGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetWorkGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetWorkGroupErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetWorkGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetWorkGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetWorkGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetWorkGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetWorkGroupError {
fn code(&self) -> Option<&str> {
GetWorkGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetWorkGroupError {
pub fn new(kind: GetWorkGroupErrorKind, 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: GetWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkGroupErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkGroupErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetWorkGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetWorkGroupErrorKind::InternalServerException(_inner) => Some(_inner),
GetWorkGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetWorkGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTableMetadataError {
pub kind: GetTableMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTableMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTableMetadataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
MetadataException(crate::error::MetadataException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTableMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTableMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTableMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetTableMetadataErrorKind::MetadataException(_inner) => _inner.fmt(f),
GetTableMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTableMetadataError {
fn code(&self) -> Option<&str> {
GetTableMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTableMetadataError {
pub fn new(kind: GetTableMetadataErrorKind, 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: GetTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTableMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTableMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetTableMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_metadata_exception(&self) -> bool {
matches!(&self.kind, GetTableMetadataErrorKind::MetadataException(_))
}
}
impl std::error::Error for GetTableMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTableMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
GetTableMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetTableMetadataErrorKind::MetadataException(_inner) => Some(_inner),
GetTableMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSessionStatusError {
pub kind: GetSessionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSessionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSessionStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSessionStatusErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSessionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSessionStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSessionStatusErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetSessionStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSessionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSessionStatusError {
fn code(&self) -> Option<&str> {
GetSessionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSessionStatusError {
pub fn new(kind: GetSessionStatusErrorKind, 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: GetSessionStatusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSessionStatusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetSessionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetSessionStatusErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSessionStatusErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetSessionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSessionStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetSessionStatusErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSessionStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSessionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSessionError {
pub kind: GetSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSessionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSessionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSessionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSessionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSessionError {
fn code(&self) -> Option<&str> {
GetSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSessionError {
pub fn new(kind: GetSessionErrorKind, 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: GetSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetSessionErrorKind::InternalServerException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetSessionErrorKind::InvalidRequestException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSessionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSessionErrorKind::InternalServerException(_inner) => Some(_inner),
GetSessionErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSessionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetQueryRuntimeStatisticsError {
pub kind: GetQueryRuntimeStatisticsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetQueryRuntimeStatisticsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetQueryRuntimeStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetQueryRuntimeStatisticsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetQueryRuntimeStatisticsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetQueryRuntimeStatisticsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetQueryRuntimeStatisticsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetQueryRuntimeStatisticsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetQueryRuntimeStatisticsError {
fn code(&self) -> Option<&str> {
GetQueryRuntimeStatisticsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetQueryRuntimeStatisticsError {
pub fn new(kind: GetQueryRuntimeStatisticsErrorKind, 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: GetQueryRuntimeStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetQueryRuntimeStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryRuntimeStatisticsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryRuntimeStatisticsErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetQueryRuntimeStatisticsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetQueryRuntimeStatisticsErrorKind::InternalServerException(_inner) => Some(_inner),
GetQueryRuntimeStatisticsErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetQueryRuntimeStatisticsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetQueryResultsError {
pub kind: GetQueryResultsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetQueryResultsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetQueryResultsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetQueryResultsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetQueryResultsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetQueryResultsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetQueryResultsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetQueryResultsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetQueryResultsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetQueryResultsError {
fn code(&self) -> Option<&str> {
GetQueryResultsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetQueryResultsError {
pub fn new(kind: GetQueryResultsErrorKind, 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: GetQueryResultsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetQueryResultsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryResultsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryResultsErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryResultsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetQueryResultsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetQueryResultsErrorKind::InternalServerException(_inner) => Some(_inner),
GetQueryResultsErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetQueryResultsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetQueryResultsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetQueryExecutionError {
pub kind: GetQueryExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetQueryExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetQueryExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetQueryExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetQueryExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetQueryExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetQueryExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetQueryExecutionError {
fn code(&self) -> Option<&str> {
GetQueryExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetQueryExecutionError {
pub fn new(kind: GetQueryExecutionErrorKind, 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: GetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetQueryExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetQueryExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetQueryExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
GetQueryExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetQueryExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPreparedStatementError {
pub kind: GetPreparedStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetPreparedStatementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPreparedStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetPreparedStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPreparedStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetPreparedStatementErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetPreparedStatementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetPreparedStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPreparedStatementError {
fn code(&self) -> Option<&str> {
GetPreparedStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetPreparedStatementError {
pub fn new(kind: GetPreparedStatementErrorKind, 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: GetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetPreparedStatementErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetPreparedStatementErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetPreparedStatementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetPreparedStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPreparedStatementErrorKind::InternalServerException(_inner) => Some(_inner),
GetPreparedStatementErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetPreparedStatementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetPreparedStatementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNotebookMetadataError {
pub kind: GetNotebookMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNotebookMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNotebookMetadataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetNotebookMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNotebookMetadataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNotebookMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetNotebookMetadataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetNotebookMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNotebookMetadataError {
fn code(&self) -> Option<&str> {
GetNotebookMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNotebookMetadataError {
pub fn new(kind: GetNotebookMetadataErrorKind, 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: GetNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNotebookMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNotebookMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetNotebookMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetNotebookMetadataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetNotebookMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNotebookMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
GetNotebookMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetNotebookMetadataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetNotebookMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNamedQueryError {
pub kind: GetNamedQueryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNamedQueryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNamedQueryErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetNamedQueryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNamedQueryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNamedQueryErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetNamedQueryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNamedQueryError {
fn code(&self) -> Option<&str> {
GetNamedQueryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNamedQueryError {
pub fn new(kind: GetNamedQueryErrorKind, 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: GetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNamedQueryErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetNamedQueryErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetNamedQueryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNamedQueryErrorKind::InternalServerException(_inner) => Some(_inner),
GetNamedQueryErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetNamedQueryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDataCatalogError {
pub kind: GetDataCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDataCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDataCatalogErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDataCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDataCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDataCatalogErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetDataCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDataCatalogError {
fn code(&self) -> Option<&str> {
GetDataCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDataCatalogError {
pub fn new(kind: GetDataCatalogErrorKind, 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: GetDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDataCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetDataCatalogErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetDataCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDataCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
GetDataCatalogErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetDataCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDatabaseError {
pub kind: GetDatabaseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDatabaseError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDatabaseErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDatabaseErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
MetadataException(crate::error::MetadataException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDatabaseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDatabaseErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDatabaseErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetDatabaseErrorKind::MetadataException(_inner) => _inner.fmt(f),
GetDatabaseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDatabaseError {
fn code(&self) -> Option<&str> {
GetDatabaseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDatabaseError {
pub fn new(kind: GetDatabaseErrorKind, 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: GetDatabaseErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDatabaseErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetDatabaseErrorKind::InternalServerException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetDatabaseErrorKind::InvalidRequestException(_))
}
pub fn is_metadata_exception(&self) -> bool {
matches!(&self.kind, GetDatabaseErrorKind::MetadataException(_))
}
}
impl std::error::Error for GetDatabaseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDatabaseErrorKind::InternalServerException(_inner) => Some(_inner),
GetDatabaseErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetDatabaseErrorKind::MetadataException(_inner) => Some(_inner),
GetDatabaseErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCalculationExecutionStatusError {
pub kind: GetCalculationExecutionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCalculationExecutionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCalculationExecutionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCalculationExecutionStatusErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCalculationExecutionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCalculationExecutionStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetCalculationExecutionStatusErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
GetCalculationExecutionStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetCalculationExecutionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCalculationExecutionStatusError {
fn code(&self) -> Option<&str> {
GetCalculationExecutionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCalculationExecutionStatusError {
pub fn new(
kind: GetCalculationExecutionStatusErrorKind,
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: GetCalculationExecutionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCalculationExecutionStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionStatusErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionStatusErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetCalculationExecutionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCalculationExecutionStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetCalculationExecutionStatusErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetCalculationExecutionStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetCalculationExecutionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCalculationExecutionCodeError {
pub kind: GetCalculationExecutionCodeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCalculationExecutionCodeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCalculationExecutionCodeErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCalculationExecutionCodeErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCalculationExecutionCodeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCalculationExecutionCodeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCalculationExecutionCodeErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetCalculationExecutionCodeErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetCalculationExecutionCodeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCalculationExecutionCodeError {
fn code(&self) -> Option<&str> {
GetCalculationExecutionCodeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCalculationExecutionCodeError {
pub fn new(kind: GetCalculationExecutionCodeErrorKind, 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: GetCalculationExecutionCodeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCalculationExecutionCodeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionCodeErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionCodeErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionCodeErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetCalculationExecutionCodeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCalculationExecutionCodeErrorKind::InternalServerException(_inner) => Some(_inner),
GetCalculationExecutionCodeErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetCalculationExecutionCodeErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCalculationExecutionCodeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCalculationExecutionError {
pub kind: GetCalculationExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCalculationExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCalculationExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCalculationExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCalculationExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCalculationExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCalculationExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCalculationExecutionError {
fn code(&self) -> Option<&str> {
GetCalculationExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCalculationExecutionError {
pub fn new(kind: GetCalculationExecutionErrorKind, 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: GetCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCalculationExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCalculationExecutionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetCalculationExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCalculationExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
GetCalculationExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetCalculationExecutionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCalculationExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportNotebookError {
pub kind: ExportNotebookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportNotebookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportNotebookErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportNotebookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportNotebookErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ExportNotebookErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ExportNotebookErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ExportNotebookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportNotebookError {
fn code(&self) -> Option<&str> {
ExportNotebookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportNotebookError {
pub fn new(kind: ExportNotebookErrorKind, 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: ExportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportNotebookErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ExportNotebookErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ExportNotebookErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ExportNotebookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportNotebookErrorKind::InternalServerException(_inner) => Some(_inner),
ExportNotebookErrorKind::InvalidRequestException(_inner) => Some(_inner),
ExportNotebookErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ExportNotebookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkGroupError {
pub kind: DeleteWorkGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkGroupErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteWorkGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteWorkGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkGroupError {
fn code(&self) -> Option<&str> {
DeleteWorkGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWorkGroupError {
pub fn new(kind: DeleteWorkGroupErrorKind, 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: DeleteWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkGroupErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkGroupErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DeleteWorkGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkGroupErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteWorkGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteWorkGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePreparedStatementError {
pub kind: DeletePreparedStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePreparedStatementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePreparedStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePreparedStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePreparedStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeletePreparedStatementErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeletePreparedStatementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePreparedStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePreparedStatementError {
fn code(&self) -> Option<&str> {
DeletePreparedStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePreparedStatementError {
pub fn new(kind: DeletePreparedStatementErrorKind, 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: DeletePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePreparedStatementErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeletePreparedStatementErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePreparedStatementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeletePreparedStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePreparedStatementErrorKind::InternalServerException(_inner) => Some(_inner),
DeletePreparedStatementErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeletePreparedStatementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePreparedStatementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteNotebookError {
pub kind: DeleteNotebookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteNotebookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteNotebookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteNotebookErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteNotebookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteNotebookErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteNotebookErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteNotebookErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteNotebookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteNotebookError {
fn code(&self) -> Option<&str> {
DeleteNotebookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteNotebookError {
pub fn new(kind: DeleteNotebookErrorKind, 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: DeleteNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotebookErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotebookErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotebookErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteNotebookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteNotebookErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteNotebookErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteNotebookErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteNotebookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteNamedQueryError {
pub kind: DeleteNamedQueryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteNamedQueryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteNamedQueryErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteNamedQueryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteNamedQueryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteNamedQueryErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteNamedQueryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteNamedQueryError {
fn code(&self) -> Option<&str> {
DeleteNamedQueryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteNamedQueryError {
pub fn new(kind: DeleteNamedQueryErrorKind, 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: DeleteNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNamedQueryErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNamedQueryErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DeleteNamedQueryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteNamedQueryErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteNamedQueryErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteNamedQueryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDataCatalogError {
pub kind: DeleteDataCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDataCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDataCatalogErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDataCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDataCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDataCatalogErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteDataCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDataCatalogError {
fn code(&self) -> Option<&str> {
DeleteDataCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDataCatalogError {
pub fn new(kind: DeleteDataCatalogErrorKind, 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: DeleteDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDataCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDataCatalogErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for DeleteDataCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDataCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDataCatalogErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteDataCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkGroupError {
pub kind: CreateWorkGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkGroupErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateWorkGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateWorkGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkGroupError {
fn code(&self) -> Option<&str> {
CreateWorkGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWorkGroupError {
pub fn new(kind: CreateWorkGroupErrorKind, 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: CreateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkGroupErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkGroupErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateWorkGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkGroupErrorKind::InternalServerException(_inner) => Some(_inner),
CreateWorkGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateWorkGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePresignedNotebookUrlError {
pub kind: CreatePresignedNotebookUrlErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePresignedNotebookUrlError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePresignedNotebookUrlErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePresignedNotebookUrlErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePresignedNotebookUrlError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePresignedNotebookUrlErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreatePresignedNotebookUrlErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreatePresignedNotebookUrlErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreatePresignedNotebookUrlErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePresignedNotebookUrlError {
fn code(&self) -> Option<&str> {
CreatePresignedNotebookUrlError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePresignedNotebookUrlError {
pub fn new(kind: CreatePresignedNotebookUrlErrorKind, 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: CreatePresignedNotebookUrlErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePresignedNotebookUrlErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreatePresignedNotebookUrlErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreatePresignedNotebookUrlErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreatePresignedNotebookUrlErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreatePresignedNotebookUrlError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePresignedNotebookUrlErrorKind::InternalServerException(_inner) => Some(_inner),
CreatePresignedNotebookUrlErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreatePresignedNotebookUrlErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreatePresignedNotebookUrlErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePreparedStatementError {
pub kind: CreatePreparedStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePreparedStatementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePreparedStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePreparedStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePreparedStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreatePreparedStatementErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreatePreparedStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePreparedStatementError {
fn code(&self) -> Option<&str> {
CreatePreparedStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePreparedStatementError {
pub fn new(kind: CreatePreparedStatementErrorKind, 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: CreatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreatePreparedStatementErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreatePreparedStatementErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreatePreparedStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePreparedStatementErrorKind::InternalServerException(_inner) => Some(_inner),
CreatePreparedStatementErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreatePreparedStatementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateNotebookError {
pub kind: CreateNotebookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateNotebookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateNotebookErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateNotebookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateNotebookErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateNotebookErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateNotebookErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateNotebookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateNotebookError {
fn code(&self) -> Option<&str> {
CreateNotebookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateNotebookError {
pub fn new(kind: CreateNotebookErrorKind, 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: CreateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateNotebookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotebookErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotebookErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotebookErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateNotebookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateNotebookErrorKind::InternalServerException(_inner) => Some(_inner),
CreateNotebookErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateNotebookErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateNotebookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateNamedQueryError {
pub kind: CreateNamedQueryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateNamedQueryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateNamedQueryErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateNamedQueryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateNamedQueryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateNamedQueryErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateNamedQueryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateNamedQueryError {
fn code(&self) -> Option<&str> {
CreateNamedQueryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateNamedQueryError {
pub fn new(kind: CreateNamedQueryErrorKind, 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: CreateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateNamedQueryErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateNamedQueryErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateNamedQueryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateNamedQueryErrorKind::InternalServerException(_inner) => Some(_inner),
CreateNamedQueryErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateNamedQueryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataCatalogError {
pub kind: CreateDataCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataCatalogErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDataCatalogErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateDataCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataCatalogError {
fn code(&self) -> Option<&str> {
CreateDataCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataCatalogError {
pub fn new(kind: CreateDataCatalogErrorKind, 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: CreateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateDataCatalogErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for CreateDataCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDataCatalogErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateDataCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetQueryExecutionError {
pub kind: BatchGetQueryExecutionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetQueryExecutionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetQueryExecutionErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetQueryExecutionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetQueryExecutionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchGetQueryExecutionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
BatchGetQueryExecutionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetQueryExecutionError {
fn code(&self) -> Option<&str> {
BatchGetQueryExecutionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetQueryExecutionError {
pub fn new(kind: BatchGetQueryExecutionErrorKind, 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: BatchGetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetQueryExecutionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetQueryExecutionErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetQueryExecutionErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for BatchGetQueryExecutionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetQueryExecutionErrorKind::InternalServerException(_inner) => Some(_inner),
BatchGetQueryExecutionErrorKind::InvalidRequestException(_inner) => Some(_inner),
BatchGetQueryExecutionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetPreparedStatementError {
pub kind: BatchGetPreparedStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetPreparedStatementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetPreparedStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetPreparedStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetPreparedStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchGetPreparedStatementErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
BatchGetPreparedStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetPreparedStatementError {
fn code(&self) -> Option<&str> {
BatchGetPreparedStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetPreparedStatementError {
pub fn new(kind: BatchGetPreparedStatementErrorKind, 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: BatchGetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetPreparedStatementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetPreparedStatementErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetPreparedStatementErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for BatchGetPreparedStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetPreparedStatementErrorKind::InternalServerException(_inner) => Some(_inner),
BatchGetPreparedStatementErrorKind::InvalidRequestException(_inner) => Some(_inner),
BatchGetPreparedStatementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetNamedQueryError {
pub kind: BatchGetNamedQueryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetNamedQueryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetNamedQueryErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetNamedQueryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetNamedQueryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchGetNamedQueryErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
BatchGetNamedQueryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetNamedQueryError {
fn code(&self) -> Option<&str> {
BatchGetNamedQueryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetNamedQueryError {
pub fn new(kind: BatchGetNamedQueryErrorKind, 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: BatchGetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetNamedQueryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetNamedQueryErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetNamedQueryErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for BatchGetNamedQueryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetNamedQueryErrorKind::InternalServerException(_inner) => Some(_inner),
BatchGetNamedQueryErrorKind::InvalidRequestException(_inner) => Some(_inner),
BatchGetNamedQueryErrorKind::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 _)
}
}