#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutResourceAttributesError {
pub kind: PutResourceAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutResourceAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutResourceAttributesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutResourceAttributesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutResourceAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutResourceAttributesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
PutResourceAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutResourceAttributesError {
fn code(&self) -> Option<&str> {
PutResourceAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutResourceAttributesError {
pub fn new(kind: PutResourceAttributesErrorKind, 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: PutResourceAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutResourceAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
PutResourceAttributesErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for PutResourceAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutResourceAttributesErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::DryRunOperation(_inner) => Some(_inner),
PutResourceAttributesErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::InternalServerError(_inner) => Some(_inner),
PutResourceAttributesErrorKind::InvalidInputException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::ThrottlingException(_inner) => Some(_inner),
PutResourceAttributesErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
PutResourceAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnauthorizedOperation {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnauthorizedOperation {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedOperation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedOperation")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UnauthorizedOperation {}
pub mod unauthorized_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedOperation {
crate::error::UnauthorizedOperation {
message: self.message,
}
}
}
}
impl UnauthorizedOperation {
pub fn builder() -> crate::error::unauthorized_operation::Builder {
crate::error::unauthorized_operation::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl ThrottlingException {
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidInputException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidInputException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidInputException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidInputException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidInputException {}
pub mod invalid_input_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidInputException {
crate::error::InvalidInputException {
message: self.message,
}
}
}
}
impl InvalidInputException {
pub fn builder() -> crate::error::invalid_input_exception::Builder {
crate::error::invalid_input_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerError {
#[allow(missing_docs)] #[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_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::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 HomeRegionNotSetException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl HomeRegionNotSetException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for HomeRegionNotSetException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "HomeRegionNotSetException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for HomeRegionNotSetException {}
pub mod home_region_not_set_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::HomeRegionNotSetException {
crate::error::HomeRegionNotSetException {
message: self.message,
}
}
}
}
impl HomeRegionNotSetException {
pub fn builder() -> crate::error::home_region_not_set_exception::Builder {
crate::error::home_region_not_set_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DryRunOperation {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DryRunOperation {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DryRunOperation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DryRunOperation")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for DryRunOperation {}
pub mod dry_run_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::DryRunOperation {
crate::error::DryRunOperation {
message: self.message,
}
}
}
}
impl DryRunOperation {
pub fn builder() -> crate::error::dry_run_operation::Builder {
crate::error::dry_run_operation::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct NotifyMigrationTaskStateError {
pub kind: NotifyMigrationTaskStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for NotifyMigrationTaskStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: NotifyMigrationTaskStateErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum NotifyMigrationTaskStateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for NotifyMigrationTaskStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
NotifyMigrationTaskStateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::InternalServerError(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
NotifyMigrationTaskStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for NotifyMigrationTaskStateError {
fn code(&self) -> Option<&str> {
NotifyMigrationTaskStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl NotifyMigrationTaskStateError {
pub fn new(kind: NotifyMigrationTaskStateErrorKind, 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: NotifyMigrationTaskStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: NotifyMigrationTaskStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
NotifyMigrationTaskStateErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for NotifyMigrationTaskStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
NotifyMigrationTaskStateErrorKind::AccessDeniedException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::DryRunOperation(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::InternalServerError(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::InvalidInputException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::ThrottlingException(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
NotifyMigrationTaskStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct NotifyApplicationStateError {
pub kind: NotifyApplicationStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for NotifyApplicationStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: NotifyApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum NotifyApplicationStateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
PolicyErrorException(crate::error::PolicyErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for NotifyApplicationStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
NotifyApplicationStateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::InternalServerError(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::PolicyErrorException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
NotifyApplicationStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for NotifyApplicationStateError {
fn code(&self) -> Option<&str> {
NotifyApplicationStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl NotifyApplicationStateError {
pub fn new(kind: NotifyApplicationStateErrorKind, 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: NotifyApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: NotifyApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::InvalidInputException(_)
)
}
pub fn is_policy_error_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::PolicyErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
NotifyApplicationStateErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for NotifyApplicationStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
NotifyApplicationStateErrorKind::AccessDeniedException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::DryRunOperation(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::InternalServerError(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::InvalidInputException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::PolicyErrorException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::ThrottlingException(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
NotifyApplicationStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PolicyErrorException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PolicyErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PolicyErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PolicyErrorException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for PolicyErrorException {}
pub mod policy_error_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PolicyErrorException {
crate::error::PolicyErrorException {
message: self.message,
}
}
}
}
impl PolicyErrorException {
pub fn builder() -> crate::error::policy_error_exception::Builder {
crate::error::policy_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListProgressUpdateStreamsError {
pub kind: ListProgressUpdateStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListProgressUpdateStreamsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListProgressUpdateStreamsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListProgressUpdateStreamsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListProgressUpdateStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListProgressUpdateStreamsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListProgressUpdateStreamsErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ListProgressUpdateStreamsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListProgressUpdateStreamsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListProgressUpdateStreamsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListProgressUpdateStreamsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListProgressUpdateStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListProgressUpdateStreamsError {
fn code(&self) -> Option<&str> {
ListProgressUpdateStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListProgressUpdateStreamsError {
pub fn new(kind: ListProgressUpdateStreamsErrorKind, 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: ListProgressUpdateStreamsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListProgressUpdateStreamsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::InvalidInputException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListProgressUpdateStreamsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListProgressUpdateStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListProgressUpdateStreamsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::InternalServerError(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListProgressUpdateStreamsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMigrationTasksError {
pub kind: ListMigrationTasksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListMigrationTasksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListMigrationTasksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMigrationTasksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
PolicyErrorException(crate::error::PolicyErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListMigrationTasksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMigrationTasksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::PolicyErrorException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListMigrationTasksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMigrationTasksError {
fn code(&self) -> Option<&str> {
ListMigrationTasksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMigrationTasksError {
pub fn new(kind: ListMigrationTasksErrorKind, 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: ListMigrationTasksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMigrationTasksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::InvalidInputException(_)
)
}
pub fn is_policy_error_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::PolicyErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListMigrationTasksErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListMigrationTasksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMigrationTasksErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::InternalServerError(_inner) => Some(_inner),
ListMigrationTasksErrorKind::InvalidInputException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::PolicyErrorException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::ThrottlingException(_inner) => Some(_inner),
ListMigrationTasksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDiscoveredResourcesError {
pub kind: ListDiscoveredResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDiscoveredResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDiscoveredResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDiscoveredResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDiscoveredResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDiscoveredResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDiscoveredResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDiscoveredResourcesError {
fn code(&self) -> Option<&str> {
ListDiscoveredResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDiscoveredResourcesError {
pub fn new(kind: ListDiscoveredResourcesErrorKind, 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: ListDiscoveredResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDiscoveredResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDiscoveredResourcesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListDiscoveredResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDiscoveredResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::InternalServerError(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDiscoveredResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCreatedArtifactsError {
pub kind: ListCreatedArtifactsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCreatedArtifactsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCreatedArtifactsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCreatedArtifactsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCreatedArtifactsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCreatedArtifactsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListCreatedArtifactsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCreatedArtifactsError {
fn code(&self) -> Option<&str> {
ListCreatedArtifactsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCreatedArtifactsError {
pub fn new(kind: ListCreatedArtifactsErrorKind, 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: ListCreatedArtifactsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCreatedArtifactsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListCreatedArtifactsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListCreatedArtifactsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCreatedArtifactsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::InternalServerError(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListCreatedArtifactsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListApplicationStatesError {
pub kind: ListApplicationStatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListApplicationStatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListApplicationStatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListApplicationStatesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListApplicationStatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListApplicationStatesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListApplicationStatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListApplicationStatesError {
fn code(&self) -> Option<&str> {
ListApplicationStatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListApplicationStatesError {
pub fn new(kind: ListApplicationStatesErrorKind, 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: ListApplicationStatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListApplicationStatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::InvalidInputException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListApplicationStatesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListApplicationStatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListApplicationStatesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListApplicationStatesErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ListApplicationStatesErrorKind::InternalServerError(_inner) => Some(_inner),
ListApplicationStatesErrorKind::InvalidInputException(_inner) => Some(_inner),
ListApplicationStatesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListApplicationStatesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListApplicationStatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportMigrationTaskError {
pub kind: ImportMigrationTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportMigrationTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportMigrationTaskErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportMigrationTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportMigrationTaskErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
ImportMigrationTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportMigrationTaskError {
fn code(&self) -> Option<&str> {
ImportMigrationTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportMigrationTaskError {
pub fn new(kind: ImportMigrationTaskErrorKind, 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: ImportMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(&self.kind, ImportMigrationTaskErrorKind::DryRunOperation(_))
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
ImportMigrationTaskErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for ImportMigrationTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportMigrationTaskErrorKind::AccessDeniedException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::DryRunOperation(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::InternalServerError(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::InvalidInputException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::ThrottlingException(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
ImportMigrationTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateDiscoveredResourceError {
pub kind: DisassociateDiscoveredResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateDiscoveredResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateDiscoveredResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateDiscoveredResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateDiscoveredResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_inner) => {
_inner.fmt(f)
}
DisassociateDiscoveredResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateDiscoveredResourceErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DisassociateDiscoveredResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
DisassociateDiscoveredResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateDiscoveredResourceError {
fn code(&self) -> Option<&str> {
DisassociateDiscoveredResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateDiscoveredResourceError {
pub fn new(
kind: DisassociateDiscoveredResourceErrorKind,
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: DisassociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
DisassociateDiscoveredResourceErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for DisassociateDiscoveredResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateDiscoveredResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::DryRunOperation(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_inner) => {
Some(_inner)
}
DisassociateDiscoveredResourceErrorKind::InternalServerError(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DisassociateDiscoveredResourceErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DisassociateDiscoveredResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
DisassociateDiscoveredResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateCreatedArtifactError {
pub kind: DisassociateCreatedArtifactErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateCreatedArtifactError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateCreatedArtifactErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateCreatedArtifactError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateCreatedArtifactErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::HomeRegionNotSetException(_inner) => {
_inner.fmt(f)
}
DisassociateCreatedArtifactErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateCreatedArtifactErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DisassociateCreatedArtifactErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
DisassociateCreatedArtifactErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateCreatedArtifactError {
fn code(&self) -> Option<&str> {
DisassociateCreatedArtifactError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateCreatedArtifactError {
pub fn new(kind: DisassociateCreatedArtifactErrorKind, 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: DisassociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
DisassociateCreatedArtifactErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for DisassociateCreatedArtifactError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateCreatedArtifactErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::DryRunOperation(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::InternalServerError(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::InvalidInputException(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DisassociateCreatedArtifactErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
DisassociateCreatedArtifactErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeMigrationTaskError {
pub kind: DescribeMigrationTaskErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeMigrationTaskError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeMigrationTaskErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeMigrationTaskError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeMigrationTaskErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeMigrationTaskErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeMigrationTaskError {
fn code(&self) -> Option<&str> {
DescribeMigrationTaskError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeMigrationTaskError {
pub fn new(kind: DescribeMigrationTaskErrorKind, 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: DescribeMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeMigrationTaskErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMigrationTaskErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeMigrationTaskError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeMigrationTaskErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeMigrationTaskErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeApplicationStateError {
pub kind: DescribeApplicationStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeApplicationStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeApplicationStateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
PolicyErrorException(crate::error::PolicyErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeApplicationStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeApplicationStateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::PolicyErrorException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeApplicationStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeApplicationStateError {
fn code(&self) -> Option<&str> {
DescribeApplicationStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeApplicationStateError {
pub fn new(kind: DescribeApplicationStateErrorKind, 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: DescribeApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeApplicationStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::AccessDeniedException(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::InvalidInputException(_)
)
}
pub fn is_policy_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::PolicyErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationStateErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeApplicationStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeApplicationStateErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::InvalidInputException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::PolicyErrorException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeApplicationStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteProgressUpdateStreamError {
pub kind: DeleteProgressUpdateStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteProgressUpdateStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteProgressUpdateStreamErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteProgressUpdateStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteProgressUpdateStreamErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DeleteProgressUpdateStreamErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
DeleteProgressUpdateStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteProgressUpdateStreamError {
fn code(&self) -> Option<&str> {
DeleteProgressUpdateStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteProgressUpdateStreamError {
pub fn new(kind: DeleteProgressUpdateStreamErrorKind, 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: DeleteProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
DeleteProgressUpdateStreamErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for DeleteProgressUpdateStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteProgressUpdateStreamErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::DryRunOperation(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::InvalidInputException(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DeleteProgressUpdateStreamErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
DeleteProgressUpdateStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateProgressUpdateStreamError {
pub kind: CreateProgressUpdateStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateProgressUpdateStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateProgressUpdateStreamErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateProgressUpdateStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateProgressUpdateStreamErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
CreateProgressUpdateStreamErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
CreateProgressUpdateStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateProgressUpdateStreamError {
fn code(&self) -> Option<&str> {
CreateProgressUpdateStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateProgressUpdateStreamError {
pub fn new(kind: CreateProgressUpdateStreamErrorKind, 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: CreateProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateProgressUpdateStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::InvalidInputException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
CreateProgressUpdateStreamErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for CreateProgressUpdateStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateProgressUpdateStreamErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::DryRunOperation(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::InternalServerError(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::InvalidInputException(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
CreateProgressUpdateStreamErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
CreateProgressUpdateStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateDiscoveredResourceError {
pub kind: AssociateDiscoveredResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateDiscoveredResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateDiscoveredResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
PolicyErrorException(crate::error::PolicyErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateDiscoveredResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateDiscoveredResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_inner) => {
_inner.fmt(f)
}
AssociateDiscoveredResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::PolicyErrorException(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateDiscoveredResourceErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
AssociateDiscoveredResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
AssociateDiscoveredResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateDiscoveredResourceError {
fn code(&self) -> Option<&str> {
AssociateDiscoveredResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateDiscoveredResourceError {
pub fn new(kind: AssociateDiscoveredResourceErrorKind, 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: AssociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateDiscoveredResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::InvalidInputException(_)
)
}
pub fn is_policy_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::PolicyErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
AssociateDiscoveredResourceErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for AssociateDiscoveredResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateDiscoveredResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::DryRunOperation(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::InternalServerError(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::InvalidInputException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::PolicyErrorException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
AssociateDiscoveredResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
AssociateDiscoveredResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateCreatedArtifactError {
pub kind: AssociateCreatedArtifactErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateCreatedArtifactError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateCreatedArtifactErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DryRunOperation(crate::error::DryRunOperation),
HomeRegionNotSetException(crate::error::HomeRegionNotSetException),
InternalServerError(crate::error::InternalServerError),
InvalidInputException(crate::error::InvalidInputException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedOperation(crate::error::UnauthorizedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateCreatedArtifactError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateCreatedArtifactErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::DryRunOperation(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::HomeRegionNotSetException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::UnauthorizedOperation(_inner) => _inner.fmt(f),
AssociateCreatedArtifactErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateCreatedArtifactError {
fn code(&self) -> Option<&str> {
AssociateCreatedArtifactError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateCreatedArtifactError {
pub fn new(kind: AssociateCreatedArtifactErrorKind, 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: AssociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateCreatedArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::AccessDeniedException(_)
)
}
pub fn is_dry_run_operation(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::DryRunOperation(_)
)
}
pub fn is_home_region_not_set_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::HomeRegionNotSetException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::InvalidInputException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_operation(&self) -> bool {
matches!(
&self.kind,
AssociateCreatedArtifactErrorKind::UnauthorizedOperation(_)
)
}
}
impl std::error::Error for AssociateCreatedArtifactError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateCreatedArtifactErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::DryRunOperation(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::HomeRegionNotSetException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::InternalServerError(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::InvalidInputException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::UnauthorizedOperation(_inner) => Some(_inner),
AssociateCreatedArtifactErrorKind::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 _)
}
}