#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartSnapshotError {
pub kind: StartSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartSnapshotErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConcurrentLimitExceededException(crate::error::ConcurrentLimitExceededException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartSnapshotErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::ConcurrentLimitExceededException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartSnapshotError {
fn code(&self) -> Option<&str> {
StartSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartSnapshotError {
pub fn new(kind: StartSnapshotErrorKind, 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: StartSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartSnapshotErrorKind::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_access_denied_exception(&self) -> bool {
matches!(&self.kind, StartSnapshotErrorKind::AccessDeniedException(_))
}
pub fn is_concurrent_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartSnapshotErrorKind::ConcurrentLimitExceededException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StartSnapshotErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartSnapshotErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
StartSnapshotErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartSnapshotErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartSnapshotErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StartSnapshotErrorKind::ValidationException(_))
}
}
impl std::error::Error for StartSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartSnapshotErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartSnapshotErrorKind::ConcurrentLimitExceededException(_inner) => Some(_inner),
StartSnapshotErrorKind::ConflictException(_inner) => Some(_inner),
StartSnapshotErrorKind::InternalServerException(_inner) => Some(_inner),
StartSnapshotErrorKind::RequestThrottledException(_inner) => Some(_inner),
StartSnapshotErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartSnapshotErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
StartSnapshotErrorKind::ValidationException(_inner) => Some(_inner),
StartSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
}
impl ServiceQuotaExceededException {
pub fn reason(
&self,
) -> std::option::Option<&crate::model::ServiceQuotaExceededExceptionReason> {
self.reason.as_ref()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ServiceQuotaExceededExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
reason: self.reason,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
}
impl ResourceNotFoundException {
pub fn reason(&self) -> std::option::Option<&crate::model::ResourceNotFoundExceptionReason> {
self.reason.as_ref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ResourceNotFoundExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ResourceNotFoundExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
reason: self.reason,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestThrottledException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::RequestThrottledExceptionReason>,
}
impl RequestThrottledException {
pub fn reason(&self) -> std::option::Option<&crate::model::RequestThrottledExceptionReason> {
self.reason.as_ref()
}
}
impl RequestThrottledException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestThrottledException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestThrottledException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestThrottledException {}
pub mod request_throttled_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::RequestThrottledExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::RequestThrottledExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::RequestThrottledExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::RequestThrottledException {
crate::error::RequestThrottledException {
message: self.message,
reason: self.reason,
}
}
}
}
impl RequestThrottledException {
pub fn builder() -> crate::error::request_throttled_exception::Builder {
crate::error::request_throttled_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConcurrentLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConcurrentLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentLimitExceededException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ConcurrentLimitExceededException {}
pub mod concurrent_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConcurrentLimitExceededException {
crate::error::ConcurrentLimitExceededException {
message: self.message,
}
}
}
}
impl ConcurrentLimitExceededException {
pub fn builder() -> crate::error::concurrent_limit_exceeded_exception::Builder {
crate::error::concurrent_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::AccessDeniedExceptionReason>,
}
impl AccessDeniedException {
pub fn reason(&self) -> std::option::Option<&crate::model::AccessDeniedExceptionReason> {
self.reason.as_ref()
}
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::AccessDeniedExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::AccessDeniedExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::AccessDeniedExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
reason: self.reason,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutSnapshotBlockError {
pub kind: PutSnapshotBlockErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutSnapshotBlockError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutSnapshotBlockErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutSnapshotBlockErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutSnapshotBlockError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutSnapshotBlockErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutSnapshotBlockErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutSnapshotBlockError {
fn code(&self) -> Option<&str> {
PutSnapshotBlockError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutSnapshotBlockError {
pub fn new(kind: PutSnapshotBlockErrorKind, 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: PutSnapshotBlockErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutSnapshotBlockErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutSnapshotBlockErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutSnapshotBlockError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutSnapshotBlockErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::InternalServerException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::RequestThrottledException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::ValidationException(_inner) => Some(_inner),
PutSnapshotBlockErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSnapshotBlocksError {
pub kind: ListSnapshotBlocksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSnapshotBlocksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSnapshotBlocksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSnapshotBlocksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSnapshotBlocksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSnapshotBlocksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSnapshotBlocksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSnapshotBlocksError {
fn code(&self) -> Option<&str> {
ListSnapshotBlocksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSnapshotBlocksError {
pub fn new(kind: ListSnapshotBlocksErrorKind, 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: ListSnapshotBlocksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSnapshotBlocksErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListSnapshotBlocksErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListSnapshotBlocksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSnapshotBlocksErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::InternalServerException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::RequestThrottledException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::ValidationException(_inner) => Some(_inner),
ListSnapshotBlocksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChangedBlocksError {
pub kind: ListChangedBlocksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChangedBlocksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChangedBlocksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChangedBlocksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChangedBlocksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChangedBlocksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListChangedBlocksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChangedBlocksError {
fn code(&self) -> Option<&str> {
ListChangedBlocksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChangedBlocksError {
pub fn new(kind: ListChangedBlocksErrorKind, 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: ListChangedBlocksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChangedBlocksErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListChangedBlocksErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListChangedBlocksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChangedBlocksErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::InternalServerException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::RequestThrottledException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::ValidationException(_inner) => Some(_inner),
ListChangedBlocksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSnapshotBlockError {
pub kind: GetSnapshotBlockErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSnapshotBlockError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSnapshotBlockErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSnapshotBlockErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSnapshotBlockError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSnapshotBlockErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSnapshotBlockErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSnapshotBlockError {
fn code(&self) -> Option<&str> {
GetSnapshotBlockError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSnapshotBlockError {
pub fn new(kind: GetSnapshotBlockErrorKind, 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: GetSnapshotBlockErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSnapshotBlockErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotBlockErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetSnapshotBlockError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSnapshotBlockErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::InternalServerException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::RequestThrottledException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::ValidationException(_inner) => Some(_inner),
GetSnapshotBlockErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CompleteSnapshotError {
pub kind: CompleteSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CompleteSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CompleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CompleteSnapshotErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
RequestThrottledException(crate::error::RequestThrottledException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CompleteSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CompleteSnapshotErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::RequestThrottledException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::ValidationException(_inner) => _inner.fmt(f),
CompleteSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CompleteSnapshotError {
fn code(&self) -> Option<&str> {
CompleteSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CompleteSnapshotError {
pub fn new(kind: CompleteSnapshotErrorKind, 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: CompleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CompleteSnapshotErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::InternalServerException(_)
)
}
pub fn is_request_throttled_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::RequestThrottledException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CompleteSnapshotErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CompleteSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CompleteSnapshotErrorKind::AccessDeniedException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::InternalServerException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::RequestThrottledException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::ValidationException(_inner) => Some(_inner),
CompleteSnapshotErrorKind::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 _)
}
}