#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBackendStorageError {
pub kind: UpdateBackendStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBackendStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBackendStorageErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBackendStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBackendStorageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateBackendStorageErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
UpdateBackendStorageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBackendStorageErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateBackendStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBackendStorageError {
fn code(&self) -> Option<&str> {
UpdateBackendStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBackendStorageError {
pub fn new(kind: UpdateBackendStorageErrorKind, 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: UpdateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendStorageErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendStorageErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendStorageErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendStorageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateBackendStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBackendStorageErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateBackendStorageErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
UpdateBackendStorageErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBackendStorageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateBackendStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyRequestsException {
#[doc(hidden)]
pub limit_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyRequestsException {
pub fn limit_type(&self) -> std::option::Option<&str> {
self.limit_type.as_deref()
}
}
impl TooManyRequestsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyRequestsException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyRequestsException {}
pub mod too_many_requests_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) limit_type: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn limit_type(mut self, input: impl Into<std::string::String>) -> Self {
self.limit_type = Some(input.into());
self
}
pub fn set_limit_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.limit_type = input;
self
}
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::TooManyRequestsException {
crate::error::TooManyRequestsException {
limit_type: self.limit_type,
message: self.message,
}
}
}
}
impl TooManyRequestsException {
pub fn builder() -> crate::error::too_many_requests_exception::Builder {
crate::error::too_many_requests_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl NotFoundException {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl NotFoundException {
pub fn message(&self) -> std::option::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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for NotFoundException {}
pub mod not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_type: 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_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::NotFoundException {
crate::error::NotFoundException {
message: self.message,
resource_type: self.resource_type,
}
}
}
}
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, std::fmt::Debug)]
pub struct GatewayTimeoutException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl GatewayTimeoutException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GatewayTimeoutException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GatewayTimeoutException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for GatewayTimeoutException {}
pub mod gateway_timeout_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
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::GatewayTimeoutException {
crate::error::GatewayTimeoutException {
message: self.message,
}
}
}
}
impl GatewayTimeoutException {
pub fn builder() -> crate::error::gateway_timeout_exception::Builder {
crate::error::gateway_timeout_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequestException {
pub fn message(&self) -> std::option::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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBackendJobError {
pub kind: UpdateBackendJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBackendJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBackendJobErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBackendJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBackendJobErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateBackendJobErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
UpdateBackendJobErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBackendJobErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateBackendJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBackendJobError {
fn code(&self) -> Option<&str> {
UpdateBackendJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBackendJobError {
pub fn new(kind: UpdateBackendJobErrorKind, 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: UpdateBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendJobErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendJobErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateBackendJobErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendJobErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateBackendJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBackendJobErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateBackendJobErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
UpdateBackendJobErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBackendJobErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateBackendJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBackendConfigError {
pub kind: UpdateBackendConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBackendConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBackendConfigErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBackendConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBackendConfigErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateBackendConfigErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
UpdateBackendConfigErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBackendConfigErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateBackendConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBackendConfigError {
fn code(&self) -> Option<&str> {
UpdateBackendConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBackendConfigError {
pub fn new(kind: UpdateBackendConfigErrorKind, 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: UpdateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendConfigErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendConfigErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendConfigErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendConfigErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateBackendConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBackendConfigErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateBackendConfigErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
UpdateBackendConfigErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBackendConfigErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateBackendConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBackendAuthError {
pub kind: UpdateBackendAuthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBackendAuthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBackendAuthErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBackendAuthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBackendAuthErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateBackendAuthErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
UpdateBackendAuthErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBackendAuthErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateBackendAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBackendAuthError {
fn code(&self) -> Option<&str> {
UpdateBackendAuthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBackendAuthError {
pub fn new(kind: UpdateBackendAuthErrorKind, 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: UpdateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAuthErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAuthErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateBackendAuthErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAuthErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateBackendAuthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBackendAuthErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateBackendAuthErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
UpdateBackendAuthErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBackendAuthErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateBackendAuthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBackendAPIError {
pub kind: UpdateBackendAPIErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBackendAPIError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBackendAPIErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBackendAPIError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBackendAPIErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateBackendAPIErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
UpdateBackendAPIErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBackendAPIErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateBackendAPIErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBackendAPIError {
fn code(&self) -> Option<&str> {
UpdateBackendAPIError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBackendAPIError {
pub fn new(kind: UpdateBackendAPIErrorKind, 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: UpdateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAPIErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAPIErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateBackendAPIErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBackendAPIErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateBackendAPIError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBackendAPIErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateBackendAPIErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
UpdateBackendAPIErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBackendAPIErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateBackendAPIErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveBackendConfigError {
pub kind: RemoveBackendConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveBackendConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveBackendConfigErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveBackendConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveBackendConfigErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveBackendConfigErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
RemoveBackendConfigErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveBackendConfigErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveBackendConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveBackendConfigError {
fn code(&self) -> Option<&str> {
RemoveBackendConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveBackendConfigError {
pub fn new(kind: RemoveBackendConfigErrorKind, 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: RemoveBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveBackendConfigErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
RemoveBackendConfigErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveBackendConfigErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveBackendConfigErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveBackendConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveBackendConfigErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveBackendConfigErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
RemoveBackendConfigErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveBackendConfigErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveBackendConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveAllBackendsError {
pub kind: RemoveAllBackendsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveAllBackendsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveAllBackendsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveAllBackendsErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveAllBackendsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveAllBackendsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveAllBackendsErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
RemoveAllBackendsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveAllBackendsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveAllBackendsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveAllBackendsError {
fn code(&self) -> Option<&str> {
RemoveAllBackendsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveAllBackendsError {
pub fn new(kind: RemoveAllBackendsErrorKind, 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: RemoveAllBackendsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveAllBackendsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveAllBackendsErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
RemoveAllBackendsErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, RemoveAllBackendsErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveAllBackendsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveAllBackendsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveAllBackendsErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveAllBackendsErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
RemoveAllBackendsErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveAllBackendsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveAllBackendsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListS3BucketsError {
pub kind: ListS3BucketsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListS3BucketsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListS3BucketsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListS3BucketsErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListS3BucketsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListS3BucketsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListS3BucketsErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
ListS3BucketsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ListS3BucketsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListS3BucketsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListS3BucketsError {
fn code(&self) -> Option<&str> {
ListS3BucketsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListS3BucketsError {
pub fn new(kind: ListS3BucketsErrorKind, 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: ListS3BucketsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListS3BucketsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListS3BucketsErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
ListS3BucketsErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, ListS3BucketsErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListS3BucketsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListS3BucketsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListS3BucketsErrorKind::BadRequestException(_inner) => Some(_inner),
ListS3BucketsErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
ListS3BucketsErrorKind::NotFoundException(_inner) => Some(_inner),
ListS3BucketsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListS3BucketsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListBackendJobsError {
pub kind: ListBackendJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListBackendJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListBackendJobsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListBackendJobsErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListBackendJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListBackendJobsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListBackendJobsErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
ListBackendJobsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ListBackendJobsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListBackendJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListBackendJobsError {
fn code(&self) -> Option<&str> {
ListBackendJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListBackendJobsError {
pub fn new(kind: ListBackendJobsErrorKind, 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: ListBackendJobsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListBackendJobsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListBackendJobsErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
ListBackendJobsErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, ListBackendJobsErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListBackendJobsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListBackendJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListBackendJobsErrorKind::BadRequestException(_inner) => Some(_inner),
ListBackendJobsErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
ListBackendJobsErrorKind::NotFoundException(_inner) => Some(_inner),
ListBackendJobsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListBackendJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportBackendStorageError {
pub kind: ImportBackendStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportBackendStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportBackendStorageErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportBackendStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportBackendStorageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ImportBackendStorageErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
ImportBackendStorageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ImportBackendStorageErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ImportBackendStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportBackendStorageError {
fn code(&self) -> Option<&str> {
ImportBackendStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportBackendStorageError {
pub fn new(kind: ImportBackendStorageErrorKind, 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: ImportBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendStorageErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendStorageErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendStorageErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendStorageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ImportBackendStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportBackendStorageErrorKind::BadRequestException(_inner) => Some(_inner),
ImportBackendStorageErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
ImportBackendStorageErrorKind::NotFoundException(_inner) => Some(_inner),
ImportBackendStorageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ImportBackendStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportBackendAuthError {
pub kind: ImportBackendAuthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportBackendAuthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportBackendAuthErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportBackendAuthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportBackendAuthErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ImportBackendAuthErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
ImportBackendAuthErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ImportBackendAuthErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ImportBackendAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportBackendAuthError {
fn code(&self) -> Option<&str> {
ImportBackendAuthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportBackendAuthError {
pub fn new(kind: ImportBackendAuthErrorKind, 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: ImportBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendAuthErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendAuthErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, ImportBackendAuthErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ImportBackendAuthErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ImportBackendAuthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportBackendAuthErrorKind::BadRequestException(_inner) => Some(_inner),
ImportBackendAuthErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
ImportBackendAuthErrorKind::NotFoundException(_inner) => Some(_inner),
ImportBackendAuthErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ImportBackendAuthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTokenError {
pub kind: GetTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTokenErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTokenErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetTokenErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetTokenErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetTokenErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTokenError {
fn code(&self) -> Option<&str> {
GetTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTokenError {
pub fn new(kind: GetTokenErrorKind, 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: GetTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, GetTokenErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(&self.kind, GetTokenErrorKind::GatewayTimeoutException(_))
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetTokenErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, GetTokenErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for GetTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTokenErrorKind::BadRequestException(_inner) => Some(_inner),
GetTokenErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetTokenErrorKind::NotFoundException(_inner) => Some(_inner),
GetTokenErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendStorageError {
pub kind: GetBackendStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendStorageErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendStorageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendStorageErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendStorageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendStorageErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendStorageError {
fn code(&self) -> Option<&str> {
GetBackendStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendStorageError {
pub fn new(kind: GetBackendStorageErrorKind, 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: GetBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendStorageErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendStorageErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetBackendStorageErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendStorageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetBackendStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendStorageErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendStorageErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendStorageErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendStorageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendJobError {
pub kind: GetBackendJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendJobErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendJobErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendJobErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendJobErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendJobErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendJobError {
fn code(&self) -> Option<&str> {
GetBackendJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendJobError {
pub fn new(kind: GetBackendJobErrorKind, 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: GetBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendJobErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, GetBackendJobErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendJobErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetBackendJobErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendJobErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetBackendJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendJobErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendJobErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendJobErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendJobErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendAuthError {
pub kind: GetBackendAuthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendAuthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendAuthErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendAuthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendAuthErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendAuthErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendAuthErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendAuthErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendAuthError {
fn code(&self) -> Option<&str> {
GetBackendAuthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendAuthError {
pub fn new(kind: GetBackendAuthErrorKind, 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: GetBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, GetBackendAuthErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAuthErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetBackendAuthErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAuthErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetBackendAuthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendAuthErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendAuthErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendAuthErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendAuthErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendAuthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendAPIModelsError {
pub kind: GetBackendAPIModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendAPIModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendAPIModelsErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendAPIModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendAPIModelsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendAPIModelsErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendAPIModelsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendAPIModelsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendAPIModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendAPIModelsError {
fn code(&self) -> Option<&str> {
GetBackendAPIModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendAPIModelsError {
pub fn new(kind: GetBackendAPIModelsErrorKind, 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: GetBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIModelsErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIModelsErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIModelsErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIModelsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetBackendAPIModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendAPIModelsErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendAPIModelsErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendAPIModelsErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendAPIModelsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendAPIModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendAPIError {
pub kind: GetBackendAPIErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendAPIError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendAPIErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendAPIError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendAPIErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendAPIErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendAPIErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendAPIErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendAPIErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendAPIError {
fn code(&self) -> Option<&str> {
GetBackendAPIError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendAPIError {
pub fn new(kind: GetBackendAPIErrorKind, 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: GetBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, GetBackendAPIErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetBackendAPIErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetBackendAPIErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetBackendAPIError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendAPIErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendAPIErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendAPIErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendAPIErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendAPIErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBackendError {
pub kind: GetBackendErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBackendError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetBackendErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBackendErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBackendError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetBackendErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetBackendErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GetBackendErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetBackendErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetBackendErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBackendError {
fn code(&self) -> Option<&str> {
GetBackendError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetBackendError {
pub fn new(kind: GetBackendErrorKind, 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: GetBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, GetBackendErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(&self.kind, GetBackendErrorKind::GatewayTimeoutException(_))
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetBackendErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, GetBackendErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for GetBackendError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetBackendErrorKind::BadRequestException(_inner) => Some(_inner),
GetBackendErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GetBackendErrorKind::NotFoundException(_inner) => Some(_inner),
GetBackendErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetBackendErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GenerateBackendAPIModelsError {
pub kind: GenerateBackendAPIModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GenerateBackendAPIModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GenerateBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GenerateBackendAPIModelsErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GenerateBackendAPIModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GenerateBackendAPIModelsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GenerateBackendAPIModelsErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
GenerateBackendAPIModelsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GenerateBackendAPIModelsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GenerateBackendAPIModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GenerateBackendAPIModelsError {
fn code(&self) -> Option<&str> {
GenerateBackendAPIModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GenerateBackendAPIModelsError {
pub fn new(kind: GenerateBackendAPIModelsErrorKind, 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: GenerateBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GenerateBackendAPIModelsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GenerateBackendAPIModelsErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
GenerateBackendAPIModelsErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GenerateBackendAPIModelsErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GenerateBackendAPIModelsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GenerateBackendAPIModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GenerateBackendAPIModelsErrorKind::BadRequestException(_inner) => Some(_inner),
GenerateBackendAPIModelsErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
GenerateBackendAPIModelsErrorKind::NotFoundException(_inner) => Some(_inner),
GenerateBackendAPIModelsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GenerateBackendAPIModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTokenError {
pub kind: DeleteTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTokenErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTokenErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteTokenErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
DeleteTokenErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteTokenErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTokenError {
fn code(&self) -> Option<&str> {
DeleteTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTokenError {
pub fn new(kind: DeleteTokenErrorKind, 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: DeleteTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, DeleteTokenErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(&self.kind, DeleteTokenErrorKind::GatewayTimeoutException(_))
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteTokenErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTokenErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTokenErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteTokenErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
DeleteTokenErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteTokenErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBackendStorageError {
pub kind: DeleteBackendStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBackendStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBackendStorageErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBackendStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBackendStorageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteBackendStorageErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
DeleteBackendStorageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBackendStorageErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteBackendStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBackendStorageError {
fn code(&self) -> Option<&str> {
DeleteBackendStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBackendStorageError {
pub fn new(kind: DeleteBackendStorageErrorKind, 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: DeleteBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendStorageErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendStorageErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendStorageErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendStorageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteBackendStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBackendStorageErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteBackendStorageErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
DeleteBackendStorageErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBackendStorageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteBackendStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBackendAuthError {
pub kind: DeleteBackendAuthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBackendAuthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBackendAuthErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBackendAuthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBackendAuthErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteBackendAuthErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
DeleteBackendAuthErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBackendAuthErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteBackendAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBackendAuthError {
fn code(&self) -> Option<&str> {
DeleteBackendAuthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBackendAuthError {
pub fn new(kind: DeleteBackendAuthErrorKind, 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: DeleteBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAuthErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAuthErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteBackendAuthErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAuthErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteBackendAuthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBackendAuthErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteBackendAuthErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
DeleteBackendAuthErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBackendAuthErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteBackendAuthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBackendAPIError {
pub kind: DeleteBackendAPIErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBackendAPIError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBackendAPIErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBackendAPIError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBackendAPIErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteBackendAPIErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
DeleteBackendAPIErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBackendAPIErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteBackendAPIErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBackendAPIError {
fn code(&self) -> Option<&str> {
DeleteBackendAPIError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBackendAPIError {
pub fn new(kind: DeleteBackendAPIErrorKind, 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: DeleteBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAPIErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAPIErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteBackendAPIErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendAPIErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteBackendAPIError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBackendAPIErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteBackendAPIErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
DeleteBackendAPIErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBackendAPIErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteBackendAPIErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBackendError {
pub kind: DeleteBackendErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBackendError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBackendErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBackendErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBackendError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBackendErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteBackendErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
DeleteBackendErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBackendErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteBackendErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBackendError {
fn code(&self) -> Option<&str> {
DeleteBackendError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBackendError {
pub fn new(kind: DeleteBackendErrorKind, 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: DeleteBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, DeleteBackendErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteBackendErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBackendErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteBackendError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBackendErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteBackendErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
DeleteBackendErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBackendErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteBackendErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTokenError {
pub kind: CreateTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTokenErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTokenErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateTokenErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateTokenErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateTokenErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTokenError {
fn code(&self) -> Option<&str> {
CreateTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTokenError {
pub fn new(kind: CreateTokenErrorKind, 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: CreateTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, CreateTokenErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(&self.kind, CreateTokenErrorKind::GatewayTimeoutException(_))
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CreateTokenErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateTokenErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTokenErrorKind::BadRequestException(_inner) => Some(_inner),
CreateTokenErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateTokenErrorKind::NotFoundException(_inner) => Some(_inner),
CreateTokenErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackendStorageError {
pub kind: CreateBackendStorageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackendStorageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackendStorageErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackendStorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackendStorageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateBackendStorageErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateBackendStorageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBackendStorageErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateBackendStorageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackendStorageError {
fn code(&self) -> Option<&str> {
CreateBackendStorageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackendStorageError {
pub fn new(kind: CreateBackendStorageErrorKind, 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: CreateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackendStorageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendStorageErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendStorageErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendStorageErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendStorageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateBackendStorageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackendStorageErrorKind::BadRequestException(_inner) => Some(_inner),
CreateBackendStorageErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateBackendStorageErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBackendStorageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateBackendStorageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackendConfigError {
pub kind: CreateBackendConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackendConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackendConfigErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackendConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackendConfigErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateBackendConfigErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateBackendConfigErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBackendConfigErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateBackendConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackendConfigError {
fn code(&self) -> Option<&str> {
CreateBackendConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackendConfigError {
pub fn new(kind: CreateBackendConfigErrorKind, 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: CreateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackendConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendConfigErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendConfigErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendConfigErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendConfigErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateBackendConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackendConfigErrorKind::BadRequestException(_inner) => Some(_inner),
CreateBackendConfigErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateBackendConfigErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBackendConfigErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateBackendConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackendAuthError {
pub kind: CreateBackendAuthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackendAuthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackendAuthErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackendAuthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackendAuthErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateBackendAuthErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateBackendAuthErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBackendAuthErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateBackendAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackendAuthError {
fn code(&self) -> Option<&str> {
CreateBackendAuthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackendAuthError {
pub fn new(kind: CreateBackendAuthErrorKind, 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: CreateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackendAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAuthErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAuthErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CreateBackendAuthErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAuthErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateBackendAuthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackendAuthErrorKind::BadRequestException(_inner) => Some(_inner),
CreateBackendAuthErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateBackendAuthErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBackendAuthErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateBackendAuthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackendAPIError {
pub kind: CreateBackendAPIErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackendAPIError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackendAPIErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackendAPIError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackendAPIErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateBackendAPIErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateBackendAPIErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBackendAPIErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateBackendAPIErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackendAPIError {
fn code(&self) -> Option<&str> {
CreateBackendAPIError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackendAPIError {
pub fn new(kind: CreateBackendAPIErrorKind, 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: CreateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackendAPIErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAPIErrorKind::BadRequestException(_)
)
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAPIErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CreateBackendAPIErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendAPIErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateBackendAPIError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackendAPIErrorKind::BadRequestException(_inner) => Some(_inner),
CreateBackendAPIErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateBackendAPIErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBackendAPIErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateBackendAPIErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackendError {
pub kind: CreateBackendErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackendError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackendErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackendErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackendError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackendErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateBackendErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CreateBackendErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBackendErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateBackendErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackendError {
fn code(&self) -> Option<&str> {
CreateBackendError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackendError {
pub fn new(kind: CreateBackendErrorKind, 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: CreateBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, CreateBackendErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CreateBackendErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateBackendErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateBackendError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackendErrorKind::BadRequestException(_inner) => Some(_inner),
CreateBackendErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CreateBackendErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBackendErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateBackendErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CloneBackendError {
pub kind: CloneBackendErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CloneBackendError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CloneBackendErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CloneBackendErrorKind {
BadRequestException(crate::error::BadRequestException),
GatewayTimeoutException(crate::error::GatewayTimeoutException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CloneBackendError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CloneBackendErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CloneBackendErrorKind::GatewayTimeoutException(_inner) => _inner.fmt(f),
CloneBackendErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CloneBackendErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CloneBackendErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CloneBackendError {
fn code(&self) -> Option<&str> {
CloneBackendError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CloneBackendError {
pub fn new(kind: CloneBackendErrorKind, 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: CloneBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CloneBackendErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, CloneBackendErrorKind::BadRequestException(_))
}
pub fn is_gateway_timeout_exception(&self) -> bool {
matches!(
&self.kind,
CloneBackendErrorKind::GatewayTimeoutException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CloneBackendErrorKind::NotFoundException(_))
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CloneBackendErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CloneBackendError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CloneBackendErrorKind::BadRequestException(_inner) => Some(_inner),
CloneBackendErrorKind::GatewayTimeoutException(_inner) => Some(_inner),
CloneBackendErrorKind::NotFoundException(_inner) => Some(_inner),
CloneBackendErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CloneBackendErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}