#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteError {
pub kind: DeleteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteErrorKind::InternalError(_inner) => _inner.fmt(f),
DeleteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
DeleteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
DeleteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
DeleteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
DeleteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
DeleteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteError {
fn code(&self) -> Option<&str> {
DeleteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
DeleteErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl DeleteError {
pub fn new(kind: DeleteErrorKind, 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: DeleteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteErrorKind::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_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, DeleteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for DeleteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteErrorKind::InternalError(_inner) => Some(_inner),
DeleteErrorKind::RateLimitError(_inner) => Some(_inner),
DeleteErrorKind::ForbiddenError(_inner) => Some(_inner),
DeleteErrorKind::UnauthorizedError(_inner) => Some(_inner),
DeleteErrorKind::NotFoundError(_inner) => Some(_inner),
DeleteErrorKind::BadRequestError(_inner) => Some(_inner),
DeleteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBatchError {
pub kind: DeleteBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBatchErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBatchErrorKind::InternalError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::RateLimitError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::NotFoundError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::BadRequestError(_inner) => _inner.fmt(f),
DeleteBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBatchError {
fn code(&self) -> Option<&str> {
DeleteBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteBatchErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
DeleteBatchErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl DeleteBatchError {
pub fn new(kind: DeleteBatchErrorKind, 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: DeleteBatchErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBatchErrorKind::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_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, DeleteBatchErrorKind::BadRequestError(_))
}
}
impl std::error::Error for DeleteBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBatchErrorKind::InternalError(_inner) => Some(_inner),
DeleteBatchErrorKind::RateLimitError(_inner) => Some(_inner),
DeleteBatchErrorKind::ForbiddenError(_inner) => Some(_inner),
DeleteBatchErrorKind::UnauthorizedError(_inner) => Some(_inner),
DeleteBatchErrorKind::NotFoundError(_inner) => Some(_inner),
DeleteBatchErrorKind::BadRequestError(_inner) => Some(_inner),
DeleteBatchErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetError {
pub kind: GetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetErrorKind::InternalError(_inner) => _inner.fmt(f),
GetErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetError {
fn code(&self) -> Option<&str> {
GetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetError {
pub fn new(kind: GetErrorKind, 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: GetErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetErrorKind::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_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetErrorKind::InternalError(_inner) => Some(_inner),
GetErrorKind::RateLimitError(_inner) => Some(_inner),
GetErrorKind::ForbiddenError(_inner) => Some(_inner),
GetErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetErrorKind::NotFoundError(_inner) => Some(_inner),
GetErrorKind::BadRequestError(_inner) => Some(_inner),
GetErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBatchError {
pub kind: GetBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBatchErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBatchErrorKind::InternalError(_inner) => _inner.fmt(f),
GetBatchErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetBatchErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetBatchErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetBatchErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetBatchErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBatchError {
fn code(&self) -> Option<&str> {
GetBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetBatchErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetBatchErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetBatchError {
pub fn new(kind: GetBatchErrorKind, 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: GetBatchErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBatchErrorKind::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_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetBatchErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBatchErrorKind::InternalError(_inner) => Some(_inner),
GetBatchErrorKind::RateLimitError(_inner) => Some(_inner),
GetBatchErrorKind::ForbiddenError(_inner) => Some(_inner),
GetBatchErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetBatchErrorKind::NotFoundError(_inner) => Some(_inner),
GetBatchErrorKind::BadRequestError(_inner) => Some(_inner),
GetBatchErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutError {
pub kind: PutErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutErrorKind::InternalError(_inner) => _inner.fmt(f),
PutErrorKind::RateLimitError(_inner) => _inner.fmt(f),
PutErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
PutErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
PutErrorKind::NotFoundError(_inner) => _inner.fmt(f),
PutErrorKind::BadRequestError(_inner) => _inner.fmt(f),
PutErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutError {
fn code(&self) -> Option<&str> {
PutError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
PutErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl PutError {
pub fn new(kind: PutErrorKind, 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: PutErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutErrorKind::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_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, PutErrorKind::BadRequestError(_))
}
}
impl std::error::Error for PutError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutErrorKind::InternalError(_inner) => Some(_inner),
PutErrorKind::RateLimitError(_inner) => Some(_inner),
PutErrorKind::ForbiddenError(_inner) => Some(_inner),
PutErrorKind::UnauthorizedError(_inner) => Some(_inner),
PutErrorKind::NotFoundError(_inner) => Some(_inner),
PutErrorKind::BadRequestError(_inner) => Some(_inner),
PutErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutBatchError {
pub kind: PutBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutBatchErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutBatchErrorKind::InternalError(_inner) => _inner.fmt(f),
PutBatchErrorKind::RateLimitError(_inner) => _inner.fmt(f),
PutBatchErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
PutBatchErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
PutBatchErrorKind::NotFoundError(_inner) => _inner.fmt(f),
PutBatchErrorKind::BadRequestError(_inner) => _inner.fmt(f),
PutBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutBatchError {
fn code(&self) -> Option<&str> {
PutBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutBatchErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
PutBatchErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl PutBatchError {
pub fn new(kind: PutBatchErrorKind, 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: PutBatchErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutBatchErrorKind::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_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, PutBatchErrorKind::BadRequestError(_))
}
}
impl std::error::Error for PutBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutBatchErrorKind::InternalError(_inner) => Some(_inner),
PutBatchErrorKind::RateLimitError(_inner) => Some(_inner),
PutBatchErrorKind::ForbiddenError(_inner) => Some(_inner),
PutBatchErrorKind::UnauthorizedError(_inner) => Some(_inner),
PutBatchErrorKind::NotFoundError(_inner) => Some(_inner),
PutBatchErrorKind::BadRequestError(_inner) => Some(_inner),
PutBatchErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BadRequestError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl BadRequestError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for BadRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BadRequestError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl BadRequestError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestError")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for BadRequestError {}
pub mod bad_request_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::BadRequestError {
crate::error::BadRequestError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl BadRequestError {
pub fn builder() -> crate::error::bad_request_error::Builder {
crate::error::bad_request_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotFoundError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl NotFoundError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for NotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotFoundError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl NotFoundError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundError")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for NotFoundError {}
pub mod not_found_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::NotFoundError {
crate::error::NotFoundError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl NotFoundError {
pub fn builder() -> crate::error::not_found_error::Builder {
crate::error::not_found_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UnauthorizedError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl UnauthorizedError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for UnauthorizedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UnauthorizedError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl UnauthorizedError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedError")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for UnauthorizedError {}
pub mod unauthorized_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedError {
crate::error::UnauthorizedError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl UnauthorizedError {
pub fn builder() -> crate::error::unauthorized_error::Builder {
crate::error::unauthorized_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ForbiddenError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl ForbiddenError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for ForbiddenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ForbiddenError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl ForbiddenError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenError")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for ForbiddenError {}
pub mod forbidden_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::ForbiddenError {
crate::error::ForbiddenError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl ForbiddenError {
pub fn builder() -> crate::error::forbidden_error::Builder {
crate::error::forbidden_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RateLimitError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl RateLimitError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for RateLimitError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RateLimitError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl RateLimitError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RateLimitError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RateLimitError")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for RateLimitError {}
pub mod rate_limit_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::RateLimitError {
crate::error::RateLimitError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl RateLimitError {
pub fn builder() -> crate::error::rate_limit_error::Builder {
crate::error::rate_limit_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl InternalError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for InternalError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl InternalError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalError")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for InternalError {}
pub mod internal_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.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 metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::InternalError {
crate::error::InternalError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl InternalError {
pub fn builder() -> crate::error::internal_error::Builder {
crate::error::internal_error::Builder::default()
}
}