#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateVolumeError {
pub kind: UpdateVolumeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateVolumeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateVolumeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateVolumeErrorKind {
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
MissingVolumeConfiguration(crate::error::MissingVolumeConfiguration),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateVolumeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateVolumeErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateVolumeErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
UpdateVolumeErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateVolumeErrorKind::MissingVolumeConfiguration(_inner) => _inner.fmt(f),
UpdateVolumeErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
UpdateVolumeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateVolumeError {
fn code(&self) -> Option<&str> {
UpdateVolumeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateVolumeError {
pub fn new(kind: UpdateVolumeErrorKind, 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: UpdateVolumeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateVolumeErrorKind::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(&self) -> bool {
matches!(&self.kind, UpdateVolumeErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
UpdateVolumeErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, UpdateVolumeErrorKind::InternalServerError(_))
}
pub fn is_missing_volume_configuration(&self) -> bool {
matches!(
&self.kind,
UpdateVolumeErrorKind::MissingVolumeConfiguration(_)
)
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, UpdateVolumeErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for UpdateVolumeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateVolumeErrorKind::BadRequest(_inner) => Some(_inner),
UpdateVolumeErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
UpdateVolumeErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateVolumeErrorKind::MissingVolumeConfiguration(_inner) => Some(_inner),
UpdateVolumeErrorKind::VolumeNotFound(_inner) => Some(_inner),
UpdateVolumeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VolumeNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl VolumeNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for VolumeNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "VolumeNotFound")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for VolumeNotFound {}
pub mod volume_not_found {
#[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::VolumeNotFound {
crate::error::VolumeNotFound {
message: self.message,
}
}
}
}
impl VolumeNotFound {
pub fn builder() -> crate::error::volume_not_found::Builder {
crate::error::volume_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MissingVolumeConfiguration {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MissingVolumeConfiguration {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MissingVolumeConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MissingVolumeConfiguration")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for MissingVolumeConfiguration {}
pub mod missing_volume_configuration {
#[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::MissingVolumeConfiguration {
crate::error::MissingVolumeConfiguration {
message: self.message,
}
}
}
}
impl MissingVolumeConfiguration {
pub fn builder() -> crate::error::missing_volume_configuration::Builder {
crate::error::missing_volume_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerError")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerError {}
pub mod internal_server_error {
#[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::InternalServerError {
crate::error::InternalServerError {
message: self.message,
}
}
}
}
impl InternalServerError {
pub fn builder() -> crate::error::internal_server_error::Builder {
crate::error::internal_server_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IncompatibleParameterError {
#[doc(hidden)]
pub parameter: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IncompatibleParameterError {
pub fn parameter(&self) -> std::option::Option<&str> {
self.parameter.as_deref()
}
}
impl IncompatibleParameterError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IncompatibleParameterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IncompatibleParameterError")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for IncompatibleParameterError {}
pub mod incompatible_parameter_error {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) parameter: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn parameter(mut self, input: impl Into<std::string::String>) -> Self {
self.parameter = Some(input.into());
self
}
pub fn set_parameter(mut self, input: std::option::Option<std::string::String>) -> Self {
self.parameter = 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::IncompatibleParameterError {
crate::error::IncompatibleParameterError {
parameter: self.parameter,
message: self.message,
}
}
}
}
impl IncompatibleParameterError {
pub fn builder() -> crate::error::incompatible_parameter_error::Builder {
crate::error::incompatible_parameter_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequest {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequest {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequest")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequest {}
pub mod bad_request {
#[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::BadRequest {
crate::error::BadRequest {
message: self.message,
}
}
}
}
impl BadRequest {
pub fn builder() -> crate::error::bad_request::Builder {
crate::error::bad_request::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateStorageVirtualMachineError {
pub kind: UpdateStorageVirtualMachineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateStorageVirtualMachineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateStorageVirtualMachineErrorKind {
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
StorageVirtualMachineNotFound(crate::error::StorageVirtualMachineNotFound),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateStorageVirtualMachineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateStorageVirtualMachineErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
UpdateStorageVirtualMachineErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_inner) => {
_inner.fmt(f)
}
UpdateStorageVirtualMachineErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
UpdateStorageVirtualMachineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateStorageVirtualMachineError {
fn code(&self) -> Option<&str> {
UpdateStorageVirtualMachineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateStorageVirtualMachineError {
pub fn new(kind: UpdateStorageVirtualMachineErrorKind, 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: UpdateStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateStorageVirtualMachineErrorKind::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(&self) -> bool {
matches!(
&self.kind,
UpdateStorageVirtualMachineErrorKind::BadRequest(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
UpdateStorageVirtualMachineErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateStorageVirtualMachineErrorKind::InternalServerError(_)
)
}
pub fn is_storage_virtual_machine_not_found(&self) -> bool {
matches!(
&self.kind,
UpdateStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
UpdateStorageVirtualMachineErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for UpdateStorageVirtualMachineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateStorageVirtualMachineErrorKind::BadRequest(_inner) => Some(_inner),
UpdateStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
UpdateStorageVirtualMachineErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_inner) => {
Some(_inner)
}
UpdateStorageVirtualMachineErrorKind::UnsupportedOperation(_inner) => Some(_inner),
UpdateStorageVirtualMachineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedOperation {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedOperation {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedOperation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedOperation")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedOperation {}
pub mod unsupported_operation {
#[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::UnsupportedOperation {
crate::error::UnsupportedOperation {
message: self.message,
}
}
}
}
impl UnsupportedOperation {
pub fn builder() -> crate::error::unsupported_operation::Builder {
crate::error::unsupported_operation::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StorageVirtualMachineNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl StorageVirtualMachineNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for StorageVirtualMachineNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "StorageVirtualMachineNotFound")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for StorageVirtualMachineNotFound {}
pub mod storage_virtual_machine_not_found {
#[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::StorageVirtualMachineNotFound {
crate::error::StorageVirtualMachineNotFound {
message: self.message,
}
}
}
}
impl StorageVirtualMachineNotFound {
pub fn builder() -> crate::error::storage_virtual_machine_not_found::Builder {
crate::error::storage_virtual_machine_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSnapshotError {
pub kind: UpdateSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSnapshotErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
SnapshotNotFound(crate::error::SnapshotNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSnapshotErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateSnapshotErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateSnapshotErrorKind::SnapshotNotFound(_inner) => _inner.fmt(f),
UpdateSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSnapshotError {
fn code(&self) -> Option<&str> {
UpdateSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSnapshotError {
pub fn new(kind: UpdateSnapshotErrorKind, 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: UpdateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSnapshotErrorKind::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(&self) -> bool {
matches!(&self.kind, UpdateSnapshotErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, UpdateSnapshotErrorKind::InternalServerError(_))
}
pub fn is_snapshot_not_found(&self) -> bool {
matches!(&self.kind, UpdateSnapshotErrorKind::SnapshotNotFound(_))
}
}
impl std::error::Error for UpdateSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSnapshotErrorKind::BadRequest(_inner) => Some(_inner),
UpdateSnapshotErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateSnapshotErrorKind::SnapshotNotFound(_inner) => Some(_inner),
UpdateSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SnapshotNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotNotFound")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotNotFound {}
pub mod snapshot_not_found {
#[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::SnapshotNotFound {
crate::error::SnapshotNotFound {
message: self.message,
}
}
}
}
impl SnapshotNotFound {
pub fn builder() -> crate::error::snapshot_not_found::Builder {
crate::error::snapshot_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFileSystemError {
pub kind: UpdateFileSystemErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFileSystemError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFileSystemErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
InvalidNetworkSettings(crate::error::InvalidNetworkSettings),
MissingFileSystemConfiguration(crate::error::MissingFileSystemConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFileSystemError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFileSystemErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::InvalidNetworkSettings(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::MissingFileSystemConfiguration(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
UpdateFileSystemErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFileSystemError {
fn code(&self) -> Option<&str> {
UpdateFileSystemError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFileSystemError {
pub fn new(kind: UpdateFileSystemErrorKind, 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: UpdateFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFileSystemErrorKind::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(&self) -> bool {
matches!(&self.kind, UpdateFileSystemErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(&self.kind, UpdateFileSystemErrorKind::FileSystemNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_network_settings(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::InvalidNetworkSettings(_)
)
}
pub fn is_missing_file_system_configuration(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::MissingFileSystemConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
UpdateFileSystemErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for UpdateFileSystemError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFileSystemErrorKind::BadRequest(_inner) => Some(_inner),
UpdateFileSystemErrorKind::FileSystemNotFound(_inner) => Some(_inner),
UpdateFileSystemErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
UpdateFileSystemErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateFileSystemErrorKind::InvalidNetworkSettings(_inner) => Some(_inner),
UpdateFileSystemErrorKind::MissingFileSystemConfiguration(_inner) => Some(_inner),
UpdateFileSystemErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
UpdateFileSystemErrorKind::UnsupportedOperation(_inner) => Some(_inner),
UpdateFileSystemErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceLimitExceeded {
#[doc(hidden)]
pub limit: std::option::Option<crate::model::ServiceLimit>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceLimitExceeded {
pub fn limit(&self) -> std::option::Option<&crate::model::ServiceLimit> {
self.limit.as_ref()
}
}
impl ServiceLimitExceeded {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceLimitExceeded {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceLimitExceeded")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceLimitExceeded {}
pub mod service_limit_exceeded {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) limit: std::option::Option<crate::model::ServiceLimit>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn limit(mut self, input: crate::model::ServiceLimit) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<crate::model::ServiceLimit>) -> Self {
self.limit = 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::ServiceLimitExceeded {
crate::error::ServiceLimitExceeded {
limit: self.limit,
message: self.message,
}
}
}
}
impl ServiceLimitExceeded {
pub fn builder() -> crate::error::service_limit_exceeded::Builder {
crate::error::service_limit_exceeded::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MissingFileSystemConfiguration {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MissingFileSystemConfiguration {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MissingFileSystemConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MissingFileSystemConfiguration")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for MissingFileSystemConfiguration {}
pub mod missing_file_system_configuration {
#[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::MissingFileSystemConfiguration {
crate::error::MissingFileSystemConfiguration {
message: self.message,
}
}
}
}
impl MissingFileSystemConfiguration {
pub fn builder() -> crate::error::missing_file_system_configuration::Builder {
crate::error::missing_file_system_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNetworkSettings {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub invalid_subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub invalid_security_group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub invalid_route_table_id: std::option::Option<std::string::String>,
}
impl InvalidNetworkSettings {
pub fn invalid_subnet_id(&self) -> std::option::Option<&str> {
self.invalid_subnet_id.as_deref()
}
pub fn invalid_security_group_id(&self) -> std::option::Option<&str> {
self.invalid_security_group_id.as_deref()
}
pub fn invalid_route_table_id(&self) -> std::option::Option<&str> {
self.invalid_route_table_id.as_deref()
}
}
impl InvalidNetworkSettings {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNetworkSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNetworkSettings")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNetworkSettings {}
pub mod invalid_network_settings {
#[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) invalid_subnet_id: std::option::Option<std::string::String>,
pub(crate) invalid_security_group_id: std::option::Option<std::string::String>,
pub(crate) invalid_route_table_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn invalid_subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.invalid_subnet_id = Some(input.into());
self
}
pub fn set_invalid_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.invalid_subnet_id = input;
self
}
pub fn invalid_security_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.invalid_security_group_id = Some(input.into());
self
}
pub fn set_invalid_security_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.invalid_security_group_id = input;
self
}
pub fn invalid_route_table_id(mut self, input: impl Into<std::string::String>) -> Self {
self.invalid_route_table_id = Some(input.into());
self
}
pub fn set_invalid_route_table_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.invalid_route_table_id = input;
self
}
pub fn build(self) -> crate::error::InvalidNetworkSettings {
crate::error::InvalidNetworkSettings {
message: self.message,
invalid_subnet_id: self.invalid_subnet_id,
invalid_security_group_id: self.invalid_security_group_id,
invalid_route_table_id: self.invalid_route_table_id,
}
}
}
}
impl InvalidNetworkSettings {
pub fn builder() -> crate::error::invalid_network_settings::Builder {
crate::error::invalid_network_settings::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FileSystemNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl FileSystemNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for FileSystemNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "FileSystemNotFound")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for FileSystemNotFound {}
pub mod file_system_not_found {
#[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::FileSystemNotFound {
crate::error::FileSystemNotFound {
message: self.message,
}
}
}
}
impl FileSystemNotFound {
pub fn builder() -> crate::error::file_system_not_found::Builder {
crate::error::file_system_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFileCacheError {
pub kind: UpdateFileCacheErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFileCacheError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFileCacheErrorKind {
BadRequest(crate::error::BadRequest),
FileCacheNotFound(crate::error::FileCacheNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
MissingFileCacheConfiguration(crate::error::MissingFileCacheConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFileCacheError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFileCacheErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::FileCacheNotFound(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::MissingFileCacheConfiguration(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
UpdateFileCacheErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFileCacheError {
fn code(&self) -> Option<&str> {
UpdateFileCacheError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFileCacheError {
pub fn new(kind: UpdateFileCacheErrorKind, 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: UpdateFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFileCacheErrorKind::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(&self) -> bool {
matches!(&self.kind, UpdateFileCacheErrorKind::BadRequest(_))
}
pub fn is_file_cache_not_found(&self) -> bool {
matches!(&self.kind, UpdateFileCacheErrorKind::FileCacheNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
UpdateFileCacheErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, UpdateFileCacheErrorKind::InternalServerError(_))
}
pub fn is_missing_file_cache_configuration(&self) -> bool {
matches!(
&self.kind,
UpdateFileCacheErrorKind::MissingFileCacheConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
UpdateFileCacheErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
UpdateFileCacheErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for UpdateFileCacheError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFileCacheErrorKind::BadRequest(_inner) => Some(_inner),
UpdateFileCacheErrorKind::FileCacheNotFound(_inner) => Some(_inner),
UpdateFileCacheErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
UpdateFileCacheErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateFileCacheErrorKind::MissingFileCacheConfiguration(_inner) => Some(_inner),
UpdateFileCacheErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
UpdateFileCacheErrorKind::UnsupportedOperation(_inner) => Some(_inner),
UpdateFileCacheErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MissingFileCacheConfiguration {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MissingFileCacheConfiguration {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MissingFileCacheConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MissingFileCacheConfiguration")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for MissingFileCacheConfiguration {}
pub mod missing_file_cache_configuration {
#[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::MissingFileCacheConfiguration {
crate::error::MissingFileCacheConfiguration {
message: self.message,
}
}
}
}
impl MissingFileCacheConfiguration {
pub fn builder() -> crate::error::missing_file_cache_configuration::Builder {
crate::error::missing_file_cache_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FileCacheNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl FileCacheNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for FileCacheNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "FileCacheNotFound")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for FileCacheNotFound {}
pub mod file_cache_not_found {
#[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::FileCacheNotFound {
crate::error::FileCacheNotFound {
message: self.message,
}
}
}
}
impl FileCacheNotFound {
pub fn builder() -> crate::error::file_cache_not_found::Builder {
crate::error::file_cache_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDataRepositoryAssociationError {
pub kind: UpdateDataRepositoryAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDataRepositoryAssociationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDataRepositoryAssociationErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryAssociationNotFound(crate::error::DataRepositoryAssociationNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDataRepositoryAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDataRepositoryAssociationErrorKind::BadRequest(_inner) => _inner.fmt(f),
UpdateDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_inner) => {
_inner.fmt(f)
}
UpdateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
UpdateDataRepositoryAssociationErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
UpdateDataRepositoryAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDataRepositoryAssociationError {
fn code(&self) -> Option<&str> {
UpdateDataRepositoryAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDataRepositoryAssociationError {
pub fn new(
kind: UpdateDataRepositoryAssociationErrorKind,
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: UpdateDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDataRepositoryAssociationErrorKind::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(&self) -> bool {
matches!(
&self.kind,
UpdateDataRepositoryAssociationErrorKind::BadRequest(_)
)
}
pub fn is_data_repository_association_not_found(&self) -> bool {
matches!(
&self.kind,
UpdateDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
UpdateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateDataRepositoryAssociationErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
UpdateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for UpdateDataRepositoryAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDataRepositoryAssociationErrorKind::BadRequest(_inner) => Some(_inner),
UpdateDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_inner) => {
Some(_inner)
}
UpdateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
UpdateDataRepositoryAssociationErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
UpdateDataRepositoryAssociationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataRepositoryAssociationNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DataRepositoryAssociationNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataRepositoryAssociationNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataRepositoryAssociationNotFound")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for DataRepositoryAssociationNotFound {}
pub mod data_repository_association_not_found {
#[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::DataRepositoryAssociationNotFound {
crate::error::DataRepositoryAssociationNotFound {
message: self.message,
}
}
}
}
impl DataRepositoryAssociationNotFound {
pub fn builder() -> crate::error::data_repository_association_not_found::Builder {
crate::error::data_repository_association_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
NotServiceResourceError(crate::error::NotServiceResourceError),
ResourceDoesNotSupportTagging(crate::error::ResourceDoesNotSupportTagging),
ResourceNotFound(crate::error::ResourceNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::BadRequest(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UntagResourceErrorKind::NotServiceResourceError(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFound(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, 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: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::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(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InternalServerError(_))
}
pub fn is_not_service_resource_error(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::NotServiceResourceError(_)
)
}
pub fn is_resource_does_not_support_tagging(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceDoesNotSupportTagging(_)
)
}
pub fn is_resource_not_found(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ResourceNotFound(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::BadRequest(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerError(_inner) => Some(_inner),
UntagResourceErrorKind::NotServiceResourceError(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFound(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFound {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFound {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl ResourceNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFound")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFound {}
pub mod resource_not_found {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = 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::ResourceNotFound {
crate::error::ResourceNotFound {
resource_arn: self.resource_arn,
message: self.message,
}
}
}
}
impl ResourceNotFound {
pub fn builder() -> crate::error::resource_not_found::Builder {
crate::error::resource_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceDoesNotSupportTagging {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceDoesNotSupportTagging {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl ResourceDoesNotSupportTagging {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceDoesNotSupportTagging {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceDoesNotSupportTagging")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceDoesNotSupportTagging {}
pub mod resource_does_not_support_tagging {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = 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::ResourceDoesNotSupportTagging {
crate::error::ResourceDoesNotSupportTagging {
resource_arn: self.resource_arn,
message: self.message,
}
}
}
}
impl ResourceDoesNotSupportTagging {
pub fn builder() -> crate::error::resource_does_not_support_tagging::Builder {
crate::error::resource_does_not_support_tagging::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotServiceResourceError {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NotServiceResourceError {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl NotServiceResourceError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotServiceResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotServiceResourceError")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for NotServiceResourceError {}
pub mod not_service_resource_error {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = 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::NotServiceResourceError {
crate::error::NotServiceResourceError {
resource_arn: self.resource_arn,
message: self.message,
}
}
}
}
impl NotServiceResourceError {
pub fn builder() -> crate::error::not_service_resource_error::Builder {
crate::error::not_service_resource_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
NotServiceResourceError(crate::error::NotServiceResourceError),
ResourceDoesNotSupportTagging(crate::error::ResourceDoesNotSupportTagging),
ResourceNotFound(crate::error::ResourceNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::BadRequest(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
TagResourceErrorKind::NotServiceResourceError(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFound(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, 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: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::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(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerError(_))
}
pub fn is_not_service_resource_error(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::NotServiceResourceError(_))
}
pub fn is_resource_does_not_support_tagging(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceDoesNotSupportTagging(_)
)
}
pub fn is_resource_not_found(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ResourceNotFound(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::BadRequest(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerError(_inner) => Some(_inner),
TagResourceErrorKind::NotServiceResourceError(_inner) => Some(_inner),
TagResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFound(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestoreVolumeFromSnapshotError {
pub kind: RestoreVolumeFromSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RestoreVolumeFromSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RestoreVolumeFromSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestoreVolumeFromSnapshotErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RestoreVolumeFromSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestoreVolumeFromSnapshotErrorKind::BadRequest(_inner) => _inner.fmt(f),
RestoreVolumeFromSnapshotErrorKind::InternalServerError(_inner) => _inner.fmt(f),
RestoreVolumeFromSnapshotErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
RestoreVolumeFromSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestoreVolumeFromSnapshotError {
fn code(&self) -> Option<&str> {
RestoreVolumeFromSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestoreVolumeFromSnapshotError {
pub fn new(kind: RestoreVolumeFromSnapshotErrorKind, 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: RestoreVolumeFromSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestoreVolumeFromSnapshotErrorKind::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(&self) -> bool {
matches!(
&self.kind,
RestoreVolumeFromSnapshotErrorKind::BadRequest(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
RestoreVolumeFromSnapshotErrorKind::InternalServerError(_)
)
}
pub fn is_volume_not_found(&self) -> bool {
matches!(
&self.kind,
RestoreVolumeFromSnapshotErrorKind::VolumeNotFound(_)
)
}
}
impl std::error::Error for RestoreVolumeFromSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestoreVolumeFromSnapshotErrorKind::BadRequest(_inner) => Some(_inner),
RestoreVolumeFromSnapshotErrorKind::InternalServerError(_inner) => Some(_inner),
RestoreVolumeFromSnapshotErrorKind::VolumeNotFound(_inner) => Some(_inner),
RestoreVolumeFromSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ReleaseFileSystemNfsV3LocksError {
pub kind: ReleaseFileSystemNfsV3LocksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ReleaseFileSystemNfsV3LocksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ReleaseFileSystemNfsV3LocksErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ReleaseFileSystemNfsV3LocksErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ReleaseFileSystemNfsV3LocksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ReleaseFileSystemNfsV3LocksErrorKind::BadRequest(_inner) => _inner.fmt(f),
ReleaseFileSystemNfsV3LocksErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
ReleaseFileSystemNfsV3LocksErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
ReleaseFileSystemNfsV3LocksErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ReleaseFileSystemNfsV3LocksErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
ReleaseFileSystemNfsV3LocksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ReleaseFileSystemNfsV3LocksError {
fn code(&self) -> Option<&str> {
ReleaseFileSystemNfsV3LocksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ReleaseFileSystemNfsV3LocksError {
pub fn new(kind: ReleaseFileSystemNfsV3LocksErrorKind, 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: ReleaseFileSystemNfsV3LocksErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ReleaseFileSystemNfsV3LocksErrorKind::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(&self) -> bool {
matches!(
&self.kind,
ReleaseFileSystemNfsV3LocksErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
ReleaseFileSystemNfsV3LocksErrorKind::FileSystemNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
ReleaseFileSystemNfsV3LocksErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ReleaseFileSystemNfsV3LocksErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
ReleaseFileSystemNfsV3LocksErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for ReleaseFileSystemNfsV3LocksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ReleaseFileSystemNfsV3LocksErrorKind::BadRequest(_inner) => Some(_inner),
ReleaseFileSystemNfsV3LocksErrorKind::FileSystemNotFound(_inner) => Some(_inner),
ReleaseFileSystemNfsV3LocksErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
ReleaseFileSystemNfsV3LocksErrorKind::InternalServerError(_inner) => Some(_inner),
ReleaseFileSystemNfsV3LocksErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
ReleaseFileSystemNfsV3LocksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
NotServiceResourceError(crate::error::NotServiceResourceError),
ResourceDoesNotSupportTagging(crate::error::ResourceDoesNotSupportTagging),
ResourceNotFound(crate::error::ResourceNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::BadRequest(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::NotServiceResourceError(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFound(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, 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: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::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(&self) -> bool {
matches!(&self.kind, ListTagsForResourceErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerError(_)
)
}
pub fn is_not_service_resource_error(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::NotServiceResourceError(_)
)
}
pub fn is_resource_does_not_support_tagging(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceDoesNotSupportTagging(_)
)
}
pub fn is_resource_not_found(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFound(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::BadRequest(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerError(_inner) => Some(_inner),
ListTagsForResourceErrorKind::NotServiceResourceError(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceDoesNotSupportTagging(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFound(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateFileSystemAliasesError {
pub kind: DisassociateFileSystemAliasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateFileSystemAliasesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateFileSystemAliasesErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateFileSystemAliasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateFileSystemAliasesErrorKind::BadRequest(_inner) => _inner.fmt(f),
DisassociateFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DisassociateFileSystemAliasesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DisassociateFileSystemAliasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateFileSystemAliasesError {
fn code(&self) -> Option<&str> {
DisassociateFileSystemAliasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateFileSystemAliasesError {
pub fn new(
kind: DisassociateFileSystemAliasesErrorKind,
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: DisassociateFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateFileSystemAliasesErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DisassociateFileSystemAliasesErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
DisassociateFileSystemAliasesErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DisassociateFileSystemAliasesErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for DisassociateFileSystemAliasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateFileSystemAliasesErrorKind::BadRequest(_inner) => Some(_inner),
DisassociateFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DisassociateFileSystemAliasesErrorKind::InternalServerError(_inner) => Some(_inner),
DisassociateFileSystemAliasesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeVolumesError {
pub kind: DescribeVolumesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeVolumesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeVolumesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeVolumesErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeVolumesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeVolumesErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeVolumesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeVolumesErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
DescribeVolumesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeVolumesError {
fn code(&self) -> Option<&str> {
DescribeVolumesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeVolumesError {
pub fn new(kind: DescribeVolumesErrorKind, 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: DescribeVolumesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeVolumesErrorKind::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(&self) -> bool {
matches!(&self.kind, DescribeVolumesErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DescribeVolumesErrorKind::InternalServerError(_))
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, DescribeVolumesErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for DescribeVolumesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeVolumesErrorKind::BadRequest(_inner) => Some(_inner),
DescribeVolumesErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeVolumesErrorKind::VolumeNotFound(_inner) => Some(_inner),
DescribeVolumesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeStorageVirtualMachinesError {
pub kind: DescribeStorageVirtualMachinesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeStorageVirtualMachinesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeStorageVirtualMachinesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeStorageVirtualMachinesErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
StorageVirtualMachineNotFound(crate::error::StorageVirtualMachineNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeStorageVirtualMachinesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeStorageVirtualMachinesErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeStorageVirtualMachinesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeStorageVirtualMachinesErrorKind::StorageVirtualMachineNotFound(_inner) => {
_inner.fmt(f)
}
DescribeStorageVirtualMachinesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeStorageVirtualMachinesError {
fn code(&self) -> Option<&str> {
DescribeStorageVirtualMachinesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeStorageVirtualMachinesError {
pub fn new(
kind: DescribeStorageVirtualMachinesErrorKind,
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: DescribeStorageVirtualMachinesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeStorageVirtualMachinesErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DescribeStorageVirtualMachinesErrorKind::BadRequest(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeStorageVirtualMachinesErrorKind::InternalServerError(_)
)
}
pub fn is_storage_virtual_machine_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeStorageVirtualMachinesErrorKind::StorageVirtualMachineNotFound(_)
)
}
}
impl std::error::Error for DescribeStorageVirtualMachinesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeStorageVirtualMachinesErrorKind::BadRequest(_inner) => Some(_inner),
DescribeStorageVirtualMachinesErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeStorageVirtualMachinesErrorKind::StorageVirtualMachineNotFound(_inner) => {
Some(_inner)
}
DescribeStorageVirtualMachinesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSnapshotsError {
pub kind: DescribeSnapshotsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSnapshotsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSnapshotsErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
SnapshotNotFound(crate::error::SnapshotNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSnapshotsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSnapshotsErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::SnapshotNotFound(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSnapshotsError {
fn code(&self) -> Option<&str> {
DescribeSnapshotsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSnapshotsError {
pub fn new(kind: DescribeSnapshotsErrorKind, 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: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSnapshotsErrorKind::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(&self) -> bool {
matches!(&self.kind, DescribeSnapshotsErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::InternalServerError(_)
)
}
pub fn is_snapshot_not_found(&self) -> bool {
matches!(&self.kind, DescribeSnapshotsErrorKind::SnapshotNotFound(_))
}
}
impl std::error::Error for DescribeSnapshotsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSnapshotsErrorKind::BadRequest(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::SnapshotNotFound(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFileSystemsError {
pub kind: DescribeFileSystemsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFileSystemsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFileSystemsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFileSystemsErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFileSystemsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFileSystemsErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeFileSystemsErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DescribeFileSystemsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeFileSystemsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFileSystemsError {
fn code(&self) -> Option<&str> {
DescribeFileSystemsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFileSystemsError {
pub fn new(kind: DescribeFileSystemsErrorKind, 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: DescribeFileSystemsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFileSystemsErrorKind::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(&self) -> bool {
matches!(&self.kind, DescribeFileSystemsErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeFileSystemsErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeFileSystemsErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for DescribeFileSystemsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFileSystemsErrorKind::BadRequest(_inner) => Some(_inner),
DescribeFileSystemsErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DescribeFileSystemsErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeFileSystemsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFileSystemAliasesError {
pub kind: DescribeFileSystemAliasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFileSystemAliasesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFileSystemAliasesErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFileSystemAliasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFileSystemAliasesErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DescribeFileSystemAliasesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeFileSystemAliasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFileSystemAliasesError {
fn code(&self) -> Option<&str> {
DescribeFileSystemAliasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFileSystemAliasesError {
pub fn new(kind: DescribeFileSystemAliasesErrorKind, 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: DescribeFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFileSystemAliasesErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DescribeFileSystemAliasesErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeFileSystemAliasesErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeFileSystemAliasesErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for DescribeFileSystemAliasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFileSystemAliasesErrorKind::BadRequest(_inner) => Some(_inner),
DescribeFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DescribeFileSystemAliasesErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeFileSystemAliasesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFileCachesError {
pub kind: DescribeFileCachesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFileCachesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFileCachesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFileCachesErrorKind {
BadRequest(crate::error::BadRequest),
FileCacheNotFound(crate::error::FileCacheNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFileCachesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFileCachesErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeFileCachesErrorKind::FileCacheNotFound(_inner) => _inner.fmt(f),
DescribeFileCachesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeFileCachesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFileCachesError {
fn code(&self) -> Option<&str> {
DescribeFileCachesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFileCachesError {
pub fn new(kind: DescribeFileCachesErrorKind, 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: DescribeFileCachesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFileCachesErrorKind::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(&self) -> bool {
matches!(&self.kind, DescribeFileCachesErrorKind::BadRequest(_))
}
pub fn is_file_cache_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeFileCachesErrorKind::FileCacheNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeFileCachesErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for DescribeFileCachesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFileCachesErrorKind::BadRequest(_inner) => Some(_inner),
DescribeFileCachesErrorKind::FileCacheNotFound(_inner) => Some(_inner),
DescribeFileCachesErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeFileCachesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDataRepositoryTasksError {
pub kind: DescribeDataRepositoryTasksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDataRepositoryTasksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDataRepositoryTasksErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDataRepositoryTasksErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryTaskNotFound(crate::error::DataRepositoryTaskNotFound),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDataRepositoryTasksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDataRepositoryTasksErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeDataRepositoryTasksErrorKind::DataRepositoryTaskNotFound(_inner) => {
_inner.fmt(f)
}
DescribeDataRepositoryTasksErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DescribeDataRepositoryTasksErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeDataRepositoryTasksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDataRepositoryTasksError {
fn code(&self) -> Option<&str> {
DescribeDataRepositoryTasksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDataRepositoryTasksError {
pub fn new(kind: DescribeDataRepositoryTasksErrorKind, 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: DescribeDataRepositoryTasksErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDataRepositoryTasksErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryTasksErrorKind::BadRequest(_)
)
}
pub fn is_data_repository_task_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryTasksErrorKind::DataRepositoryTaskNotFound(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryTasksErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryTasksErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for DescribeDataRepositoryTasksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDataRepositoryTasksErrorKind::BadRequest(_inner) => Some(_inner),
DescribeDataRepositoryTasksErrorKind::DataRepositoryTaskNotFound(_inner) => {
Some(_inner)
}
DescribeDataRepositoryTasksErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DescribeDataRepositoryTasksErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeDataRepositoryTasksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataRepositoryTaskNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DataRepositoryTaskNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataRepositoryTaskNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataRepositoryTaskNotFound")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for DataRepositoryTaskNotFound {}
pub mod data_repository_task_not_found {
#[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::DataRepositoryTaskNotFound {
crate::error::DataRepositoryTaskNotFound {
message: self.message,
}
}
}
}
impl DataRepositoryTaskNotFound {
pub fn builder() -> crate::error::data_repository_task_not_found::Builder {
crate::error::data_repository_task_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDataRepositoryAssociationsError {
pub kind: DescribeDataRepositoryAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDataRepositoryAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDataRepositoryAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDataRepositoryAssociationsErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryAssociationNotFound(crate::error::DataRepositoryAssociationNotFound),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
InvalidDataRepositoryType(crate::error::InvalidDataRepositoryType),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDataRepositoryAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDataRepositoryAssociationsErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeDataRepositoryAssociationsErrorKind::DataRepositoryAssociationNotFound(
_inner,
) => _inner.fmt(f),
DescribeDataRepositoryAssociationsErrorKind::FileSystemNotFound(_inner) => {
_inner.fmt(f)
}
DescribeDataRepositoryAssociationsErrorKind::InternalServerError(_inner) => {
_inner.fmt(f)
}
DescribeDataRepositoryAssociationsErrorKind::InvalidDataRepositoryType(_inner) => {
_inner.fmt(f)
}
DescribeDataRepositoryAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDataRepositoryAssociationsError {
fn code(&self) -> Option<&str> {
DescribeDataRepositoryAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDataRepositoryAssociationsError {
pub fn new(
kind: DescribeDataRepositoryAssociationsErrorKind,
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: DescribeDataRepositoryAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDataRepositoryAssociationsErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryAssociationsErrorKind::BadRequest(_)
)
}
pub fn is_data_repository_association_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryAssociationsErrorKind::DataRepositoryAssociationNotFound(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryAssociationsErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryAssociationsErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_data_repository_type(&self) -> bool {
matches!(
&self.kind,
DescribeDataRepositoryAssociationsErrorKind::InvalidDataRepositoryType(_)
)
}
}
impl std::error::Error for DescribeDataRepositoryAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDataRepositoryAssociationsErrorKind::BadRequest(_inner) => Some(_inner),
DescribeDataRepositoryAssociationsErrorKind::DataRepositoryAssociationNotFound(
_inner,
) => Some(_inner),
DescribeDataRepositoryAssociationsErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DescribeDataRepositoryAssociationsErrorKind::InternalServerError(_inner) => {
Some(_inner)
}
DescribeDataRepositoryAssociationsErrorKind::InvalidDataRepositoryType(_inner) => {
Some(_inner)
}
DescribeDataRepositoryAssociationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidDataRepositoryType {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidDataRepositoryType {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidDataRepositoryType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidDataRepositoryType")?;
if let Some(inner_20) = &self.message {
{
write!(f, ": {}", inner_20)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidDataRepositoryType {}
pub mod invalid_data_repository_type {
#[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::InvalidDataRepositoryType {
crate::error::InvalidDataRepositoryType {
message: self.message,
}
}
}
}
impl InvalidDataRepositoryType {
pub fn builder() -> crate::error::invalid_data_repository_type::Builder {
crate::error::invalid_data_repository_type::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBackupsError {
pub kind: DescribeBackupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBackupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBackupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBackupsErrorKind {
BackupNotFound(crate::error::BackupNotFound),
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBackupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBackupsErrorKind::BackupNotFound(_inner) => _inner.fmt(f),
DescribeBackupsErrorKind::BadRequest(_inner) => _inner.fmt(f),
DescribeBackupsErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DescribeBackupsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeBackupsErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
DescribeBackupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBackupsError {
fn code(&self) -> Option<&str> {
DescribeBackupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBackupsError {
pub fn new(kind: DescribeBackupsErrorKind, 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: DescribeBackupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBackupsErrorKind::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_backup_not_found(&self) -> bool {
matches!(&self.kind, DescribeBackupsErrorKind::BackupNotFound(_))
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, DescribeBackupsErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(&self.kind, DescribeBackupsErrorKind::FileSystemNotFound(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DescribeBackupsErrorKind::InternalServerError(_))
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, DescribeBackupsErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for DescribeBackupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBackupsErrorKind::BackupNotFound(_inner) => Some(_inner),
DescribeBackupsErrorKind::BadRequest(_inner) => Some(_inner),
DescribeBackupsErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DescribeBackupsErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeBackupsErrorKind::VolumeNotFound(_inner) => Some(_inner),
DescribeBackupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BackupNotFound {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BackupNotFound {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BackupNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BackupNotFound")?;
if let Some(inner_21) = &self.message {
{
write!(f, ": {}", inner_21)?;
}
}
Ok(())
}
}
impl std::error::Error for BackupNotFound {}
pub mod backup_not_found {
#[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::BackupNotFound {
crate::error::BackupNotFound {
message: self.message,
}
}
}
}
impl BackupNotFound {
pub fn builder() -> crate::error::backup_not_found::Builder {
crate::error::backup_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteVolumeError {
pub kind: DeleteVolumeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteVolumeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteVolumeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteVolumeErrorKind {
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteVolumeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteVolumeErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteVolumeErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
DeleteVolumeErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteVolumeErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
DeleteVolumeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteVolumeError {
fn code(&self) -> Option<&str> {
DeleteVolumeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteVolumeError {
pub fn new(kind: DeleteVolumeErrorKind, 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: DeleteVolumeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteVolumeErrorKind::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(&self) -> bool {
matches!(&self.kind, DeleteVolumeErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteVolumeErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DeleteVolumeErrorKind::InternalServerError(_))
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, DeleteVolumeErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for DeleteVolumeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteVolumeErrorKind::BadRequest(_inner) => Some(_inner),
DeleteVolumeErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
DeleteVolumeErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteVolumeErrorKind::VolumeNotFound(_inner) => Some(_inner),
DeleteVolumeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteStorageVirtualMachineError {
pub kind: DeleteStorageVirtualMachineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteStorageVirtualMachineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteStorageVirtualMachineErrorKind {
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
StorageVirtualMachineNotFound(crate::error::StorageVirtualMachineNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteStorageVirtualMachineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteStorageVirtualMachineErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
DeleteStorageVirtualMachineErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_inner) => {
_inner.fmt(f)
}
DeleteStorageVirtualMachineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteStorageVirtualMachineError {
fn code(&self) -> Option<&str> {
DeleteStorageVirtualMachineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteStorageVirtualMachineError {
pub fn new(kind: DeleteStorageVirtualMachineErrorKind, 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: DeleteStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteStorageVirtualMachineErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DeleteStorageVirtualMachineErrorKind::BadRequest(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteStorageVirtualMachineErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteStorageVirtualMachineErrorKind::InternalServerError(_)
)
}
pub fn is_storage_virtual_machine_not_found(&self) -> bool {
matches!(
&self.kind,
DeleteStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_)
)
}
}
impl std::error::Error for DeleteStorageVirtualMachineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteStorageVirtualMachineErrorKind::BadRequest(_inner) => Some(_inner),
DeleteStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
DeleteStorageVirtualMachineErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteStorageVirtualMachineErrorKind::StorageVirtualMachineNotFound(_inner) => {
Some(_inner)
}
DeleteStorageVirtualMachineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSnapshotError {
pub kind: DeleteSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSnapshotErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
SnapshotNotFound(crate::error::SnapshotNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSnapshotErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::SnapshotNotFound(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSnapshotError {
fn code(&self) -> Option<&str> {
DeleteSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSnapshotError {
pub fn new(kind: DeleteSnapshotErrorKind, 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: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSnapshotErrorKind::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(&self) -> bool {
matches!(&self.kind, DeleteSnapshotErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DeleteSnapshotErrorKind::InternalServerError(_))
}
pub fn is_snapshot_not_found(&self) -> bool {
matches!(&self.kind, DeleteSnapshotErrorKind::SnapshotNotFound(_))
}
}
impl std::error::Error for DeleteSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSnapshotErrorKind::BadRequest(_inner) => Some(_inner),
DeleteSnapshotErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteSnapshotErrorKind::SnapshotNotFound(_inner) => Some(_inner),
DeleteSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFileSystemError {
pub kind: DeleteFileSystemErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFileSystemError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFileSystemErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFileSystemError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFileSystemErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteFileSystemErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
DeleteFileSystemErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
DeleteFileSystemErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteFileSystemErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
DeleteFileSystemErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFileSystemError {
fn code(&self) -> Option<&str> {
DeleteFileSystemError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFileSystemError {
pub fn new(kind: DeleteFileSystemErrorKind, 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: DeleteFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFileSystemErrorKind::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(&self) -> bool {
matches!(&self.kind, DeleteFileSystemErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(&self.kind, DeleteFileSystemErrorKind::FileSystemNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteFileSystemErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteFileSystemErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
DeleteFileSystemErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for DeleteFileSystemError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFileSystemErrorKind::BadRequest(_inner) => Some(_inner),
DeleteFileSystemErrorKind::FileSystemNotFound(_inner) => Some(_inner),
DeleteFileSystemErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
DeleteFileSystemErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteFileSystemErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
DeleteFileSystemErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFileCacheError {
pub kind: DeleteFileCacheErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFileCacheError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFileCacheErrorKind {
BadRequest(crate::error::BadRequest),
FileCacheNotFound(crate::error::FileCacheNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFileCacheError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFileCacheErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteFileCacheErrorKind::FileCacheNotFound(_inner) => _inner.fmt(f),
DeleteFileCacheErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
DeleteFileCacheErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteFileCacheErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
DeleteFileCacheErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFileCacheError {
fn code(&self) -> Option<&str> {
DeleteFileCacheError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFileCacheError {
pub fn new(kind: DeleteFileCacheErrorKind, 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: DeleteFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFileCacheErrorKind::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(&self) -> bool {
matches!(&self.kind, DeleteFileCacheErrorKind::BadRequest(_))
}
pub fn is_file_cache_not_found(&self) -> bool {
matches!(&self.kind, DeleteFileCacheErrorKind::FileCacheNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteFileCacheErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DeleteFileCacheErrorKind::InternalServerError(_))
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
DeleteFileCacheErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for DeleteFileCacheError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFileCacheErrorKind::BadRequest(_inner) => Some(_inner),
DeleteFileCacheErrorKind::FileCacheNotFound(_inner) => Some(_inner),
DeleteFileCacheErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
DeleteFileCacheErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteFileCacheErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
DeleteFileCacheErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDataRepositoryAssociationError {
pub kind: DeleteDataRepositoryAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDataRepositoryAssociationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDataRepositoryAssociationErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryAssociationNotFound(crate::error::DataRepositoryAssociationNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDataRepositoryAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDataRepositoryAssociationErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_inner) => {
_inner.fmt(f)
}
DeleteDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
DeleteDataRepositoryAssociationErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
DeleteDataRepositoryAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDataRepositoryAssociationError {
fn code(&self) -> Option<&str> {
DeleteDataRepositoryAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDataRepositoryAssociationError {
pub fn new(
kind: DeleteDataRepositoryAssociationErrorKind,
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: DeleteDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDataRepositoryAssociationErrorKind::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(&self) -> bool {
matches!(
&self.kind,
DeleteDataRepositoryAssociationErrorKind::BadRequest(_)
)
}
pub fn is_data_repository_association_not_found(&self) -> bool {
matches!(
&self.kind,
DeleteDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteDataRepositoryAssociationErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteDataRepositoryAssociationErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
DeleteDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for DeleteDataRepositoryAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDataRepositoryAssociationErrorKind::BadRequest(_inner) => Some(_inner),
DeleteDataRepositoryAssociationErrorKind::DataRepositoryAssociationNotFound(_inner) => {
Some(_inner)
}
DeleteDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
DeleteDataRepositoryAssociationErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
DeleteDataRepositoryAssociationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBackupError {
pub kind: DeleteBackupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBackupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBackupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBackupErrorKind {
BackupBeingCopied(crate::error::BackupBeingCopied),
BackupInProgress(crate::error::BackupInProgress),
BackupNotFound(crate::error::BackupNotFound),
BackupRestoring(crate::error::BackupRestoring),
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBackupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBackupErrorKind::BackupBeingCopied(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::BackupInProgress(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::BackupNotFound(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::BackupRestoring(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::BadRequest(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteBackupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBackupError {
fn code(&self) -> Option<&str> {
DeleteBackupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBackupError {
pub fn new(kind: DeleteBackupErrorKind, 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: DeleteBackupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBackupErrorKind::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_backup_being_copied(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::BackupBeingCopied(_))
}
pub fn is_backup_in_progress(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::BackupInProgress(_))
}
pub fn is_backup_not_found(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::BackupNotFound(_))
}
pub fn is_backup_restoring(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::BackupRestoring(_))
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
DeleteBackupErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, DeleteBackupErrorKind::InternalServerError(_))
}
}
impl std::error::Error for DeleteBackupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBackupErrorKind::BackupBeingCopied(_inner) => Some(_inner),
DeleteBackupErrorKind::BackupInProgress(_inner) => Some(_inner),
DeleteBackupErrorKind::BackupNotFound(_inner) => Some(_inner),
DeleteBackupErrorKind::BackupRestoring(_inner) => Some(_inner),
DeleteBackupErrorKind::BadRequest(_inner) => Some(_inner),
DeleteBackupErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
DeleteBackupErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteBackupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BackupRestoring {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub file_system_id: std::option::Option<std::string::String>,
}
impl BackupRestoring {
pub fn file_system_id(&self) -> std::option::Option<&str> {
self.file_system_id.as_deref()
}
}
impl BackupRestoring {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BackupRestoring {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BackupRestoring")?;
if let Some(inner_22) = &self.message {
{
write!(f, ": {}", inner_22)?;
}
}
Ok(())
}
}
impl std::error::Error for BackupRestoring {}
pub mod backup_restoring {
#[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) file_system_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn file_system_id(mut self, input: impl Into<std::string::String>) -> Self {
self.file_system_id = Some(input.into());
self
}
pub fn set_file_system_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.file_system_id = input;
self
}
pub fn build(self) -> crate::error::BackupRestoring {
crate::error::BackupRestoring {
message: self.message,
file_system_id: self.file_system_id,
}
}
}
}
impl BackupRestoring {
pub fn builder() -> crate::error::backup_restoring::Builder {
crate::error::backup_restoring::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BackupInProgress {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BackupInProgress {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BackupInProgress {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BackupInProgress")?;
if let Some(inner_23) = &self.message {
{
write!(f, ": {}", inner_23)?;
}
}
Ok(())
}
}
impl std::error::Error for BackupInProgress {}
pub mod backup_in_progress {
#[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::BackupInProgress {
crate::error::BackupInProgress {
message: self.message,
}
}
}
}
impl BackupInProgress {
pub fn builder() -> crate::error::backup_in_progress::Builder {
crate::error::backup_in_progress::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BackupBeingCopied {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub backup_id: std::option::Option<std::string::String>,
}
impl BackupBeingCopied {
pub fn backup_id(&self) -> std::option::Option<&str> {
self.backup_id.as_deref()
}
}
impl BackupBeingCopied {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BackupBeingCopied {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BackupBeingCopied")?;
if let Some(inner_24) = &self.message {
{
write!(f, ": {}", inner_24)?;
}
}
Ok(())
}
}
impl std::error::Error for BackupBeingCopied {}
pub mod backup_being_copied {
#[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) backup_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn backup_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_id = Some(input.into());
self
}
pub fn set_backup_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_id = input;
self
}
pub fn build(self) -> crate::error::BackupBeingCopied {
crate::error::BackupBeingCopied {
message: self.message,
backup_id: self.backup_id,
}
}
}
}
impl BackupBeingCopied {
pub fn builder() -> crate::error::backup_being_copied::Builder {
crate::error::backup_being_copied::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateVolumeFromBackupError {
pub kind: CreateVolumeFromBackupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateVolumeFromBackupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateVolumeFromBackupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateVolumeFromBackupErrorKind {
BackupNotFound(crate::error::BackupNotFound),
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
MissingVolumeConfiguration(crate::error::MissingVolumeConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
StorageVirtualMachineNotFound(crate::error::StorageVirtualMachineNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateVolumeFromBackupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateVolumeFromBackupErrorKind::BackupNotFound(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::MissingVolumeConfiguration(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::StorageVirtualMachineNotFound(_inner) => _inner.fmt(f),
CreateVolumeFromBackupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateVolumeFromBackupError {
fn code(&self) -> Option<&str> {
CreateVolumeFromBackupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateVolumeFromBackupError {
pub fn new(kind: CreateVolumeFromBackupErrorKind, 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: CreateVolumeFromBackupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateVolumeFromBackupErrorKind::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_backup_not_found(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::BackupNotFound(_)
)
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, CreateVolumeFromBackupErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::FileSystemNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::InternalServerError(_)
)
}
pub fn is_missing_volume_configuration(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::MissingVolumeConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_storage_virtual_machine_not_found(&self) -> bool {
matches!(
&self.kind,
CreateVolumeFromBackupErrorKind::StorageVirtualMachineNotFound(_)
)
}
}
impl std::error::Error for CreateVolumeFromBackupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateVolumeFromBackupErrorKind::BackupNotFound(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::BadRequest(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::InternalServerError(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::MissingVolumeConfiguration(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::StorageVirtualMachineNotFound(_inner) => Some(_inner),
CreateVolumeFromBackupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateVolumeError {
pub kind: CreateVolumeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateVolumeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateVolumeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateVolumeErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
MissingVolumeConfiguration(crate::error::MissingVolumeConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
StorageVirtualMachineNotFound(crate::error::StorageVirtualMachineNotFound),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateVolumeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateVolumeErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::MissingVolumeConfiguration(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::StorageVirtualMachineNotFound(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CreateVolumeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateVolumeError {
fn code(&self) -> Option<&str> {
CreateVolumeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateVolumeError {
pub fn new(kind: CreateVolumeErrorKind, 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: CreateVolumeErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateVolumeErrorKind::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(&self) -> bool {
matches!(&self.kind, CreateVolumeErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(&self.kind, CreateVolumeErrorKind::FileSystemNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateVolumeErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateVolumeErrorKind::InternalServerError(_))
}
pub fn is_missing_volume_configuration(&self) -> bool {
matches!(
&self.kind,
CreateVolumeErrorKind::MissingVolumeConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(&self.kind, CreateVolumeErrorKind::ServiceLimitExceeded(_))
}
pub fn is_storage_virtual_machine_not_found(&self) -> bool {
matches!(
&self.kind,
CreateVolumeErrorKind::StorageVirtualMachineNotFound(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(&self.kind, CreateVolumeErrorKind::UnsupportedOperation(_))
}
}
impl std::error::Error for CreateVolumeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateVolumeErrorKind::BadRequest(_inner) => Some(_inner),
CreateVolumeErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateVolumeErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateVolumeErrorKind::InternalServerError(_inner) => Some(_inner),
CreateVolumeErrorKind::MissingVolumeConfiguration(_inner) => Some(_inner),
CreateVolumeErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateVolumeErrorKind::StorageVirtualMachineNotFound(_inner) => Some(_inner),
CreateVolumeErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CreateVolumeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateStorageVirtualMachineError {
pub kind: CreateStorageVirtualMachineErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateStorageVirtualMachineError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateStorageVirtualMachineErrorKind {
ActiveDirectoryError(crate::error::ActiveDirectoryError),
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateStorageVirtualMachineError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateStorageVirtualMachineErrorKind::ActiveDirectoryError(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
CreateStorageVirtualMachineErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CreateStorageVirtualMachineErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateStorageVirtualMachineError {
fn code(&self) -> Option<&str> {
CreateStorageVirtualMachineError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateStorageVirtualMachineError {
pub fn new(kind: CreateStorageVirtualMachineErrorKind, 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: CreateStorageVirtualMachineErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateStorageVirtualMachineErrorKind::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_active_directory_error(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::ActiveDirectoryError(_)
)
}
pub fn is_bad_request(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::FileSystemNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
CreateStorageVirtualMachineErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for CreateStorageVirtualMachineError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateStorageVirtualMachineErrorKind::ActiveDirectoryError(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::BadRequest(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
CreateStorageVirtualMachineErrorKind::InternalServerError(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CreateStorageVirtualMachineErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActiveDirectoryError {
#[doc(hidden)]
pub active_directory_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::ActiveDirectoryErrorType>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ActiveDirectoryError {
pub fn active_directory_id(&self) -> std::option::Option<&str> {
self.active_directory_id.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::ActiveDirectoryErrorType> {
self.r#type.as_ref()
}
}
impl ActiveDirectoryError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ActiveDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ActiveDirectoryError")?;
if let Some(inner_25) = &self.message {
{
write!(f, ": {}", inner_25)?;
}
}
Ok(())
}
}
impl std::error::Error for ActiveDirectoryError {}
pub mod active_directory_error {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) active_directory_id: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::ActiveDirectoryErrorType>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn active_directory_id(mut self, input: impl Into<std::string::String>) -> Self {
self.active_directory_id = Some(input.into());
self
}
pub fn set_active_directory_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.active_directory_id = input;
self
}
pub fn r#type(mut self, input: crate::model::ActiveDirectoryErrorType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::ActiveDirectoryErrorType>,
) -> Self {
self.r#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::ActiveDirectoryError {
crate::error::ActiveDirectoryError {
active_directory_id: self.active_directory_id,
r#type: self.r#type,
message: self.message,
}
}
}
}
impl ActiveDirectoryError {
pub fn builder() -> crate::error::active_directory_error::Builder {
crate::error::active_directory_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSnapshotError {
pub kind: CreateSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSnapshotErrorKind {
BadRequest(crate::error::BadRequest),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSnapshotErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSnapshotError {
fn code(&self) -> Option<&str> {
CreateSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSnapshotError {
pub fn new(kind: CreateSnapshotErrorKind, 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: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSnapshotErrorKind::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(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::BadRequest(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::InternalServerError(_))
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::ServiceLimitExceeded(_))
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for CreateSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSnapshotErrorKind::BadRequest(_inner) => Some(_inner),
CreateSnapshotErrorKind::InternalServerError(_inner) => Some(_inner),
CreateSnapshotErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateSnapshotErrorKind::VolumeNotFound(_inner) => Some(_inner),
CreateSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFileSystemFromBackupError {
pub kind: CreateFileSystemFromBackupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFileSystemFromBackupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFileSystemFromBackupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFileSystemFromBackupErrorKind {
ActiveDirectoryError(crate::error::ActiveDirectoryError),
BackupNotFound(crate::error::BackupNotFound),
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
InvalidNetworkSettings(crate::error::InvalidNetworkSettings),
InvalidPerUnitStorageThroughput(crate::error::InvalidPerUnitStorageThroughput),
MissingFileSystemConfiguration(crate::error::MissingFileSystemConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFileSystemFromBackupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFileSystemFromBackupErrorKind::ActiveDirectoryError(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::BackupNotFound(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
CreateFileSystemFromBackupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::InvalidNetworkSettings(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::InvalidPerUnitStorageThroughput(_inner) => {
_inner.fmt(f)
}
CreateFileSystemFromBackupErrorKind::MissingFileSystemConfiguration(_inner) => {
_inner.fmt(f)
}
CreateFileSystemFromBackupErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateFileSystemFromBackupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFileSystemFromBackupError {
fn code(&self) -> Option<&str> {
CreateFileSystemFromBackupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFileSystemFromBackupError {
pub fn new(kind: CreateFileSystemFromBackupErrorKind, 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: CreateFileSystemFromBackupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFileSystemFromBackupErrorKind::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_active_directory_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::ActiveDirectoryError(_)
)
}
pub fn is_backup_not_found(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::BackupNotFound(_)
)
}
pub fn is_bad_request(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::BadRequest(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_network_settings(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::InvalidNetworkSettings(_)
)
}
pub fn is_invalid_per_unit_storage_throughput(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::InvalidPerUnitStorageThroughput(_)
)
}
pub fn is_missing_file_system_configuration(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::MissingFileSystemConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemFromBackupErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for CreateFileSystemFromBackupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFileSystemFromBackupErrorKind::ActiveDirectoryError(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::BackupNotFound(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::BadRequest(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::InternalServerError(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::InvalidNetworkSettings(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::InvalidPerUnitStorageThroughput(_inner) => {
Some(_inner)
}
CreateFileSystemFromBackupErrorKind::MissingFileSystemConfiguration(_inner) => {
Some(_inner)
}
CreateFileSystemFromBackupErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateFileSystemFromBackupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPerUnitStorageThroughput {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPerUnitStorageThroughput {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPerUnitStorageThroughput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPerUnitStorageThroughput")?;
if let Some(inner_26) = &self.message {
{
write!(f, ": {}", inner_26)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPerUnitStorageThroughput {}
pub mod invalid_per_unit_storage_throughput {
#[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::InvalidPerUnitStorageThroughput {
crate::error::InvalidPerUnitStorageThroughput {
message: self.message,
}
}
}
}
impl InvalidPerUnitStorageThroughput {
pub fn builder() -> crate::error::invalid_per_unit_storage_throughput::Builder {
crate::error::invalid_per_unit_storage_throughput::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFileSystemError {
pub kind: CreateFileSystemErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFileSystemError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFileSystemErrorKind {
ActiveDirectoryError(crate::error::ActiveDirectoryError),
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
InvalidExportPath(crate::error::InvalidExportPath),
InvalidImportPath(crate::error::InvalidImportPath),
InvalidNetworkSettings(crate::error::InvalidNetworkSettings),
InvalidPerUnitStorageThroughput(crate::error::InvalidPerUnitStorageThroughput),
MissingFileSystemConfiguration(crate::error::MissingFileSystemConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFileSystemError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFileSystemErrorKind::ActiveDirectoryError(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::InvalidExportPath(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::InvalidImportPath(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::InvalidNetworkSettings(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::InvalidPerUnitStorageThroughput(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::MissingFileSystemConfiguration(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateFileSystemErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFileSystemError {
fn code(&self) -> Option<&str> {
CreateFileSystemError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFileSystemError {
pub fn new(kind: CreateFileSystemErrorKind, 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: CreateFileSystemErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFileSystemErrorKind::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_active_directory_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::ActiveDirectoryError(_)
)
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, CreateFileSystemErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_export_path(&self) -> bool {
matches!(&self.kind, CreateFileSystemErrorKind::InvalidExportPath(_))
}
pub fn is_invalid_import_path(&self) -> bool {
matches!(&self.kind, CreateFileSystemErrorKind::InvalidImportPath(_))
}
pub fn is_invalid_network_settings(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::InvalidNetworkSettings(_)
)
}
pub fn is_invalid_per_unit_storage_throughput(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::InvalidPerUnitStorageThroughput(_)
)
}
pub fn is_missing_file_system_configuration(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::MissingFileSystemConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateFileSystemErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for CreateFileSystemError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFileSystemErrorKind::ActiveDirectoryError(_inner) => Some(_inner),
CreateFileSystemErrorKind::BadRequest(_inner) => Some(_inner),
CreateFileSystemErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateFileSystemErrorKind::InternalServerError(_inner) => Some(_inner),
CreateFileSystemErrorKind::InvalidExportPath(_inner) => Some(_inner),
CreateFileSystemErrorKind::InvalidImportPath(_inner) => Some(_inner),
CreateFileSystemErrorKind::InvalidNetworkSettings(_inner) => Some(_inner),
CreateFileSystemErrorKind::InvalidPerUnitStorageThroughput(_inner) => Some(_inner),
CreateFileSystemErrorKind::MissingFileSystemConfiguration(_inner) => Some(_inner),
CreateFileSystemErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateFileSystemErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidImportPath {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidImportPath {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidImportPath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidImportPath")?;
if let Some(inner_27) = &self.message {
{
write!(f, ": {}", inner_27)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidImportPath {}
pub mod invalid_import_path {
#[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::InvalidImportPath {
crate::error::InvalidImportPath {
message: self.message,
}
}
}
}
impl InvalidImportPath {
pub fn builder() -> crate::error::invalid_import_path::Builder {
crate::error::invalid_import_path::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidExportPath {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidExportPath {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidExportPath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidExportPath")?;
if let Some(inner_28) = &self.message {
{
write!(f, ": {}", inner_28)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidExportPath {}
pub mod invalid_export_path {
#[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::InvalidExportPath {
crate::error::InvalidExportPath {
message: self.message,
}
}
}
}
impl InvalidExportPath {
pub fn builder() -> crate::error::invalid_export_path::Builder {
crate::error::invalid_export_path::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFileCacheError {
pub kind: CreateFileCacheErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFileCacheError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFileCacheErrorKind {
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
InvalidNetworkSettings(crate::error::InvalidNetworkSettings),
InvalidPerUnitStorageThroughput(crate::error::InvalidPerUnitStorageThroughput),
MissingFileCacheConfiguration(crate::error::MissingFileCacheConfiguration),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFileCacheError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFileCacheErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::InvalidNetworkSettings(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::InvalidPerUnitStorageThroughput(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::MissingFileCacheConfiguration(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateFileCacheErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFileCacheError {
fn code(&self) -> Option<&str> {
CreateFileCacheError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFileCacheError {
pub fn new(kind: CreateFileCacheErrorKind, 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: CreateFileCacheErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFileCacheErrorKind::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(&self) -> bool {
matches!(&self.kind, CreateFileCacheErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateFileCacheErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateFileCacheErrorKind::InternalServerError(_))
}
pub fn is_invalid_network_settings(&self) -> bool {
matches!(
&self.kind,
CreateFileCacheErrorKind::InvalidNetworkSettings(_)
)
}
pub fn is_invalid_per_unit_storage_throughput(&self) -> bool {
matches!(
&self.kind,
CreateFileCacheErrorKind::InvalidPerUnitStorageThroughput(_)
)
}
pub fn is_missing_file_cache_configuration(&self) -> bool {
matches!(
&self.kind,
CreateFileCacheErrorKind::MissingFileCacheConfiguration(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateFileCacheErrorKind::ServiceLimitExceeded(_)
)
}
}
impl std::error::Error for CreateFileCacheError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFileCacheErrorKind::BadRequest(_inner) => Some(_inner),
CreateFileCacheErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateFileCacheErrorKind::InternalServerError(_inner) => Some(_inner),
CreateFileCacheErrorKind::InvalidNetworkSettings(_inner) => Some(_inner),
CreateFileCacheErrorKind::InvalidPerUnitStorageThroughput(_inner) => Some(_inner),
CreateFileCacheErrorKind::MissingFileCacheConfiguration(_inner) => Some(_inner),
CreateFileCacheErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateFileCacheErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataRepositoryTaskError {
pub kind: CreateDataRepositoryTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataRepositoryTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataRepositoryTaskErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataRepositoryTaskErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryTaskExecuting(crate::error::DataRepositoryTaskExecuting),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataRepositoryTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataRepositoryTaskErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::DataRepositoryTaskExecuting(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CreateDataRepositoryTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataRepositoryTaskError {
fn code(&self) -> Option<&str> {
CreateDataRepositoryTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataRepositoryTaskError {
pub fn new(kind: CreateDataRepositoryTaskErrorKind, 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: CreateDataRepositoryTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataRepositoryTaskErrorKind::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(&self) -> bool {
matches!(&self.kind, CreateDataRepositoryTaskErrorKind::BadRequest(_))
}
pub fn is_data_repository_task_executing(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::DataRepositoryTaskExecuting(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::FileSystemNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryTaskErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for CreateDataRepositoryTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataRepositoryTaskErrorKind::BadRequest(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::DataRepositoryTaskExecuting(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::InternalServerError(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CreateDataRepositoryTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataRepositoryTaskExecuting {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DataRepositoryTaskExecuting {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataRepositoryTaskExecuting {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataRepositoryTaskExecuting")?;
if let Some(inner_29) = &self.message {
{
write!(f, ": {}", inner_29)?;
}
}
Ok(())
}
}
impl std::error::Error for DataRepositoryTaskExecuting {}
pub mod data_repository_task_executing {
#[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::DataRepositoryTaskExecuting {
crate::error::DataRepositoryTaskExecuting {
message: self.message,
}
}
}
}
impl DataRepositoryTaskExecuting {
pub fn builder() -> crate::error::data_repository_task_executing::Builder {
crate::error::data_repository_task_executing::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDataRepositoryAssociationError {
pub kind: CreateDataRepositoryAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDataRepositoryAssociationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDataRepositoryAssociationErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDataRepositoryAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDataRepositoryAssociationErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateDataRepositoryAssociationErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
_inner.fmt(f)
}
CreateDataRepositoryAssociationErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateDataRepositoryAssociationErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CreateDataRepositoryAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDataRepositoryAssociationError {
fn code(&self) -> Option<&str> {
CreateDataRepositoryAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDataRepositoryAssociationError {
pub fn new(
kind: CreateDataRepositoryAssociationErrorKind,
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: CreateDataRepositoryAssociationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDataRepositoryAssociationErrorKind::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(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::FileSystemNotFound(_)
)
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::InternalServerError(_)
)
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
CreateDataRepositoryAssociationErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for CreateDataRepositoryAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDataRepositoryAssociationErrorKind::BadRequest(_inner) => Some(_inner),
CreateDataRepositoryAssociationErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateDataRepositoryAssociationErrorKind::IncompatibleParameterError(_inner) => {
Some(_inner)
}
CreateDataRepositoryAssociationErrorKind::InternalServerError(_inner) => Some(_inner),
CreateDataRepositoryAssociationErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateDataRepositoryAssociationErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CreateDataRepositoryAssociationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBackupError {
pub kind: CreateBackupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBackupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBackupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBackupErrorKind {
BackupInProgress(crate::error::BackupInProgress),
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
InternalServerError(crate::error::InternalServerError),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
UnsupportedOperation(crate::error::UnsupportedOperation),
VolumeNotFound(crate::error::VolumeNotFound),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBackupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBackupErrorKind::BackupInProgress(_inner) => _inner.fmt(f),
CreateBackupErrorKind::BadRequest(_inner) => _inner.fmt(f),
CreateBackupErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
CreateBackupErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CreateBackupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateBackupErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CreateBackupErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CreateBackupErrorKind::VolumeNotFound(_inner) => _inner.fmt(f),
CreateBackupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBackupError {
fn code(&self) -> Option<&str> {
CreateBackupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBackupError {
pub fn new(kind: CreateBackupErrorKind, 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: CreateBackupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBackupErrorKind::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_backup_in_progress(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::BackupInProgress(_))
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::BadRequest(_))
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::FileSystemNotFound(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CreateBackupErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::InternalServerError(_))
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::ServiceLimitExceeded(_))
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::UnsupportedOperation(_))
}
pub fn is_volume_not_found(&self) -> bool {
matches!(&self.kind, CreateBackupErrorKind::VolumeNotFound(_))
}
}
impl std::error::Error for CreateBackupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBackupErrorKind::BackupInProgress(_inner) => Some(_inner),
CreateBackupErrorKind::BadRequest(_inner) => Some(_inner),
CreateBackupErrorKind::FileSystemNotFound(_inner) => Some(_inner),
CreateBackupErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CreateBackupErrorKind::InternalServerError(_inner) => Some(_inner),
CreateBackupErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CreateBackupErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CreateBackupErrorKind::VolumeNotFound(_inner) => Some(_inner),
CreateBackupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CopyBackupError {
pub kind: CopyBackupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CopyBackupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CopyBackupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CopyBackupErrorKind {
BackupNotFound(crate::error::BackupNotFound),
BadRequest(crate::error::BadRequest),
IncompatibleParameterError(crate::error::IncompatibleParameterError),
IncompatibleRegionForMultiAz(crate::error::IncompatibleRegionForMultiAz),
InternalServerError(crate::error::InternalServerError),
InvalidDestinationKmsKey(crate::error::InvalidDestinationKmsKey),
InvalidRegion(crate::error::InvalidRegion),
InvalidSourceKmsKey(crate::error::InvalidSourceKmsKey),
ServiceLimitExceeded(crate::error::ServiceLimitExceeded),
SourceBackupUnavailable(crate::error::SourceBackupUnavailable),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CopyBackupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CopyBackupErrorKind::BackupNotFound(_inner) => _inner.fmt(f),
CopyBackupErrorKind::BadRequest(_inner) => _inner.fmt(f),
CopyBackupErrorKind::IncompatibleParameterError(_inner) => _inner.fmt(f),
CopyBackupErrorKind::IncompatibleRegionForMultiAz(_inner) => _inner.fmt(f),
CopyBackupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CopyBackupErrorKind::InvalidDestinationKmsKey(_inner) => _inner.fmt(f),
CopyBackupErrorKind::InvalidRegion(_inner) => _inner.fmt(f),
CopyBackupErrorKind::InvalidSourceKmsKey(_inner) => _inner.fmt(f),
CopyBackupErrorKind::ServiceLimitExceeded(_inner) => _inner.fmt(f),
CopyBackupErrorKind::SourceBackupUnavailable(_inner) => _inner.fmt(f),
CopyBackupErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CopyBackupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CopyBackupError {
fn code(&self) -> Option<&str> {
CopyBackupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CopyBackupError {
pub fn new(kind: CopyBackupErrorKind, 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: CopyBackupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CopyBackupErrorKind::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_backup_not_found(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::BackupNotFound(_))
}
pub fn is_bad_request(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::BadRequest(_))
}
pub fn is_incompatible_parameter_error(&self) -> bool {
matches!(
&self.kind,
CopyBackupErrorKind::IncompatibleParameterError(_)
)
}
pub fn is_incompatible_region_for_multi_az(&self) -> bool {
matches!(
&self.kind,
CopyBackupErrorKind::IncompatibleRegionForMultiAz(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::InternalServerError(_))
}
pub fn is_invalid_destination_kms_key(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::InvalidDestinationKmsKey(_))
}
pub fn is_invalid_region(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::InvalidRegion(_))
}
pub fn is_invalid_source_kms_key(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::InvalidSourceKmsKey(_))
}
pub fn is_service_limit_exceeded(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::ServiceLimitExceeded(_))
}
pub fn is_source_backup_unavailable(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::SourceBackupUnavailable(_))
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(&self.kind, CopyBackupErrorKind::UnsupportedOperation(_))
}
}
impl std::error::Error for CopyBackupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CopyBackupErrorKind::BackupNotFound(_inner) => Some(_inner),
CopyBackupErrorKind::BadRequest(_inner) => Some(_inner),
CopyBackupErrorKind::IncompatibleParameterError(_inner) => Some(_inner),
CopyBackupErrorKind::IncompatibleRegionForMultiAz(_inner) => Some(_inner),
CopyBackupErrorKind::InternalServerError(_inner) => Some(_inner),
CopyBackupErrorKind::InvalidDestinationKmsKey(_inner) => Some(_inner),
CopyBackupErrorKind::InvalidRegion(_inner) => Some(_inner),
CopyBackupErrorKind::InvalidSourceKmsKey(_inner) => Some(_inner),
CopyBackupErrorKind::ServiceLimitExceeded(_inner) => Some(_inner),
CopyBackupErrorKind::SourceBackupUnavailable(_inner) => Some(_inner),
CopyBackupErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CopyBackupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SourceBackupUnavailable {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub backup_id: std::option::Option<std::string::String>,
}
impl SourceBackupUnavailable {
pub fn backup_id(&self) -> std::option::Option<&str> {
self.backup_id.as_deref()
}
}
impl SourceBackupUnavailable {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SourceBackupUnavailable {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SourceBackupUnavailable")?;
if let Some(inner_30) = &self.message {
{
write!(f, ": {}", inner_30)?;
}
}
Ok(())
}
}
impl std::error::Error for SourceBackupUnavailable {}
pub mod source_backup_unavailable {
#[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) backup_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn backup_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_id = Some(input.into());
self
}
pub fn set_backup_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_id = input;
self
}
pub fn build(self) -> crate::error::SourceBackupUnavailable {
crate::error::SourceBackupUnavailable {
message: self.message,
backup_id: self.backup_id,
}
}
}
}
impl SourceBackupUnavailable {
pub fn builder() -> crate::error::source_backup_unavailable::Builder {
crate::error::source_backup_unavailable::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSourceKmsKey {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSourceKmsKey {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSourceKmsKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSourceKmsKey")?;
if let Some(inner_31) = &self.message {
{
write!(f, ": {}", inner_31)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSourceKmsKey {}
pub mod invalid_source_kms_key {
#[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::InvalidSourceKmsKey {
crate::error::InvalidSourceKmsKey {
message: self.message,
}
}
}
}
impl InvalidSourceKmsKey {
pub fn builder() -> crate::error::invalid_source_kms_key::Builder {
crate::error::invalid_source_kms_key::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRegion {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRegion {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRegion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRegion")?;
if let Some(inner_32) = &self.message {
{
write!(f, ": {}", inner_32)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRegion {}
pub mod invalid_region {
#[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::InvalidRegion {
crate::error::InvalidRegion {
message: self.message,
}
}
}
}
impl InvalidRegion {
pub fn builder() -> crate::error::invalid_region::Builder {
crate::error::invalid_region::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidDestinationKmsKey {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidDestinationKmsKey {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidDestinationKmsKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidDestinationKmsKey")?;
if let Some(inner_33) = &self.message {
{
write!(f, ": {}", inner_33)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidDestinationKmsKey {}
pub mod invalid_destination_kms_key {
#[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::InvalidDestinationKmsKey {
crate::error::InvalidDestinationKmsKey {
message: self.message,
}
}
}
}
impl InvalidDestinationKmsKey {
pub fn builder() -> crate::error::invalid_destination_kms_key::Builder {
crate::error::invalid_destination_kms_key::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IncompatibleRegionForMultiAz {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IncompatibleRegionForMultiAz {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IncompatibleRegionForMultiAz {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"IncompatibleRegionForMultiAz [IncompatibleRegionForMultiAZ]"
)?;
if let Some(inner_34) = &self.message {
{
write!(f, ": {}", inner_34)?;
}
}
Ok(())
}
}
impl std::error::Error for IncompatibleRegionForMultiAz {}
pub mod incompatible_region_for_multi_az {
#[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::IncompatibleRegionForMultiAz {
crate::error::IncompatibleRegionForMultiAz {
message: self.message,
}
}
}
}
impl IncompatibleRegionForMultiAz {
pub fn builder() -> crate::error::incompatible_region_for_multi_az::Builder {
crate::error::incompatible_region_for_multi_az::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelDataRepositoryTaskError {
pub kind: CancelDataRepositoryTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelDataRepositoryTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelDataRepositoryTaskErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelDataRepositoryTaskErrorKind {
BadRequest(crate::error::BadRequest),
DataRepositoryTaskEnded(crate::error::DataRepositoryTaskEnded),
DataRepositoryTaskNotFound(crate::error::DataRepositoryTaskNotFound),
InternalServerError(crate::error::InternalServerError),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelDataRepositoryTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelDataRepositoryTaskErrorKind::BadRequest(_inner) => _inner.fmt(f),
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskEnded(_inner) => _inner.fmt(f),
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskNotFound(_inner) => _inner.fmt(f),
CancelDataRepositoryTaskErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CancelDataRepositoryTaskErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
CancelDataRepositoryTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelDataRepositoryTaskError {
fn code(&self) -> Option<&str> {
CancelDataRepositoryTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelDataRepositoryTaskError {
pub fn new(kind: CancelDataRepositoryTaskErrorKind, 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: CancelDataRepositoryTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelDataRepositoryTaskErrorKind::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(&self) -> bool {
matches!(&self.kind, CancelDataRepositoryTaskErrorKind::BadRequest(_))
}
pub fn is_data_repository_task_ended(&self) -> bool {
matches!(
&self.kind,
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskEnded(_)
)
}
pub fn is_data_repository_task_not_found(&self) -> bool {
matches!(
&self.kind,
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CancelDataRepositoryTaskErrorKind::InternalServerError(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
CancelDataRepositoryTaskErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for CancelDataRepositoryTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelDataRepositoryTaskErrorKind::BadRequest(_inner) => Some(_inner),
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskEnded(_inner) => Some(_inner),
CancelDataRepositoryTaskErrorKind::DataRepositoryTaskNotFound(_inner) => Some(_inner),
CancelDataRepositoryTaskErrorKind::InternalServerError(_inner) => Some(_inner),
CancelDataRepositoryTaskErrorKind::UnsupportedOperation(_inner) => Some(_inner),
CancelDataRepositoryTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataRepositoryTaskEnded {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DataRepositoryTaskEnded {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataRepositoryTaskEnded {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataRepositoryTaskEnded")?;
if let Some(inner_35) = &self.message {
{
write!(f, ": {}", inner_35)?;
}
}
Ok(())
}
}
impl std::error::Error for DataRepositoryTaskEnded {}
pub mod data_repository_task_ended {
#[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::DataRepositoryTaskEnded {
crate::error::DataRepositoryTaskEnded {
message: self.message,
}
}
}
}
impl DataRepositoryTaskEnded {
pub fn builder() -> crate::error::data_repository_task_ended::Builder {
crate::error::data_repository_task_ended::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateFileSystemAliasesError {
pub kind: AssociateFileSystemAliasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateFileSystemAliasesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateFileSystemAliasesErrorKind {
BadRequest(crate::error::BadRequest),
FileSystemNotFound(crate::error::FileSystemNotFound),
InternalServerError(crate::error::InternalServerError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateFileSystemAliasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateFileSystemAliasesErrorKind::BadRequest(_inner) => _inner.fmt(f),
AssociateFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => _inner.fmt(f),
AssociateFileSystemAliasesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AssociateFileSystemAliasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateFileSystemAliasesError {
fn code(&self) -> Option<&str> {
AssociateFileSystemAliasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateFileSystemAliasesError {
pub fn new(kind: AssociateFileSystemAliasesErrorKind, 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: AssociateFileSystemAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateFileSystemAliasesErrorKind::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(&self) -> bool {
matches!(
&self.kind,
AssociateFileSystemAliasesErrorKind::BadRequest(_)
)
}
pub fn is_file_system_not_found(&self) -> bool {
matches!(
&self.kind,
AssociateFileSystemAliasesErrorKind::FileSystemNotFound(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
AssociateFileSystemAliasesErrorKind::InternalServerError(_)
)
}
}
impl std::error::Error for AssociateFileSystemAliasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateFileSystemAliasesErrorKind::BadRequest(_inner) => Some(_inner),
AssociateFileSystemAliasesErrorKind::FileSystemNotFound(_inner) => Some(_inner),
AssociateFileSystemAliasesErrorKind::InternalServerError(_inner) => Some(_inner),
AssociateFileSystemAliasesErrorKind::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 _)
}
}