#[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 {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
StatementTimeoutException(crate::error::StatementTimeoutException),
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::BadRequestException(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
BatchExecuteStatementErrorKind::StatementTimeoutException(_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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_statement_timeout_exception(&self) -> bool {
matches!(
&self.kind,
BatchExecuteStatementErrorKind::StatementTimeoutException(_)
)
}
}
impl std::error::Error for BatchExecuteStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchExecuteStatementErrorKind::BadRequestException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::ForbiddenException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::InternalServerErrorException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::StatementTimeoutException(_inner) => Some(_inner),
BatchExecuteStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BeginTransactionError {
pub kind: BeginTransactionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BeginTransactionErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
StatementTimeoutException(crate::error::StatementTimeoutException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for BeginTransactionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BeginTransactionErrorKind::BadRequestException(_inner) => _inner.fmt(f),
BeginTransactionErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
BeginTransactionErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
BeginTransactionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
BeginTransactionErrorKind::StatementTimeoutException(_inner) => _inner.fmt(f),
BeginTransactionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BeginTransactionError {
fn code(&self) -> Option<&str> {
BeginTransactionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BeginTransactionError {
pub fn new(kind: BeginTransactionErrorKind, 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: BeginTransactionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BeginTransactionErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
BeginTransactionErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, BeginTransactionErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
BeginTransactionErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
BeginTransactionErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_statement_timeout_exception(&self) -> bool {
matches!(
&self.kind,
BeginTransactionErrorKind::StatementTimeoutException(_)
)
}
}
impl std::error::Error for BeginTransactionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BeginTransactionErrorKind::BadRequestException(_inner) => Some(_inner),
BeginTransactionErrorKind::ForbiddenException(_inner) => Some(_inner),
BeginTransactionErrorKind::InternalServerErrorException(_inner) => Some(_inner),
BeginTransactionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
BeginTransactionErrorKind::StatementTimeoutException(_inner) => Some(_inner),
BeginTransactionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CommitTransactionError {
pub kind: CommitTransactionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CommitTransactionErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
StatementTimeoutException(crate::error::StatementTimeoutException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CommitTransactionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CommitTransactionErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::StatementTimeoutException(_inner) => _inner.fmt(f),
CommitTransactionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CommitTransactionError {
fn code(&self) -> Option<&str> {
CommitTransactionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CommitTransactionError {
pub fn new(kind: CommitTransactionErrorKind, 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: CommitTransactionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CommitTransactionErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CommitTransactionErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CommitTransactionErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
CommitTransactionErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CommitTransactionErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
CommitTransactionErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_statement_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CommitTransactionErrorKind::StatementTimeoutException(_)
)
}
}
impl std::error::Error for CommitTransactionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CommitTransactionErrorKind::BadRequestException(_inner) => Some(_inner),
CommitTransactionErrorKind::ForbiddenException(_inner) => Some(_inner),
CommitTransactionErrorKind::InternalServerErrorException(_inner) => Some(_inner),
CommitTransactionErrorKind::NotFoundException(_inner) => Some(_inner),
CommitTransactionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
CommitTransactionErrorKind::StatementTimeoutException(_inner) => Some(_inner),
CommitTransactionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExecuteSqlError {
pub kind: ExecuteSqlErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExecuteSqlErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ExecuteSqlError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExecuteSqlErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ExecuteSqlErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ExecuteSqlErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ExecuteSqlErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
ExecuteSqlErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExecuteSqlError {
fn code(&self) -> Option<&str> {
ExecuteSqlError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExecuteSqlError {
pub fn new(kind: ExecuteSqlErrorKind, 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: ExecuteSqlErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExecuteSqlErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ExecuteSqlErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ExecuteSqlErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteSqlErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(&self.kind, ExecuteSqlErrorKind::ServiceUnavailableError(_))
}
}
impl std::error::Error for ExecuteSqlError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecuteSqlErrorKind::BadRequestException(_inner) => Some(_inner),
ExecuteSqlErrorKind::ForbiddenException(_inner) => Some(_inner),
ExecuteSqlErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ExecuteSqlErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
ExecuteSqlErrorKind::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 {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
StatementTimeoutException(crate::error::StatementTimeoutException),
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::BadRequestException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
ExecuteStatementErrorKind::StatementTimeoutException(_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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ExecuteStatementErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_statement_timeout_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteStatementErrorKind::StatementTimeoutException(_)
)
}
}
impl std::error::Error for ExecuteStatementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecuteStatementErrorKind::BadRequestException(_inner) => Some(_inner),
ExecuteStatementErrorKind::ForbiddenException(_inner) => Some(_inner),
ExecuteStatementErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ExecuteStatementErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
ExecuteStatementErrorKind::StatementTimeoutException(_inner) => Some(_inner),
ExecuteStatementErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RollbackTransactionError {
pub kind: RollbackTransactionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RollbackTransactionErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
StatementTimeoutException(crate::error::StatementTimeoutException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for RollbackTransactionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RollbackTransactionErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::StatementTimeoutException(_inner) => _inner.fmt(f),
RollbackTransactionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RollbackTransactionError {
fn code(&self) -> Option<&str> {
RollbackTransactionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RollbackTransactionError {
pub fn new(kind: RollbackTransactionErrorKind, 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: RollbackTransactionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RollbackTransactionErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_statement_timeout_exception(&self) -> bool {
matches!(
&self.kind,
RollbackTransactionErrorKind::StatementTimeoutException(_)
)
}
}
impl std::error::Error for RollbackTransactionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RollbackTransactionErrorKind::BadRequestException(_inner) => Some(_inner),
RollbackTransactionErrorKind::ForbiddenException(_inner) => Some(_inner),
RollbackTransactionErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RollbackTransactionErrorKind::NotFoundException(_inner) => Some(_inner),
RollbackTransactionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
RollbackTransactionErrorKind::StatementTimeoutException(_inner) => Some(_inner),
RollbackTransactionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StatementTimeoutException {
pub message: std::option::Option<std::string::String>,
pub db_connection_id: i64,
}
impl StatementTimeoutException {
pub fn db_connection_id(&self) -> i64 {
self.db_connection_id
}
}
impl std::fmt::Debug for StatementTimeoutException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StatementTimeoutException");
formatter.field("message", &self.message);
formatter.field("db_connection_id", &self.db_connection_id);
formatter.finish()
}
}
impl StatementTimeoutException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for StatementTimeoutException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "StatementTimeoutException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for StatementTimeoutException {}
pub mod statement_timeout_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) db_connection_id: std::option::Option<i64>,
}
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 db_connection_id(mut self, input: i64) -> Self {
self.db_connection_id = Some(input);
self
}
pub fn set_db_connection_id(mut self, input: std::option::Option<i64>) -> Self {
self.db_connection_id = input;
self
}
pub fn build(self) -> crate::error::StatementTimeoutException {
crate::error::StatementTimeoutException {
message: self.message,
db_connection_id: self.db_connection_id.unwrap_or_default(),
}
}
}
}
impl StatementTimeoutException {
pub fn builder() -> crate::error::statement_timeout_exception::Builder {
crate::error::statement_timeout_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceUnavailableError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ServiceUnavailableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceUnavailableError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ServiceUnavailableError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableError")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableError {}
pub mod service_unavailable_error {
#[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::ServiceUnavailableError {
crate::error::ServiceUnavailableError {
message: self.message,
}
}
}
}
impl ServiceUnavailableError {
pub fn builder() -> crate::error::service_unavailable_error::Builder {
crate::error::service_unavailable_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotFoundException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for NotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotFoundException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl NotFoundException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundException")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for NotFoundException {}
pub mod 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>,
}
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::NotFoundException {
crate::error::NotFoundException {
message: self.message,
}
}
}
}
impl NotFoundException {
pub fn builder() -> crate::error::not_found_exception::Builder {
crate::error::not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServerErrorException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServerErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServerErrorException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InternalServerErrorException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerErrorException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for InternalServerErrorException {}
pub mod internal_server_error_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::InternalServerErrorException {
crate::error::InternalServerErrorException {
message: self.message,
}
}
}
}
impl InternalServerErrorException {
pub fn builder() -> crate::error::internal_server_error_exception::Builder {
crate::error::internal_server_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ForbiddenException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ForbiddenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ForbiddenException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ForbiddenException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for ForbiddenException {}
pub mod forbidden_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::ForbiddenException {
crate::error::ForbiddenException {
message: self.message,
}
}
}
}
impl ForbiddenException {
pub fn builder() -> crate::error::forbidden_exception::Builder {
crate::error::forbidden_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BadRequestException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BadRequestException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl BadRequestException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestException")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_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::BadRequestException {
crate::error::BadRequestException {
message: self.message,
}
}
}
}
impl BadRequestException {
pub fn builder() -> crate::error::bad_request_exception::Builder {
crate::error::bad_request_exception::Builder::default()
}
}