#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateStackError {
pub kind: UpdateStackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateStackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateStackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateStackErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateStackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateStackErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateStackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateStackError {
fn code(&self) -> Option<&str> {
UpdateStackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateStackError {
pub fn new(kind: UpdateStackErrorKind, 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: UpdateStackErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateStackErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(&self.kind, UpdateStackErrorKind::InvalidRoleException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, UpdateStackErrorKind::LimitExceededException(_))
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, UpdateStackErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateStackErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateStackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateStackErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateStackErrorKind::IncompatibleImageException(_inner) => Some(_inner),
UpdateStackErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
UpdateStackErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
UpdateStackErrorKind::InvalidRoleException(_inner) => Some(_inner),
UpdateStackErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateStackErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
UpdateStackErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateStackErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateStackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[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_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::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 ResourceInUseException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseException {}
pub mod resource_in_use_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceInUseException {
crate::error::ResourceInUseException {
message: self.message,
}
}
}
}
impl ResourceInUseException {
pub fn builder() -> crate::error::resource_in_use_exception::Builder {
crate::error::resource_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OperationNotPermittedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OperationNotPermittedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OperationNotPermittedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OperationNotPermittedException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for OperationNotPermittedException {}
pub mod operation_not_permitted_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::OperationNotPermittedException {
crate::error::OperationNotPermittedException {
message: self.message,
}
}
}
}
impl OperationNotPermittedException {
pub fn builder() -> crate::error::operation_not_permitted_exception::Builder {
crate::error::operation_not_permitted_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRoleException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRoleException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRoleException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRoleException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRoleException {}
pub mod invalid_role_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidRoleException {
crate::error::InvalidRoleException {
message: self.message,
}
}
}
}
impl InvalidRoleException {
pub fn builder() -> crate::error::invalid_role_exception::Builder {
crate::error::invalid_role_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterCombinationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterCombinationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterCombinationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterCombinationException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterCombinationException {}
pub mod invalid_parameter_combination_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterCombinationException {
crate::error::InvalidParameterCombinationException {
message: self.message,
}
}
}
}
impl InvalidParameterCombinationException {
pub fn builder() -> crate::error::invalid_parameter_combination_exception::Builder {
crate::error::invalid_parameter_combination_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidAccountStatusException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidAccountStatusException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidAccountStatusException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidAccountStatusException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidAccountStatusException {}
pub mod invalid_account_status_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidAccountStatusException {
crate::error::InvalidAccountStatusException {
message: self.message,
}
}
}
}
impl InvalidAccountStatusException {
pub fn builder() -> crate::error::invalid_account_status_exception::Builder {
crate::error::invalid_account_status_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IncompatibleImageException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IncompatibleImageException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IncompatibleImageException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IncompatibleImageException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for IncompatibleImageException {}
pub mod incompatible_image_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::IncompatibleImageException {
crate::error::IncompatibleImageException {
message: self.message,
}
}
}
}
impl IncompatibleImageException {
pub fn builder() -> crate::error::incompatible_image_exception::Builder {
crate::error::incompatible_image_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConcurrentModificationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConcurrentModificationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentModificationException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ConcurrentModificationException {}
pub mod concurrent_modification_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConcurrentModificationException {
crate::error::ConcurrentModificationException {
message: self.message,
}
}
}
}
impl ConcurrentModificationException {
pub fn builder() -> crate::error::concurrent_modification_exception::Builder {
crate::error::concurrent_modification_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateImagePermissionsError {
pub kind: UpdateImagePermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateImagePermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateImagePermissionsErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateImagePermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateImagePermissionsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateImagePermissionsErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
UpdateImagePermissionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateImagePermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateImagePermissionsError {
fn code(&self) -> Option<&str> {
UpdateImagePermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateImagePermissionsError {
pub fn new(kind: UpdateImagePermissionsErrorKind, 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: UpdateImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateImagePermissionsErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePermissionsErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePermissionsErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateImagePermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateImagePermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateImagePermissionsErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateImagePermissionsErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
UpdateImagePermissionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateImagePermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotAvailableException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotAvailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotAvailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotAvailableException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotAvailableException {}
pub mod resource_not_available_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotAvailableException {
crate::error::ResourceNotAvailableException {
message: self.message,
}
}
}
}
impl ResourceNotAvailableException {
pub fn builder() -> crate::error::resource_not_available_exception::Builder {
crate::error::resource_not_available_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFleetError {
pub kind: UpdateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
RequestLimitExceededException(crate::error::RequestLimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::RequestLimitExceededException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFleetError {
fn code(&self) -> Option<&str> {
UpdateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFleetError {
pub fn new(kind: UpdateFleetErrorKind, 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: UpdateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::InvalidRoleException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::LimitExceededException(_))
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_request_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::RequestLimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateFleetErrorKind::IncompatibleImageException(_inner) => Some(_inner),
UpdateFleetErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
UpdateFleetErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
UpdateFleetErrorKind::InvalidRoleException(_inner) => Some(_inner),
UpdateFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateFleetErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
UpdateFleetErrorKind::RequestLimitExceededException(_inner) => Some(_inner),
UpdateFleetErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateFleetErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
UpdateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RequestLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestLimitExceededException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestLimitExceededException {}
pub mod request_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RequestLimitExceededException {
crate::error::RequestLimitExceededException {
message: self.message,
}
}
}
}
impl RequestLimitExceededException {
pub fn builder() -> crate::error::request_limit_exceeded_exception::Builder {
crate::error::request_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEntitlementError {
pub kind: UpdateEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEntitlementErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEntitlementErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateEntitlementErrorKind::EntitlementNotFoundException(_inner) => _inner.fmt(f),
UpdateEntitlementErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
UpdateEntitlementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEntitlementError {
fn code(&self) -> Option<&str> {
UpdateEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEntitlementError {
pub fn new(kind: UpdateEntitlementErrorKind, 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: UpdateEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEntitlementErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEntitlementErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEntitlementErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEntitlementErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEntitlementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEntitlementErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateEntitlementErrorKind::EntitlementNotFoundException(_inner) => Some(_inner),
UpdateEntitlementErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
UpdateEntitlementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EntitlementNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EntitlementNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EntitlementNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EntitlementNotFoundException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for EntitlementNotFoundException {}
pub mod entitlement_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::EntitlementNotFoundException {
crate::error::EntitlementNotFoundException {
message: self.message,
}
}
}
}
impl EntitlementNotFoundException {
pub fn builder() -> crate::error::entitlement_not_found_exception::Builder {
crate::error::entitlement_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDirectoryConfigError {
pub kind: UpdateDirectoryConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDirectoryConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDirectoryConfigErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidRoleException(crate::error::InvalidRoleException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDirectoryConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDirectoryConfigErrorKind::ConcurrentModificationException(_inner) => {
_inner.fmt(f)
}
UpdateDirectoryConfigErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
UpdateDirectoryConfigErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
UpdateDirectoryConfigErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDirectoryConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDirectoryConfigError {
fn code(&self) -> Option<&str> {
UpdateDirectoryConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDirectoryConfigError {
pub fn new(kind: UpdateDirectoryConfigErrorKind, 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: UpdateDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDirectoryConfigErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectoryConfigErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectoryConfigErrorKind::InvalidRoleException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectoryConfigErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectoryConfigErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectoryConfigErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateDirectoryConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDirectoryConfigErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateDirectoryConfigErrorKind::InvalidRoleException(_inner) => Some(_inner),
UpdateDirectoryConfigErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
UpdateDirectoryConfigErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDirectoryConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateApplicationError {
pub kind: UpdateApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateApplicationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateApplicationErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateApplicationError {
fn code(&self) -> Option<&str> {
UpdateApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateApplicationError {
pub fn new(kind: UpdateApplicationErrorKind, 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: UpdateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateApplicationErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateApplicationErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateApplicationErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
UpdateApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
TagResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::LimitExceededException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
TagResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopImageBuilderError {
pub kind: StopImageBuilderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopImageBuilderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopImageBuilderErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopImageBuilderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopImageBuilderErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
StopImageBuilderErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
StopImageBuilderErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopImageBuilderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopImageBuilderError {
fn code(&self) -> Option<&str> {
StopImageBuilderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopImageBuilderError {
pub fn new(kind: StopImageBuilderErrorKind, 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: StopImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopImageBuilderErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
StopImageBuilderErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
StopImageBuilderErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopImageBuilderErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StopImageBuilderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopImageBuilderErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
StopImageBuilderErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
StopImageBuilderErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopImageBuilderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopFleetError {
pub kind: StopFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
StopFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopFleetError {
fn code(&self) -> Option<&str> {
StopFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopFleetError {
pub fn new(kind: StopFleetErrorKind, 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: StopFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
StopFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, StopFleetErrorKind::ResourceNotFoundException(_))
}
}
impl std::error::Error for StopFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
StopFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartImageBuilderError {
pub kind: StartImageBuilderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartImageBuilderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartImageBuilderErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartImageBuilderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartImageBuilderErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
StartImageBuilderErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
StartImageBuilderErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
StartImageBuilderErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
StartImageBuilderErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartImageBuilderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartImageBuilderError {
fn code(&self) -> Option<&str> {
StartImageBuilderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartImageBuilderError {
pub fn new(kind: StartImageBuilderErrorKind, 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: StartImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartImageBuilderErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
StartImageBuilderErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
StartImageBuilderErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
StartImageBuilderErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
StartImageBuilderErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartImageBuilderErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StartImageBuilderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartImageBuilderErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
StartImageBuilderErrorKind::IncompatibleImageException(_inner) => Some(_inner),
StartImageBuilderErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
StartImageBuilderErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
StartImageBuilderErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartImageBuilderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartFleetError {
pub kind: StartFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
RequestLimitExceededException(crate::error::RequestLimitExceededException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
StartFleetErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
StartFleetErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
StartFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartFleetErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
StartFleetErrorKind::RequestLimitExceededException(_inner) => _inner.fmt(f),
StartFleetErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
StartFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartFleetError {
fn code(&self) -> Option<&str> {
StartFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartFleetError {
pub fn new(kind: StartFleetErrorKind, 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: StartFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(&self.kind, StartFleetErrorKind::InvalidRoleException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, StartFleetErrorKind::LimitExceededException(_))
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_request_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::RequestLimitExceededException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StartFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
StartFleetErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
StartFleetErrorKind::InvalidRoleException(_inner) => Some(_inner),
StartFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
StartFleetErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
StartFleetErrorKind::RequestLimitExceededException(_inner) => Some(_inner),
StartFleetErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
StartFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEntitledApplicationsError {
pub kind: ListEntitledApplicationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEntitledApplicationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEntitledApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEntitledApplicationsErrorKind {
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEntitledApplicationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEntitledApplicationsErrorKind::EntitlementNotFoundException(_inner) => {
_inner.fmt(f)
}
ListEntitledApplicationsErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
ListEntitledApplicationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListEntitledApplicationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEntitledApplicationsError {
fn code(&self) -> Option<&str> {
ListEntitledApplicationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEntitledApplicationsError {
pub fn new(kind: ListEntitledApplicationsErrorKind, 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: ListEntitledApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEntitledApplicationsErrorKind::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_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitledApplicationsErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitledApplicationsErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitledApplicationsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListEntitledApplicationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEntitledApplicationsErrorKind::EntitlementNotFoundException(_inner) => Some(_inner),
ListEntitledApplicationsErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
ListEntitledApplicationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListEntitledApplicationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAssociatedStacksError {
pub kind: ListAssociatedStacksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAssociatedStacksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAssociatedStacksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAssociatedStacksErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAssociatedStacksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAssociatedStacksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAssociatedStacksError {
fn code(&self) -> Option<&str> {
ListAssociatedStacksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAssociatedStacksError {
pub fn new(kind: ListAssociatedStacksErrorKind, 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: ListAssociatedStacksErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAssociatedStacksErrorKind::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()
}
}
impl std::error::Error for ListAssociatedStacksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAssociatedStacksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAssociatedFleetsError {
pub kind: ListAssociatedFleetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAssociatedFleetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAssociatedFleetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAssociatedFleetsErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAssociatedFleetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAssociatedFleetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAssociatedFleetsError {
fn code(&self) -> Option<&str> {
ListAssociatedFleetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAssociatedFleetsError {
pub fn new(kind: ListAssociatedFleetsErrorKind, 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: ListAssociatedFleetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAssociatedFleetsErrorKind::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()
}
}
impl std::error::Error for ListAssociatedFleetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAssociatedFleetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExpireSessionError {
pub kind: ExpireSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExpireSessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExpireSessionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExpireSessionErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExpireSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExpireSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExpireSessionError {
fn code(&self) -> Option<&str> {
ExpireSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExpireSessionError {
pub fn new(kind: ExpireSessionErrorKind, 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: ExpireSessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExpireSessionErrorKind::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()
}
}
impl std::error::Error for ExpireSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExpireSessionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableUserError {
pub kind: EnableUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableUserErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableUserErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
EnableUserErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
EnableUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableUserError {
fn code(&self) -> Option<&str> {
EnableUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableUserError {
pub fn new(kind: EnableUserErrorKind, 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: EnableUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableUserErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
EnableUserErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
EnableUserErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for EnableUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableUserErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
EnableUserErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
EnableUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateFleetError {
pub kind: DisassociateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DisassociateFleetErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DisassociateFleetErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DisassociateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateFleetError {
fn code(&self) -> Option<&str> {
DisassociateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateFleetError {
pub fn new(kind: DisassociateFleetErrorKind, 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: DisassociateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateFleetErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DisassociateFleetErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DisassociateFleetErrorKind::ResourceInUseException(_inner) => Some(_inner),
DisassociateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateApplicationFromEntitlementError {
pub kind: DisassociateApplicationFromEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateApplicationFromEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateApplicationFromEntitlementErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateApplicationFromEntitlementErrorKind {
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateApplicationFromEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateApplicationFromEntitlementErrorKind::EntitlementNotFoundException(
_inner,
) => _inner.fmt(f),
DisassociateApplicationFromEntitlementErrorKind::OperationNotPermittedException(
_inner,
) => _inner.fmt(f),
DisassociateApplicationFromEntitlementErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateApplicationFromEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateApplicationFromEntitlementError {
fn code(&self) -> Option<&str> {
DisassociateApplicationFromEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateApplicationFromEntitlementError {
pub fn new(
kind: DisassociateApplicationFromEntitlementErrorKind,
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: DisassociateApplicationFromEntitlementErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateApplicationFromEntitlementErrorKind::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_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFromEntitlementErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFromEntitlementErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFromEntitlementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateApplicationFromEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateApplicationFromEntitlementErrorKind::EntitlementNotFoundException(
_inner,
) => Some(_inner),
DisassociateApplicationFromEntitlementErrorKind::OperationNotPermittedException(
_inner,
) => Some(_inner),
DisassociateApplicationFromEntitlementErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DisassociateApplicationFromEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateApplicationFleetError {
pub kind: DisassociateApplicationFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateApplicationFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateApplicationFleetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateApplicationFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateApplicationFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateApplicationFleetErrorKind::ConcurrentModificationException(_inner) => {
_inner.fmt(f)
}
DisassociateApplicationFleetErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DisassociateApplicationFleetErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
DisassociateApplicationFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateApplicationFleetError {
fn code(&self) -> Option<&str> {
DisassociateApplicationFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateApplicationFleetError {
pub fn new(kind: DisassociateApplicationFleetErrorKind, 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: DisassociateApplicationFleetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateApplicationFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFleetErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateApplicationFleetErrorKind::OperationNotPermittedException(_)
)
}
}
impl std::error::Error for DisassociateApplicationFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateApplicationFleetErrorKind::ConcurrentModificationException(_inner) => {
Some(_inner)
}
DisassociateApplicationFleetErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DisassociateApplicationFleetErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
DisassociateApplicationFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableUserError {
pub kind: DisableUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableUserErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableUserErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisableUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableUserError {
fn code(&self) -> Option<&str> {
DisableUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableUserError {
pub fn new(kind: DisableUserErrorKind, 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: DisableUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableUserErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisableUserErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisableUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableUserErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisableUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUserStackAssociationsError {
pub kind: DescribeUserStackAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUserStackAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUserStackAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUserStackAssociationsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUserStackAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUserStackAssociationsErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
DescribeUserStackAssociationsErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
DescribeUserStackAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUserStackAssociationsError {
fn code(&self) -> Option<&str> {
DescribeUserStackAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUserStackAssociationsError {
pub fn new(
kind: DescribeUserStackAssociationsErrorKind,
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: DescribeUserStackAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUserStackAssociationsErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUserStackAssociationsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUserStackAssociationsErrorKind::OperationNotPermittedException(_)
)
}
}
impl std::error::Error for DescribeUserStackAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUserStackAssociationsErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
DescribeUserStackAssociationsErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
DescribeUserStackAssociationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUsersError {
pub kind: DescribeUsersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUsersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUsersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUsersErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUsersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUsersErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUsersError {
fn code(&self) -> Option<&str> {
DescribeUsersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUsersError {
pub fn new(kind: DescribeUsersErrorKind, 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: DescribeUsersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUsersErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsersErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsersErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsersErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeUsersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUsersErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DescribeUsersErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DescribeUsersErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeUsersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUsageReportSubscriptionsError {
pub kind: DescribeUsageReportSubscriptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUsageReportSubscriptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUsageReportSubscriptionsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUsageReportSubscriptionsErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUsageReportSubscriptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUsageReportSubscriptionsErrorKind::InvalidAccountStatusException(_inner) => {
_inner.fmt(f)
}
DescribeUsageReportSubscriptionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeUsageReportSubscriptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUsageReportSubscriptionsError {
fn code(&self) -> Option<&str> {
DescribeUsageReportSubscriptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUsageReportSubscriptionsError {
pub fn new(
kind: DescribeUsageReportSubscriptionsErrorKind,
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: DescribeUsageReportSubscriptionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUsageReportSubscriptionsErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsageReportSubscriptionsErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsageReportSubscriptionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeUsageReportSubscriptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUsageReportSubscriptionsErrorKind::InvalidAccountStatusException(_inner) => {
Some(_inner)
}
DescribeUsageReportSubscriptionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeUsageReportSubscriptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeStacksError {
pub kind: DescribeStacksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeStacksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeStacksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeStacksErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeStacksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeStacksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeStacksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeStacksError {
fn code(&self) -> Option<&str> {
DescribeStacksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeStacksError {
pub fn new(kind: DescribeStacksErrorKind, 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: DescribeStacksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeStacksErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeStacksErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeStacksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeStacksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeStacksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSessionsError {
pub kind: DescribeSessionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSessionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSessionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSessionsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSessionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSessionsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeSessionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSessionsError {
fn code(&self) -> Option<&str> {
DescribeSessionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSessionsError {
pub fn new(kind: DescribeSessionsErrorKind, 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: DescribeSessionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSessionsErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSessionsErrorKind::InvalidParameterCombinationException(_)
)
}
}
impl std::error::Error for DescribeSessionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSessionsErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DescribeSessionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImagesError {
pub kind: DescribeImagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImagesErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImagesErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeImagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImagesError {
fn code(&self) -> Option<&str> {
DescribeImagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImagesError {
pub fn new(kind: DescribeImagesErrorKind, 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: DescribeImagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImagesErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagesErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImagesErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DescribeImagesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImagePermissionsError {
pub kind: DescribeImagePermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImagePermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImagePermissionsErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImagePermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImagePermissionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeImagePermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImagePermissionsError {
fn code(&self) -> Option<&str> {
DescribeImagePermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImagePermissionsError {
pub fn new(kind: DescribeImagePermissionsErrorKind, 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: DescribeImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImagePermissionsErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImagePermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeImagePermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImagePermissionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeImagePermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeImageBuildersError {
pub kind: DescribeImageBuildersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeImageBuildersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeImageBuildersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeImageBuildersErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeImageBuildersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeImageBuildersErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeImageBuildersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeImageBuildersError {
fn code(&self) -> Option<&str> {
DescribeImageBuildersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeImageBuildersError {
pub fn new(kind: DescribeImageBuildersErrorKind, 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: DescribeImageBuildersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeImageBuildersErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeImageBuildersErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeImageBuildersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeImageBuildersErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeImageBuildersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFleetsError {
pub kind: DescribeFleetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFleetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFleetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFleetsErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFleetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFleetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeFleetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFleetsError {
fn code(&self) -> Option<&str> {
DescribeFleetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFleetsError {
pub fn new(kind: DescribeFleetsErrorKind, 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: DescribeFleetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFleetsErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFleetsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeFleetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFleetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeFleetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEntitlementsError {
pub kind: DescribeEntitlementsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEntitlementsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEntitlementsErrorKind {
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEntitlementsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEntitlementsErrorKind::EntitlementNotFoundException(_inner) => _inner.fmt(f),
DescribeEntitlementsErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DescribeEntitlementsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeEntitlementsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEntitlementsError {
fn code(&self) -> Option<&str> {
DescribeEntitlementsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEntitlementsError {
pub fn new(kind: DescribeEntitlementsErrorKind, 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: DescribeEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEntitlementsErrorKind::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_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEntitlementsErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEntitlementsErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEntitlementsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeEntitlementsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEntitlementsErrorKind::EntitlementNotFoundException(_inner) => Some(_inner),
DescribeEntitlementsErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DescribeEntitlementsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeEntitlementsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDirectoryConfigsError {
pub kind: DescribeDirectoryConfigsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDirectoryConfigsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDirectoryConfigsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDirectoryConfigsErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDirectoryConfigsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDirectoryConfigsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDirectoryConfigsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDirectoryConfigsError {
fn code(&self) -> Option<&str> {
DescribeDirectoryConfigsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDirectoryConfigsError {
pub fn new(kind: DescribeDirectoryConfigsErrorKind, 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: DescribeDirectoryConfigsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDirectoryConfigsErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDirectoryConfigsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDirectoryConfigsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDirectoryConfigsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDirectoryConfigsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeApplicationsError {
pub kind: DescribeApplicationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeApplicationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeApplicationsErrorKind {
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeApplicationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeApplicationsErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DescribeApplicationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeApplicationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeApplicationsError {
fn code(&self) -> Option<&str> {
DescribeApplicationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeApplicationsError {
pub fn new(kind: DescribeApplicationsErrorKind, 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: DescribeApplicationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeApplicationsErrorKind::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_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationsErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeApplicationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeApplicationsErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DescribeApplicationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeApplicationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeApplicationFleetAssociationsError {
pub kind: DescribeApplicationFleetAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeApplicationFleetAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeApplicationFleetAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeApplicationFleetAssociationsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeApplicationFleetAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeApplicationFleetAssociationsErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
DescribeApplicationFleetAssociationsErrorKind::OperationNotPermittedException(
_inner,
) => _inner.fmt(f),
DescribeApplicationFleetAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeApplicationFleetAssociationsError {
fn code(&self) -> Option<&str> {
DescribeApplicationFleetAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeApplicationFleetAssociationsError {
pub fn new(
kind: DescribeApplicationFleetAssociationsErrorKind,
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: DescribeApplicationFleetAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeApplicationFleetAssociationsErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationFleetAssociationsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeApplicationFleetAssociationsErrorKind::OperationNotPermittedException(_)
)
}
}
impl std::error::Error for DescribeApplicationFleetAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeApplicationFleetAssociationsErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
DescribeApplicationFleetAssociationsErrorKind::OperationNotPermittedException(
_inner,
) => Some(_inner),
DescribeApplicationFleetAssociationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAppBlocksError {
pub kind: DescribeAppBlocksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAppBlocksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAppBlocksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAppBlocksErrorKind {
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAppBlocksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAppBlocksErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DescribeAppBlocksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeAppBlocksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAppBlocksError {
fn code(&self) -> Option<&str> {
DescribeAppBlocksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAppBlocksError {
pub fn new(kind: DescribeAppBlocksErrorKind, 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: DescribeAppBlocksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAppBlocksErrorKind::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_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAppBlocksErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAppBlocksErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeAppBlocksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAppBlocksErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DescribeAppBlocksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeAppBlocksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteUserError {
pub kind: DeleteUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteUserErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteUserErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteUserError {
fn code(&self) -> Option<&str> {
DeleteUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteUserError {
pub fn new(kind: DeleteUserErrorKind, 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: DeleteUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteUserErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteUserErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteUserErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteUsageReportSubscriptionError {
pub kind: DeleteUsageReportSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteUsageReportSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteUsageReportSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteUsageReportSubscriptionErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteUsageReportSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_inner) => {
_inner.fmt(f)
}
DeleteUsageReportSubscriptionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteUsageReportSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteUsageReportSubscriptionError {
fn code(&self) -> Option<&str> {
DeleteUsageReportSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteUsageReportSubscriptionError {
pub fn new(
kind: DeleteUsageReportSubscriptionErrorKind,
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: DeleteUsageReportSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteUsageReportSubscriptionErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
DeleteUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteUsageReportSubscriptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteUsageReportSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_inner) => {
Some(_inner)
}
DeleteUsageReportSubscriptionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteUsageReportSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteStackError {
pub kind: DeleteStackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteStackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteStackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteStackErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteStackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteStackErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteStackErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DeleteStackErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteStackErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteStackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteStackError {
fn code(&self) -> Option<&str> {
DeleteStackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteStackError {
pub fn new(kind: DeleteStackErrorKind, 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: DeleteStackErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteStackErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteStackErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DeleteStackErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, DeleteStackErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteStackErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteStackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteStackErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteStackErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DeleteStackErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteStackErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteStackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImagePermissionsError {
pub kind: DeleteImagePermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImagePermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImagePermissionsErrorKind {
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImagePermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImagePermissionsErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
DeleteImagePermissionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteImagePermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImagePermissionsError {
fn code(&self) -> Option<&str> {
DeleteImagePermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImagePermissionsError {
pub fn new(kind: DeleteImagePermissionsErrorKind, 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: DeleteImagePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImagePermissionsErrorKind::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_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePermissionsErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImagePermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteImagePermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImagePermissionsErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
DeleteImagePermissionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteImagePermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImageBuilderError {
pub kind: DeleteImageBuilderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImageBuilderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImageBuilderErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImageBuilderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImageBuilderErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteImageBuilderErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DeleteImageBuilderErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteImageBuilderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImageBuilderError {
fn code(&self) -> Option<&str> {
DeleteImageBuilderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImageBuilderError {
pub fn new(kind: DeleteImageBuilderErrorKind, 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: DeleteImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImageBuilderErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageBuilderErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageBuilderErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageBuilderErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteImageBuilderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImageBuilderErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteImageBuilderErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DeleteImageBuilderErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteImageBuilderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteImageError {
pub kind: DeleteImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteImageErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteImageErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteImageError {
fn code(&self) -> Option<&str> {
DeleteImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteImageError {
pub fn new(kind: DeleteImageErrorKind, 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: DeleteImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteImageErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, DeleteImageErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteImageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteImageErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteImageErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DeleteImageErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFleetError {
pub kind: DeleteFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFleetError {
fn code(&self) -> Option<&str> {
DeleteFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFleetError {
pub fn new(kind: DeleteFleetErrorKind, 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: DeleteFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, DeleteFleetErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteFleetErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEntitlementError {
pub kind: DeleteEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEntitlementErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEntitlementErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteEntitlementErrorKind::EntitlementNotFoundException(_inner) => _inner.fmt(f),
DeleteEntitlementErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DeleteEntitlementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEntitlementError {
fn code(&self) -> Option<&str> {
DeleteEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEntitlementError {
pub fn new(kind: DeleteEntitlementErrorKind, 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: DeleteEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEntitlementErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntitlementErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntitlementErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntitlementErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEntitlementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEntitlementErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteEntitlementErrorKind::EntitlementNotFoundException(_inner) => Some(_inner),
DeleteEntitlementErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DeleteEntitlementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDirectoryConfigError {
pub kind: DeleteDirectoryConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDirectoryConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDirectoryConfigErrorKind {
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDirectoryConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDirectoryConfigErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDirectoryConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDirectoryConfigError {
fn code(&self) -> Option<&str> {
DeleteDirectoryConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDirectoryConfigError {
pub fn new(kind: DeleteDirectoryConfigErrorKind, 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: DeleteDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDirectoryConfigErrorKind::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_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDirectoryConfigErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDirectoryConfigErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDirectoryConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDirectoryConfigErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDirectoryConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteApplicationError {
pub kind: DeleteApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteApplicationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteApplicationErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteApplicationError {
fn code(&self) -> Option<&str> {
DeleteApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteApplicationError {
pub fn new(kind: DeleteApplicationErrorKind, 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: DeleteApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteApplicationErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteApplicationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteApplicationErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteApplicationErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
DeleteApplicationErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAppBlockError {
pub kind: DeleteAppBlockErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAppBlockError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAppBlockErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAppBlockErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAppBlockError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAppBlockErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteAppBlockErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteAppBlockErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAppBlockErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAppBlockError {
fn code(&self) -> Option<&str> {
DeleteAppBlockError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAppBlockError {
pub fn new(kind: DeleteAppBlockErrorKind, 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: DeleteAppBlockErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAppBlockErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAppBlockErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAppBlockErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAppBlockErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteAppBlockError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAppBlockErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteAppBlockErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteAppBlockErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAppBlockErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUserError {
pub kind: CreateUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUserErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUserErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateUserErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateUserErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateUserErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateUserErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUserError {
fn code(&self) -> Option<&str> {
CreateUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUserError {
pub fn new(kind: CreateUserErrorKind, 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: CreateUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUserErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CreateUserErrorKind::LimitExceededException(_))
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::ResourceAlreadyExistsException(_)
)
}
}
impl std::error::Error for CreateUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUserErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateUserErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateUserErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateUserErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateUserErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceAlreadyExistsException")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceAlreadyExistsException {}
pub mod resource_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceAlreadyExistsException {
crate::error::ResourceAlreadyExistsException {
message: self.message,
}
}
}
}
impl ResourceAlreadyExistsException {
pub fn builder() -> crate::error::resource_already_exists_exception::Builder {
crate::error::resource_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUsageReportSubscriptionError {
pub kind: CreateUsageReportSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUsageReportSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUsageReportSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUsageReportSubscriptionErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUsageReportSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_inner) => {
_inner.fmt(f)
}
CreateUsageReportSubscriptionErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
CreateUsageReportSubscriptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateUsageReportSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUsageReportSubscriptionError {
fn code(&self) -> Option<&str> {
CreateUsageReportSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUsageReportSubscriptionError {
pub fn new(
kind: CreateUsageReportSubscriptionErrorKind,
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: CreateUsageReportSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUsageReportSubscriptionErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(
&self.kind,
CreateUsageReportSubscriptionErrorKind::InvalidRoleException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateUsageReportSubscriptionErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateUsageReportSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUsageReportSubscriptionErrorKind::InvalidAccountStatusException(_inner) => {
Some(_inner)
}
CreateUsageReportSubscriptionErrorKind::InvalidRoleException(_inner) => Some(_inner),
CreateUsageReportSubscriptionErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateUsageReportSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUpdatedImageError {
pub kind: CreateUpdatedImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUpdatedImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUpdatedImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUpdatedImageErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUpdatedImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUpdatedImageErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateUpdatedImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUpdatedImageError {
fn code(&self) -> Option<&str> {
CreateUpdatedImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUpdatedImageError {
pub fn new(kind: CreateUpdatedImageErrorKind, 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: CreateUpdatedImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUpdatedImageErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedImageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateUpdatedImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUpdatedImageErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::IncompatibleImageException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateUpdatedImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateStreamingURLError {
pub kind: CreateStreamingURLErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateStreamingURLError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateStreamingURLErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateStreamingURLErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateStreamingURLError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateStreamingURLErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateStreamingURLErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateStreamingURLErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
CreateStreamingURLErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateStreamingURLErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateStreamingURLError {
fn code(&self) -> Option<&str> {
CreateStreamingURLError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateStreamingURLError {
pub fn new(kind: CreateStreamingURLErrorKind, 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: CreateStreamingURLErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateStreamingURLErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateStreamingURLErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateStreamingURLErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
CreateStreamingURLErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateStreamingURLErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateStreamingURLError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateStreamingURLErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateStreamingURLErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateStreamingURLErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
CreateStreamingURLErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateStreamingURLErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateStackError {
pub kind: CreateStackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateStackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateStackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateStackErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateStackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateStackErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateStackErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateStackErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateStackErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
CreateStackErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateStackErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateStackErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateStackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateStackError {
fn code(&self) -> Option<&str> {
CreateStackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateStackError {
pub fn new(kind: CreateStackErrorKind, 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: CreateStackErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateStackErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateStackErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateStackErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateStackErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(&self.kind, CreateStackErrorKind::InvalidRoleException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CreateStackErrorKind::LimitExceededException(_))
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateStackErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateStackErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateStackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateStackErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateStackErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateStackErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateStackErrorKind::InvalidRoleException(_inner) => Some(_inner),
CreateStackErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateStackErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateStackErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateStackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateImageBuilderStreamingURLError {
pub kind: CreateImageBuilderStreamingURLErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateImageBuilderStreamingURLError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateImageBuilderStreamingURLErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateImageBuilderStreamingURLErrorKind {
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateImageBuilderStreamingURLError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateImageBuilderStreamingURLErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
CreateImageBuilderStreamingURLErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateImageBuilderStreamingURLErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateImageBuilderStreamingURLError {
fn code(&self) -> Option<&str> {
CreateImageBuilderStreamingURLError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateImageBuilderStreamingURLError {
pub fn new(
kind: CreateImageBuilderStreamingURLErrorKind,
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: CreateImageBuilderStreamingURLErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateImageBuilderStreamingURLErrorKind::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_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderStreamingURLErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderStreamingURLErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateImageBuilderStreamingURLError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateImageBuilderStreamingURLErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
CreateImageBuilderStreamingURLErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreateImageBuilderStreamingURLErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateImageBuilderError {
pub kind: CreateImageBuilderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateImageBuilderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateImageBuilderErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
RequestLimitExceededException(crate::error::RequestLimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateImageBuilderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateImageBuilderErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateImageBuilderErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::RequestLimitExceededException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateImageBuilderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateImageBuilderError {
fn code(&self) -> Option<&str> {
CreateImageBuilderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateImageBuilderError {
pub fn new(kind: CreateImageBuilderErrorKind, 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: CreateImageBuilderErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateImageBuilderErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::InvalidRoleException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_request_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::RequestLimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateImageBuilderErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateImageBuilderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateImageBuilderErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::IncompatibleImageException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateImageBuilderErrorKind::InvalidRoleException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::RequestLimitExceededException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateImageBuilderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFleetError {
pub kind: CreateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
RequestLimitExceededException(crate::error::RequestLimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::RequestLimitExceededException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFleetError {
fn code(&self) -> Option<&str> {
CreateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFleetError {
pub fn new(kind: CreateFleetErrorKind, 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: CreateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::InvalidRoleException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::LimitExceededException(_))
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_request_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::RequestLimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateFleetErrorKind::IncompatibleImageException(_inner) => Some(_inner),
CreateFleetErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateFleetErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateFleetErrorKind::InvalidRoleException(_inner) => Some(_inner),
CreateFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateFleetErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateFleetErrorKind::RequestLimitExceededException(_inner) => Some(_inner),
CreateFleetErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateFleetErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
CreateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEntitlementError {
pub kind: CreateEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEntitlementErrorKind {
EntitlementAlreadyExistsException(crate::error::EntitlementAlreadyExistsException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEntitlementErrorKind::EntitlementAlreadyExistsException(_inner) => _inner.fmt(f),
CreateEntitlementErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateEntitlementErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateEntitlementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEntitlementError {
fn code(&self) -> Option<&str> {
CreateEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateEntitlementError {
pub fn new(kind: CreateEntitlementErrorKind, 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: CreateEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEntitlementErrorKind::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_entitlement_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateEntitlementErrorKind::EntitlementAlreadyExistsException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEntitlementErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateEntitlementErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEntitlementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEntitlementErrorKind::EntitlementAlreadyExistsException(_inner) => Some(_inner),
CreateEntitlementErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateEntitlementErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateEntitlementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EntitlementAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EntitlementAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EntitlementAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EntitlementAlreadyExistsException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for EntitlementAlreadyExistsException {}
pub mod entitlement_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::EntitlementAlreadyExistsException {
crate::error::EntitlementAlreadyExistsException {
message: self.message,
}
}
}
}
impl EntitlementAlreadyExistsException {
pub fn builder() -> crate::error::entitlement_already_exists_exception::Builder {
crate::error::entitlement_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDirectoryConfigError {
pub kind: CreateDirectoryConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDirectoryConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDirectoryConfigErrorKind {
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
InvalidRoleException(crate::error::InvalidRoleException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDirectoryConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDirectoryConfigErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::InvalidRoleException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDirectoryConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDirectoryConfigError {
fn code(&self) -> Option<&str> {
CreateDirectoryConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDirectoryConfigError {
pub fn new(kind: CreateDirectoryConfigErrorKind, 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: CreateDirectoryConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDirectoryConfigErrorKind::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_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_invalid_role_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::InvalidRoleException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryConfigErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateDirectoryConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDirectoryConfigErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::InvalidRoleException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDirectoryConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateApplicationError {
pub kind: CreateApplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateApplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateApplicationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateApplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateApplicationErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateApplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateApplicationError {
fn code(&self) -> Option<&str> {
CreateApplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateApplicationError {
pub fn new(kind: CreateApplicationErrorKind, 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: CreateApplicationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateApplicationErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateApplicationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateApplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateApplicationErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateApplicationErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateApplicationErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateApplicationErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateApplicationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateApplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAppBlockError {
pub kind: CreateAppBlockErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAppBlockError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAppBlockErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAppBlockErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAppBlockError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAppBlockErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
CreateAppBlockErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAppBlockErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateAppBlockErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateAppBlockErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAppBlockError {
fn code(&self) -> Option<&str> {
CreateAppBlockError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAppBlockError {
pub fn new(kind: CreateAppBlockErrorKind, 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: CreateAppBlockErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAppBlockErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppBlockErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppBlockErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppBlockErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppBlockErrorKind::ResourceAlreadyExistsException(_)
)
}
}
impl std::error::Error for CreateAppBlockError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAppBlockErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
CreateAppBlockErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAppBlockErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateAppBlockErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateAppBlockErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CopyImageError {
pub kind: CopyImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CopyImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CopyImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CopyImageErrorKind {
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotAvailableException(crate::error::ResourceNotAvailableException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CopyImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CopyImageErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
CopyImageErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
CopyImageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CopyImageErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CopyImageErrorKind::ResourceNotAvailableException(_inner) => _inner.fmt(f),
CopyImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CopyImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CopyImageError {
fn code(&self) -> Option<&str> {
CopyImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CopyImageError {
pub fn new(kind: CopyImageErrorKind, 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: CopyImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CopyImageErrorKind::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_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
CopyImageErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
CopyImageErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CopyImageErrorKind::LimitExceededException(_))
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CopyImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_available_exception(&self) -> bool {
matches!(
&self.kind,
CopyImageErrorKind::ResourceNotAvailableException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, CopyImageErrorKind::ResourceNotFoundException(_))
}
}
impl std::error::Error for CopyImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CopyImageErrorKind::IncompatibleImageException(_inner) => Some(_inner),
CopyImageErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
CopyImageErrorKind::LimitExceededException(_inner) => Some(_inner),
CopyImageErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CopyImageErrorKind::ResourceNotAvailableException(_inner) => Some(_inner),
CopyImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CopyImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDisassociateUserStackError {
pub kind: BatchDisassociateUserStackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchDisassociateUserStackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDisassociateUserStackErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDisassociateUserStackErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDisassociateUserStackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDisassociateUserStackErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
BatchDisassociateUserStackErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
BatchDisassociateUserStackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchDisassociateUserStackError {
fn code(&self) -> Option<&str> {
BatchDisassociateUserStackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchDisassociateUserStackError {
pub fn new(kind: BatchDisassociateUserStackErrorKind, 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: BatchDisassociateUserStackErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDisassociateUserStackErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateUserStackErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateUserStackErrorKind::OperationNotPermittedException(_)
)
}
}
impl std::error::Error for BatchDisassociateUserStackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDisassociateUserStackErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
BatchDisassociateUserStackErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
BatchDisassociateUserStackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchAssociateUserStackError {
pub kind: BatchAssociateUserStackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchAssociateUserStackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchAssociateUserStackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchAssociateUserStackErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchAssociateUserStackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchAssociateUserStackErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
BatchAssociateUserStackErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
BatchAssociateUserStackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchAssociateUserStackError {
fn code(&self) -> Option<&str> {
BatchAssociateUserStackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchAssociateUserStackError {
pub fn new(kind: BatchAssociateUserStackErrorKind, 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: BatchAssociateUserStackErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchAssociateUserStackErrorKind::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_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateUserStackErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateUserStackErrorKind::OperationNotPermittedException(_)
)
}
}
impl std::error::Error for BatchAssociateUserStackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchAssociateUserStackErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
BatchAssociateUserStackErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
BatchAssociateUserStackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateFleetError {
pub kind: AssociateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
IncompatibleImageException(crate::error::IncompatibleImageException),
InvalidAccountStatusException(crate::error::InvalidAccountStatusException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateFleetErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::IncompatibleImageException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::InvalidAccountStatusException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateFleetError {
fn code(&self) -> Option<&str> {
AssociateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateFleetError {
pub fn new(kind: AssociateFleetErrorKind, 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: AssociateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_incompatible_image_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::IncompatibleImageException(_)
)
}
pub fn is_invalid_account_status_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::InvalidAccountStatusException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateFleetErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
AssociateFleetErrorKind::IncompatibleImageException(_inner) => Some(_inner),
AssociateFleetErrorKind::InvalidAccountStatusException(_inner) => Some(_inner),
AssociateFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
AssociateFleetErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
AssociateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateApplicationToEntitlementError {
pub kind: AssociateApplicationToEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateApplicationToEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateApplicationToEntitlementErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateApplicationToEntitlementErrorKind {
EntitlementNotFoundException(crate::error::EntitlementNotFoundException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateApplicationToEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateApplicationToEntitlementErrorKind::EntitlementNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationToEntitlementErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationToEntitlementErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationToEntitlementErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationToEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateApplicationToEntitlementError {
fn code(&self) -> Option<&str> {
AssociateApplicationToEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateApplicationToEntitlementError {
pub fn new(
kind: AssociateApplicationToEntitlementErrorKind,
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: AssociateApplicationToEntitlementErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateApplicationToEntitlementErrorKind::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_entitlement_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationToEntitlementErrorKind::EntitlementNotFoundException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationToEntitlementErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationToEntitlementErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationToEntitlementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateApplicationToEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateApplicationToEntitlementErrorKind::EntitlementNotFoundException(_inner) => {
Some(_inner)
}
AssociateApplicationToEntitlementErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
AssociateApplicationToEntitlementErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
AssociateApplicationToEntitlementErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AssociateApplicationToEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateApplicationFleetError {
pub kind: AssociateApplicationFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateApplicationFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateApplicationFleetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateApplicationFleetErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
LimitExceededException(crate::error::LimitExceededException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateApplicationFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateApplicationFleetErrorKind::ConcurrentModificationException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationFleetErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AssociateApplicationFleetErrorKind::OperationNotPermittedException(_inner) => {
_inner.fmt(f)
}
AssociateApplicationFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateApplicationFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateApplicationFleetError {
fn code(&self) -> Option<&str> {
AssociateApplicationFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateApplicationFleetError {
pub fn new(kind: AssociateApplicationFleetErrorKind, 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: AssociateApplicationFleetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateApplicationFleetErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationFleetErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationFleetErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationFleetErrorKind::LimitExceededException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationFleetErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateApplicationFleetErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateApplicationFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateApplicationFleetErrorKind::ConcurrentModificationException(_inner) => {
Some(_inner)
}
AssociateApplicationFleetErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
AssociateApplicationFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
AssociateApplicationFleetErrorKind::OperationNotPermittedException(_inner) => {
Some(_inner)
}
AssociateApplicationFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateApplicationFleetErrorKind::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 _)
}
}