#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchExecuteStatementError {
pub kind: BatchExecuteStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchExecuteStatementErrorKind {
ActiveStatementsExceededException(crate::error::ActiveStatementsExceededException),
BatchExecuteStatementException(crate::error::BatchExecuteStatementException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for BatchExecuteStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchExecuteStatementErrorKind::ActiveStatementsExceededException(_inner) => {
_inner.fmt(f)
}
BatchExecuteStatementErrorKind::BatchExecuteStatementException(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchExecuteStatementError {
fn code(&self) -> Option<&str> {
BatchExecuteStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchExecuteStatementError {
pub fn new(kind: BatchExecuteStatementErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchExecuteStatementErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchExecuteStatementErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_active_statements_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::ActiveStatementsExceededException(_)
)
}
pub fn is_batch_execute_statement_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::BatchExecuteStatementException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchExecuteStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchExecuteStatementErrorKind::ActiveStatementsExceededException(_inner) => {
Some(_inner)
}
BatchExecuteStatementErrorKind::BatchExecuteStatementException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::ValidationException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelStatementError {
pub kind: CancelStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CancelStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelStatementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelStatementErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelStatementError {
fn code(&self) -> Option<&str> {
CancelStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelStatementError {
pub fn new(kind: CancelStatementErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CancelStatementErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelStatementErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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,
CancelStatementErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelStatementErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CancelStatementErrorKind::ValidationException(_))
}
}
impl std::error::Error for CancelStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelStatementErrorKind::InternalServerException(_inner) => Some(_inner),
CancelStatementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelStatementErrorKind::ValidationException(_inner) => Some(_inner),
CancelStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeStatementError {
pub kind: DescribeStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeStatementErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeStatementErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeStatementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeStatementErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeStatementError {
fn code(&self) -> Option<&str> {
DescribeStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeStatementError {
pub fn new(kind: DescribeStatementErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeStatementErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeStatementErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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,
DescribeStatementErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeStatementErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeStatementErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeStatementErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeStatementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeStatementErrorKind::ValidationException(_inner) => Some(_inner),
DescribeStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTableError {
pub kind: DescribeTableErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTableErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeTableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTableErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeTableErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeTableErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTableError {
fn code(&self) -> Option<&str> {
DescribeTableError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTableError {
pub fn new(kind: DescribeTableErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeTableErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTableErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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,
DescribeTableErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DescribeTableErrorKind::ValidationException(_))
}
}
impl std::error::Error for DescribeTableError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTableErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeTableErrorKind::ValidationException(_inner) => Some(_inner),
DescribeTableErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExecuteStatementError {
pub kind: ExecuteStatementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExecuteStatementErrorKind {
ActiveStatementsExceededException(crate::error::ActiveStatementsExceededException),
ExecuteStatementException(crate::error::ExecuteStatementException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ExecuteStatementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExecuteStatementErrorKind::ActiveStatementsExceededException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::ExecuteStatementException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::ValidationException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExecuteStatementError {
fn code(&self) -> Option<&str> {
ExecuteStatementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExecuteStatementError {
pub fn new(kind: ExecuteStatementErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ExecuteStatementErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExecuteStatementErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_active_statements_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::ActiveStatementsExceededException(_)
)
}
pub fn is_execute_statement_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::ExecuteStatementException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ExecuteStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecuteStatementErrorKind::ActiveStatementsExceededException(_inner) => Some(_inner),
ExecuteStatementErrorKind::ExecuteStatementException(_inner) => Some(_inner),
ExecuteStatementErrorKind::ValidationException(_inner) => Some(_inner),
ExecuteStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetStatementResultError {
pub kind: GetStatementResultErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetStatementResultErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetStatementResultError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetStatementResultErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetStatementResultErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetStatementResultErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetStatementResultErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetStatementResultError {
fn code(&self) -> Option<&str> {
GetStatementResultError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetStatementResultError {
pub fn new(kind: GetStatementResultErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetStatementResultErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetStatementResultErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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,
GetStatementResultErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetStatementResultErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetStatementResultErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetStatementResultError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetStatementResultErrorKind::InternalServerException(_inner) => Some(_inner),
GetStatementResultErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetStatementResultErrorKind::ValidationException(_inner) => Some(_inner),
GetStatementResultErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDatabasesError {
pub kind: ListDatabasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDatabasesErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
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::ValidationException(_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(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDatabasesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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_validation_exception(&self) -> bool {
matches!(&self.kind, ListDatabasesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListDatabasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDatabasesErrorKind::InternalServerException(_inner) => Some(_inner),
ListDatabasesErrorKind::ValidationException(_inner) => Some(_inner),
ListDatabasesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSchemasError {
pub kind: ListSchemasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSchemasErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListSchemasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSchemasErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListSchemasErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSchemasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSchemasError {
fn code(&self) -> Option<&str> {
ListSchemasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSchemasError {
pub fn new(kind: ListSchemasErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListSchemasErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSchemasErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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, ListSchemasErrorKind::InternalServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListSchemasErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListSchemasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSchemasErrorKind::InternalServerException(_inner) => Some(_inner),
ListSchemasErrorKind::ValidationException(_inner) => Some(_inner),
ListSchemasErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListStatementsError {
pub kind: ListStatementsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListStatementsErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListStatementsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListStatementsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListStatementsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListStatementsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListStatementsError {
fn code(&self) -> Option<&str> {
ListStatementsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListStatementsError {
pub fn new(kind: ListStatementsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListStatementsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListStatementsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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,
ListStatementsErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListStatementsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListStatementsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListStatementsErrorKind::InternalServerException(_inner) => Some(_inner),
ListStatementsErrorKind::ValidationException(_inner) => Some(_inner),
ListStatementsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTablesError {
pub kind: ListTablesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTablesErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTablesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTablesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTablesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTablesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTablesError {
fn code(&self) -> Option<&str> {
ListTablesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTablesError {
pub fn new(kind: ListTablesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTablesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTablesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.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, ListTablesErrorKind::InternalServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListTablesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListTablesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTablesErrorKind::InternalServerException(_inner) => Some(_inner),
ListTablesErrorKind::ValidationException(_inner) => Some(_inner),
ListTablesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ValidationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServerException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServerException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InternalServerException {
pub fn message(&self) -> 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 {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
pub message: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &self.message);
formatter.field("resource_id", &self.resource_id);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> 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 {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExecuteStatementException {
pub message: std::option::Option<std::string::String>,
pub statement_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ExecuteStatementException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ExecuteStatementException");
formatter.field("message", &self.message);
formatter.field("statement_id", &self.statement_id);
formatter.finish()
}
}
impl ExecuteStatementException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ExecuteStatementException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ExecuteStatementException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for ExecuteStatementException {}
pub mod execute_statement_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) statement_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn statement_id(mut self, input: impl Into<std::string::String>) -> Self {
self.statement_id = Some(input.into());
self
}
pub fn set_statement_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.statement_id = input;
self
}
pub fn build(self) -> crate::error::ExecuteStatementException {
crate::error::ExecuteStatementException {
message: self.message,
statement_id: self.statement_id,
}
}
}
}
impl ExecuteStatementException {
pub fn builder() -> crate::error::execute_statement_exception::Builder {
crate::error::execute_statement_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ActiveStatementsExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ActiveStatementsExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ActiveStatementsExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ActiveStatementsExceededException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ActiveStatementsExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ActiveStatementsExceededException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for ActiveStatementsExceededException {}
pub mod active_statements_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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::ActiveStatementsExceededException {
crate::error::ActiveStatementsExceededException {
message: self.message,
}
}
}
}
impl ActiveStatementsExceededException {
pub fn builder() -> crate::error::active_statements_exceeded_exception::Builder {
crate::error::active_statements_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchExecuteStatementException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub statement_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for BatchExecuteStatementException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchExecuteStatementException");
formatter.field("message", &self.message);
formatter.field("statement_id", &self.statement_id);
formatter.finish()
}
}
impl BatchExecuteStatementException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BatchExecuteStatementException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BatchExecuteStatementException")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for BatchExecuteStatementException {}
pub mod batch_execute_statement_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) statement_id: 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 statement_id(mut self, input: impl Into<std::string::String>) -> Self {
self.statement_id = Some(input.into());
self
}
pub fn set_statement_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.statement_id = input;
self
}
pub fn build(self) -> crate::error::BatchExecuteStatementException {
crate::error::BatchExecuteStatementException {
message: self.message,
statement_id: self.statement_id,
}
}
}
}
impl BatchExecuteStatementException {
pub fn builder() -> crate::error::batch_execute_statement_exception::Builder {
crate::error::batch_execute_statement_exception::Builder::default()
}
}