#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkspaceImagePermissionError {
pub kind: UpdateWorkspaceImagePermissionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkspaceImagePermissionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkspaceImagePermissionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkspaceImagePermissionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkspaceImagePermissionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkspaceImagePermissionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateWorkspaceImagePermissionErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
UpdateWorkspaceImagePermissionErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
UpdateWorkspaceImagePermissionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateWorkspaceImagePermissionErrorKind::ResourceUnavailableException(_inner) => {
_inner.fmt(f)
}
UpdateWorkspaceImagePermissionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkspaceImagePermissionError {
fn code(&self) -> Option<&str> {
UpdateWorkspaceImagePermissionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateWorkspaceImagePermissionError {
pub fn new(
kind: UpdateWorkspaceImagePermissionErrorKind,
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: UpdateWorkspaceImagePermissionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkspaceImagePermissionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceImagePermissionErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceImagePermissionErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceImagePermissionErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceImagePermissionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceImagePermissionErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for UpdateWorkspaceImagePermissionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkspaceImagePermissionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateWorkspaceImagePermissionErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
UpdateWorkspaceImagePermissionErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
UpdateWorkspaceImagePermissionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateWorkspaceImagePermissionErrorKind::ResourceUnavailableException(_inner) => {
Some(_inner)
}
UpdateWorkspaceImagePermissionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceUnavailableException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
}
impl ResourceUnavailableException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
impl ResourceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceUnavailableException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceUnavailableException {}
pub mod resource_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::error::ResourceUnavailableException {
crate::error::ResourceUnavailableException {
message: self.message,
resource_id: self.resource_id,
}
}
}
}
impl ResourceUnavailableException {
pub fn builder() -> crate::error::resource_unavailable_exception::Builder {
crate::error::resource_unavailable_exception::Builder::default()
}
}
#[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>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
}
}
}
}
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 OperationNotSupportedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<std::string::String>,
}
impl OperationNotSupportedException {
pub fn reason(&self) -> std::option::Option<&str> {
self.reason.as_deref()
}
}
impl OperationNotSupportedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OperationNotSupportedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OperationNotSupportedException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for OperationNotSupportedException {}
pub mod operation_not_supported_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<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 reason(mut self, input: impl Into<std::string::String>) -> Self {
self.reason = Some(input.into());
self
}
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::OperationNotSupportedException {
crate::error::OperationNotSupportedException {
message: self.message,
reason: self.reason,
}
}
}
}
impl OperationNotSupportedException {
pub fn builder() -> crate::error::operation_not_supported_exception::Builder {
crate::error::operation_not_supported_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterValuesException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterValuesException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValuesException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValuesException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValuesException {}
pub mod invalid_parameter_values_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::InvalidParameterValuesException {
crate::error::InvalidParameterValuesException {
message: self.message,
}
}
}
}
impl InvalidParameterValuesException {
pub fn builder() -> crate::error::invalid_parameter_values_exception::Builder {
crate::error::invalid_parameter_values_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkspaceBundleError {
pub kind: UpdateWorkspaceBundleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkspaceBundleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkspaceBundleErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkspaceBundleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkspaceBundleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
UpdateWorkspaceBundleErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
UpdateWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateWorkspaceBundleErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
UpdateWorkspaceBundleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkspaceBundleError {
fn code(&self) -> Option<&str> {
UpdateWorkspaceBundleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateWorkspaceBundleError {
pub fn new(kind: UpdateWorkspaceBundleErrorKind, 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: UpdateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceBundleErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceBundleErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceBundleErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceBundleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkspaceBundleErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for UpdateWorkspaceBundleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkspaceBundleErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
UpdateWorkspaceBundleErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
UpdateWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateWorkspaceBundleErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
UpdateWorkspaceBundleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRulesOfIpGroupError {
pub kind: UpdateRulesOfIpGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRulesOfIpGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRulesOfIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRulesOfIpGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRulesOfIpGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRulesOfIpGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateRulesOfIpGroupErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
UpdateRulesOfIpGroupErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
UpdateRulesOfIpGroupErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
UpdateRulesOfIpGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateRulesOfIpGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRulesOfIpGroupError {
fn code(&self) -> Option<&str> {
UpdateRulesOfIpGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateRulesOfIpGroupError {
pub fn new(kind: UpdateRulesOfIpGroupErrorKind, 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: UpdateRulesOfIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRulesOfIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRulesOfIpGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRulesOfIpGroupErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRulesOfIpGroupErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRulesOfIpGroupErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRulesOfIpGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateRulesOfIpGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRulesOfIpGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateRulesOfIpGroupErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
UpdateRulesOfIpGroupErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
UpdateRulesOfIpGroupErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
UpdateRulesOfIpGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateRulesOfIpGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceLimitExceededException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceLimitExceededException {}
pub mod resource_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::ResourceLimitExceededException {
crate::error::ResourceLimitExceededException {
message: self.message,
}
}
}
}
impl ResourceLimitExceededException {
pub fn builder() -> crate::error::resource_limit_exceeded_exception::Builder {
crate::error::resource_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidResourceStateException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidResourceStateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidResourceStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidResourceStateException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidResourceStateException {}
pub mod invalid_resource_state_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidResourceStateException {
crate::error::InvalidResourceStateException {
message: self.message,
}
}
}
}
impl InvalidResourceStateException {
pub fn builder() -> crate::error::invalid_resource_state_exception::Builder {
crate::error::invalid_resource_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConnectionAliasPermissionError {
pub kind: UpdateConnectionAliasPermissionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConnectionAliasPermissionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConnectionAliasPermissionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConnectionAliasPermissionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateConnectionAliasPermissionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConnectionAliasPermissionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::ResourceAssociatedException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateConnectionAliasPermissionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConnectionAliasPermissionError {
fn code(&self) -> Option<&str> {
UpdateConnectionAliasPermissionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConnectionAliasPermissionError {
pub fn new(
kind: UpdateConnectionAliasPermissionErrorKind,
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: UpdateConnectionAliasPermissionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConnectionAliasPermissionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::ResourceAssociatedException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionAliasPermissionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateConnectionAliasPermissionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConnectionAliasPermissionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateConnectionAliasPermissionErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::ResourceAssociatedException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateConnectionAliasPermissionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAssociatedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceAssociatedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceAssociatedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceAssociatedException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceAssociatedException {}
pub mod resource_associated_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceAssociatedException {
crate::error::ResourceAssociatedException {
message: self.message,
}
}
}
}
impl ResourceAssociatedException {
pub fn builder() -> crate::error::resource_associated_exception::Builder {
crate::error::resource_associated_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConnectClientAddInError {
pub kind: UpdateConnectClientAddInErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConnectClientAddInError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConnectClientAddInErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateConnectClientAddInError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConnectClientAddInErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
UpdateConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateConnectClientAddInErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConnectClientAddInError {
fn code(&self) -> Option<&str> {
UpdateConnectClientAddInError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConnectClientAddInError {
pub fn new(kind: UpdateConnectClientAddInErrorKind, 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: UpdateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectClientAddInErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectClientAddInErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectClientAddInErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateConnectClientAddInError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConnectClientAddInErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
UpdateConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateConnectClientAddInErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TerminateWorkspacesError {
pub kind: TerminateWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TerminateWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TerminateWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TerminateWorkspacesErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TerminateWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TerminateWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TerminateWorkspacesError {
fn code(&self) -> Option<&str> {
TerminateWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TerminateWorkspacesError {
pub fn new(kind: TerminateWorkspacesErrorKind, 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: TerminateWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TerminateWorkspacesErrorKind::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 TerminateWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TerminateWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopWorkspacesError {
pub kind: StopWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopWorkspacesErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopWorkspacesError {
fn code(&self) -> Option<&str> {
StopWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopWorkspacesError {
pub fn new(kind: StopWorkspacesErrorKind, 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: StopWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopWorkspacesErrorKind::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 StopWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartWorkspacesError {
pub kind: StartWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartWorkspacesErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartWorkspacesError {
fn code(&self) -> Option<&str> {
StartWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartWorkspacesError {
pub fn new(kind: StartWorkspacesErrorKind, 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: StartWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartWorkspacesErrorKind::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 StartWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RevokeIpRulesError {
pub kind: RevokeIpRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RevokeIpRulesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RevokeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RevokeIpRulesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RevokeIpRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RevokeIpRulesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RevokeIpRulesErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
RevokeIpRulesErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
RevokeIpRulesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RevokeIpRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RevokeIpRulesError {
fn code(&self) -> Option<&str> {
RevokeIpRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RevokeIpRulesError {
pub fn new(kind: RevokeIpRulesErrorKind, 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: RevokeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RevokeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, RevokeIpRulesErrorKind::AccessDeniedException(_))
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
RevokeIpRulesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
RevokeIpRulesErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RevokeIpRulesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for RevokeIpRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RevokeIpRulesErrorKind::AccessDeniedException(_inner) => Some(_inner),
RevokeIpRulesErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
RevokeIpRulesErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
RevokeIpRulesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RevokeIpRulesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestoreWorkspaceError {
pub kind: RestoreWorkspaceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RestoreWorkspaceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RestoreWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestoreWorkspaceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RestoreWorkspaceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestoreWorkspaceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RestoreWorkspaceErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
RestoreWorkspaceErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
RestoreWorkspaceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RestoreWorkspaceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestoreWorkspaceError {
fn code(&self) -> Option<&str> {
RestoreWorkspaceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestoreWorkspaceError {
pub fn new(kind: RestoreWorkspaceErrorKind, 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: RestoreWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestoreWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RestoreWorkspaceErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
RestoreWorkspaceErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
RestoreWorkspaceErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RestoreWorkspaceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for RestoreWorkspaceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestoreWorkspaceErrorKind::AccessDeniedException(_inner) => Some(_inner),
RestoreWorkspaceErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
RestoreWorkspaceErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
RestoreWorkspaceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RestoreWorkspaceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterWorkspaceDirectoryError {
pub kind: RegisterWorkspaceDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterWorkspaceDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterWorkspaceDirectoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
UnsupportedNetworkConfigurationException(
crate::error::UnsupportedNetworkConfigurationException,
),
WorkspacesDefaultRoleNotFoundException(crate::error::WorkspacesDefaultRoleNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RegisterWorkspaceDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterWorkspaceDirectoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RegisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
RegisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
RegisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
RegisterWorkspaceDirectoryErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
RegisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RegisterWorkspaceDirectoryErrorKind::UnsupportedNetworkConfigurationException(
_inner,
) => _inner.fmt(f),
RegisterWorkspaceDirectoryErrorKind::WorkspacesDefaultRoleNotFoundException(_inner) => {
_inner.fmt(f)
}
RegisterWorkspaceDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterWorkspaceDirectoryError {
fn code(&self) -> Option<&str> {
RegisterWorkspaceDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterWorkspaceDirectoryError {
pub fn new(kind: RegisterWorkspaceDirectoryErrorKind, 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: RegisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_unsupported_network_configuration_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::UnsupportedNetworkConfigurationException(_)
)
}
pub fn is_workspaces_default_role_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RegisterWorkspaceDirectoryErrorKind::WorkspacesDefaultRoleNotFoundException(_)
)
}
}
impl std::error::Error for RegisterWorkspaceDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterWorkspaceDirectoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
RegisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
RegisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
RegisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
RegisterWorkspaceDirectoryErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
RegisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RegisterWorkspaceDirectoryErrorKind::UnsupportedNetworkConfigurationException(
_inner,
) => Some(_inner),
RegisterWorkspaceDirectoryErrorKind::WorkspacesDefaultRoleNotFoundException(_inner) => {
Some(_inner)
}
RegisterWorkspaceDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WorkspacesDefaultRoleNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl WorkspacesDefaultRoleNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for WorkspacesDefaultRoleNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "WorkspacesDefaultRoleNotFoundException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for WorkspacesDefaultRoleNotFoundException {}
pub mod workspaces_default_role_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::WorkspacesDefaultRoleNotFoundException {
crate::error::WorkspacesDefaultRoleNotFoundException {
message: self.message,
}
}
}
}
impl WorkspacesDefaultRoleNotFoundException {
pub fn builder() -> crate::error::workspaces_default_role_not_found_exception::Builder {
crate::error::workspaces_default_role_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedNetworkConfigurationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedNetworkConfigurationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedNetworkConfigurationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedNetworkConfigurationException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedNetworkConfigurationException {}
pub mod unsupported_network_configuration_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedNetworkConfigurationException {
crate::error::UnsupportedNetworkConfigurationException {
message: self.message,
}
}
}
}
impl UnsupportedNetworkConfigurationException {
pub fn builder() -> crate::error::unsupported_network_configuration_exception::Builder {
crate::error::unsupported_network_configuration_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RebuildWorkspacesError {
pub kind: RebuildWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RebuildWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RebuildWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RebuildWorkspacesErrorKind {
OperationNotSupportedException(crate::error::OperationNotSupportedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RebuildWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RebuildWorkspacesErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
RebuildWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RebuildWorkspacesError {
fn code(&self) -> Option<&str> {
RebuildWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RebuildWorkspacesError {
pub fn new(kind: RebuildWorkspacesErrorKind, 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: RebuildWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RebuildWorkspacesErrorKind::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_supported_exception(&self) -> bool {
matches!(
&self.kind,
RebuildWorkspacesErrorKind::OperationNotSupportedException(_)
)
}
}
impl std::error::Error for RebuildWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RebuildWorkspacesErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
RebuildWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RebootWorkspacesError {
pub kind: RebootWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RebootWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RebootWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RebootWorkspacesErrorKind {
OperationNotSupportedException(crate::error::OperationNotSupportedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RebootWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RebootWorkspacesErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
RebootWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RebootWorkspacesError {
fn code(&self) -> Option<&str> {
RebootWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RebootWorkspacesError {
pub fn new(kind: RebootWorkspacesErrorKind, 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: RebootWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RebootWorkspacesErrorKind::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_supported_exception(&self) -> bool {
matches!(
&self.kind,
RebootWorkspacesErrorKind::OperationNotSupportedException(_)
)
}
}
impl std::error::Error for RebootWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RebootWorkspacesErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
RebootWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyWorkspaceStateError {
pub kind: ModifyWorkspaceStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyWorkspaceStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyWorkspaceStateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyWorkspaceStateErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyWorkspaceStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyWorkspaceStateErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
ModifyWorkspaceStateErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
ModifyWorkspaceStateErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
ModifyWorkspaceStateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ModifyWorkspaceStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyWorkspaceStateError {
fn code(&self) -> Option<&str> {
ModifyWorkspaceStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyWorkspaceStateError {
pub fn new(kind: ModifyWorkspaceStateErrorKind, 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: ModifyWorkspaceStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyWorkspaceStateErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceStateErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceStateErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceStateErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceStateErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifyWorkspaceStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyWorkspaceStateErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
ModifyWorkspaceStateErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
ModifyWorkspaceStateErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
ModifyWorkspaceStateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ModifyWorkspaceStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyWorkspacePropertiesError {
pub kind: ModifyWorkspacePropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyWorkspacePropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyWorkspacePropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyWorkspacePropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationInProgressException(crate::error::OperationInProgressException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
UnsupportedWorkspaceConfigurationException(
crate::error::UnsupportedWorkspaceConfigurationException,
),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyWorkspacePropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyWorkspacePropertiesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ModifyWorkspacePropertiesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspacePropertiesErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspacePropertiesErrorKind::OperationInProgressException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspacePropertiesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ModifyWorkspacePropertiesErrorKind::ResourceUnavailableException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspacePropertiesErrorKind::UnsupportedWorkspaceConfigurationException(
_inner,
) => _inner.fmt(f),
ModifyWorkspacePropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyWorkspacePropertiesError {
fn code(&self) -> Option<&str> {
ModifyWorkspacePropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyWorkspacePropertiesError {
pub fn new(kind: ModifyWorkspacePropertiesErrorKind, 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: ModifyWorkspacePropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyWorkspacePropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::OperationInProgressException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::ResourceUnavailableException(_)
)
}
pub fn is_unsupported_workspace_configuration_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspacePropertiesErrorKind::UnsupportedWorkspaceConfigurationException(_)
)
}
}
impl std::error::Error for ModifyWorkspacePropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyWorkspacePropertiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifyWorkspacePropertiesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
ModifyWorkspacePropertiesErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
ModifyWorkspacePropertiesErrorKind::OperationInProgressException(_inner) => {
Some(_inner)
}
ModifyWorkspacePropertiesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ModifyWorkspacePropertiesErrorKind::ResourceUnavailableException(_inner) => {
Some(_inner)
}
ModifyWorkspacePropertiesErrorKind::UnsupportedWorkspaceConfigurationException(
_inner,
) => Some(_inner),
ModifyWorkspacePropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedWorkspaceConfigurationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedWorkspaceConfigurationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedWorkspaceConfigurationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedWorkspaceConfigurationException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedWorkspaceConfigurationException {}
pub mod unsupported_workspace_configuration_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedWorkspaceConfigurationException {
crate::error::UnsupportedWorkspaceConfigurationException {
message: self.message,
}
}
}
}
impl UnsupportedWorkspaceConfigurationException {
pub fn builder() -> crate::error::unsupported_workspace_configuration_exception::Builder {
crate::error::unsupported_workspace_configuration_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OperationInProgressException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OperationInProgressException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OperationInProgressException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OperationInProgressException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for OperationInProgressException {}
pub mod operation_in_progress_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::OperationInProgressException {
crate::error::OperationInProgressException {
message: self.message,
}
}
}
}
impl OperationInProgressException {
pub fn builder() -> crate::error::operation_in_progress_exception::Builder {
crate::error::operation_in_progress_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyWorkspaceCreationPropertiesError {
pub kind: ModifyWorkspaceCreationPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyWorkspaceCreationPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyWorkspaceCreationPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyWorkspaceCreationPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyWorkspaceCreationPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyWorkspaceCreationPropertiesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceCreationPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceCreationPropertiesErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceCreationPropertiesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceCreationPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyWorkspaceCreationPropertiesError {
fn code(&self) -> Option<&str> {
ModifyWorkspaceCreationPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyWorkspaceCreationPropertiesError {
pub fn new(
kind: ModifyWorkspaceCreationPropertiesErrorKind,
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: ModifyWorkspaceCreationPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyWorkspaceCreationPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceCreationPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceCreationPropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceCreationPropertiesErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceCreationPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifyWorkspaceCreationPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyWorkspaceCreationPropertiesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ModifyWorkspaceCreationPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
ModifyWorkspaceCreationPropertiesErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
ModifyWorkspaceCreationPropertiesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ModifyWorkspaceCreationPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyWorkspaceAccessPropertiesError {
pub kind: ModifyWorkspaceAccessPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyWorkspaceAccessPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyWorkspaceAccessPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyWorkspaceAccessPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyWorkspaceAccessPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyWorkspaceAccessPropertiesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceAccessPropertiesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ModifyWorkspaceAccessPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyWorkspaceAccessPropertiesError {
fn code(&self) -> Option<&str> {
ModifyWorkspaceAccessPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyWorkspaceAccessPropertiesError {
pub fn new(
kind: ModifyWorkspaceAccessPropertiesErrorKind,
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: ModifyWorkspaceAccessPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyWorkspaceAccessPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceAccessPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyWorkspaceAccessPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifyWorkspaceAccessPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyWorkspaceAccessPropertiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifyWorkspaceAccessPropertiesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ModifyWorkspaceAccessPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifySelfservicePermissionsError {
pub kind: ModifySelfservicePermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifySelfservicePermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifySelfservicePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifySelfservicePermissionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifySelfservicePermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifySelfservicePermissionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ModifySelfservicePermissionsErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
ModifySelfservicePermissionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ModifySelfservicePermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifySelfservicePermissionsError {
fn code(&self) -> Option<&str> {
ModifySelfservicePermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifySelfservicePermissionsError {
pub fn new(kind: ModifySelfservicePermissionsErrorKind, 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: ModifySelfservicePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifySelfservicePermissionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifySelfservicePermissionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifySelfservicePermissionsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifySelfservicePermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifySelfservicePermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifySelfservicePermissionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifySelfservicePermissionsErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
ModifySelfservicePermissionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ModifySelfservicePermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifySamlPropertiesError {
pub kind: ModifySamlPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifySamlPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifySamlPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifySamlPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifySamlPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifySamlPropertiesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ModifySamlPropertiesErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
ModifySamlPropertiesErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
ModifySamlPropertiesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ModifySamlPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifySamlPropertiesError {
fn code(&self) -> Option<&str> {
ModifySamlPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifySamlPropertiesError {
pub fn new(kind: ModifySamlPropertiesErrorKind, 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: ModifySamlPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifySamlPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifySamlPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifySamlPropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
ModifySamlPropertiesErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifySamlPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifySamlPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifySamlPropertiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifySamlPropertiesErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
ModifySamlPropertiesErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
ModifySamlPropertiesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ModifySamlPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyClientPropertiesError {
pub kind: ModifyClientPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyClientPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyClientPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyClientPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyClientPropertiesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ModifyClientPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
ModifyClientPropertiesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ModifyClientPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyClientPropertiesError {
fn code(&self) -> Option<&str> {
ModifyClientPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyClientPropertiesError {
pub fn new(kind: ModifyClientPropertiesErrorKind, 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: ModifyClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifyClientPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyClientPropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyClientPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifyClientPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyClientPropertiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifyClientPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
ModifyClientPropertiesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ModifyClientPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyCertificateBasedAuthPropertiesError {
pub kind: ModifyCertificateBasedAuthPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyCertificateBasedAuthPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyCertificateBasedAuthPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyCertificateBasedAuthPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyCertificateBasedAuthPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyCertificateBasedAuthPropertiesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ModifyCertificateBasedAuthPropertiesErrorKind::InvalidParameterValuesException(
_inner,
) => _inner.fmt(f),
ModifyCertificateBasedAuthPropertiesErrorKind::OperationNotSupportedException(
_inner,
) => _inner.fmt(f),
ModifyCertificateBasedAuthPropertiesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ModifyCertificateBasedAuthPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyCertificateBasedAuthPropertiesError {
fn code(&self) -> Option<&str> {
ModifyCertificateBasedAuthPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyCertificateBasedAuthPropertiesError {
pub fn new(
kind: ModifyCertificateBasedAuthPropertiesErrorKind,
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: ModifyCertificateBasedAuthPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyCertificateBasedAuthPropertiesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCertificateBasedAuthPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCertificateBasedAuthPropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCertificateBasedAuthPropertiesErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCertificateBasedAuthPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ModifyCertificateBasedAuthPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyCertificateBasedAuthPropertiesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ModifyCertificateBasedAuthPropertiesErrorKind::InvalidParameterValuesException(
_inner,
) => Some(_inner),
ModifyCertificateBasedAuthPropertiesErrorKind::OperationNotSupportedException(
_inner,
) => Some(_inner),
ModifyCertificateBasedAuthPropertiesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ModifyCertificateBasedAuthPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyAccountError {
pub kind: ModifyAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyAccountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyAccountErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyAccountErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ModifyAccountErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
ModifyAccountErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
ModifyAccountErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ModifyAccountErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
ModifyAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyAccountError {
fn code(&self) -> Option<&str> {
ModifyAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyAccountError {
pub fn new(kind: ModifyAccountErrorKind, 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: ModifyAccountErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyAccountErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ModifyAccountErrorKind::AccessDeniedException(_))
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ModifyAccountErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
ModifyAccountErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyAccountErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ModifyAccountErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for ModifyAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyAccountErrorKind::AccessDeniedException(_inner) => Some(_inner),
ModifyAccountErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
ModifyAccountErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
ModifyAccountErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ModifyAccountErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
ModifyAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct MigrateWorkspaceError {
pub kind: MigrateWorkspaceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for MigrateWorkspaceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: MigrateWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum MigrateWorkspaceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationInProgressException(crate::error::OperationInProgressException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for MigrateWorkspaceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
MigrateWorkspaceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::OperationInProgressException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
MigrateWorkspaceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for MigrateWorkspaceError {
fn code(&self) -> Option<&str> {
MigrateWorkspaceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl MigrateWorkspaceError {
pub fn new(kind: MigrateWorkspaceErrorKind, 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: MigrateWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: MigrateWorkspaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::OperationInProgressException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
MigrateWorkspaceErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for MigrateWorkspaceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
MigrateWorkspaceErrorKind::AccessDeniedException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::OperationInProgressException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
MigrateWorkspaceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAvailableManagementCidrRangesError {
pub kind: ListAvailableManagementCidrRangesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAvailableManagementCidrRangesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAvailableManagementCidrRangesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAvailableManagementCidrRangesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAvailableManagementCidrRangesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAvailableManagementCidrRangesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListAvailableManagementCidrRangesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
ListAvailableManagementCidrRangesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAvailableManagementCidrRangesError {
fn code(&self) -> Option<&str> {
ListAvailableManagementCidrRangesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAvailableManagementCidrRangesError {
pub fn new(
kind: ListAvailableManagementCidrRangesErrorKind,
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: ListAvailableManagementCidrRangesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAvailableManagementCidrRangesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListAvailableManagementCidrRangesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ListAvailableManagementCidrRangesErrorKind::InvalidParameterValuesException(_)
)
}
}
impl std::error::Error for ListAvailableManagementCidrRangesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAvailableManagementCidrRangesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListAvailableManagementCidrRangesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
ListAvailableManagementCidrRangesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportWorkspaceImageError {
pub kind: ImportWorkspaceImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportWorkspaceImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportWorkspaceImageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportWorkspaceImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportWorkspaceImageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ImportWorkspaceImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportWorkspaceImageError {
fn code(&self) -> Option<&str> {
ImportWorkspaceImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportWorkspaceImageError {
pub fn new(kind: ImportWorkspaceImageErrorKind, 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: ImportWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportWorkspaceImageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ImportWorkspaceImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportWorkspaceImageErrorKind::AccessDeniedException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ImportWorkspaceImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[allow(missing_docs)] #[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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::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 ImportClientBrandingError {
pub kind: ImportClientBrandingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportClientBrandingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportClientBrandingErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportClientBrandingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportClientBrandingErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ImportClientBrandingErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
ImportClientBrandingErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
ImportClientBrandingErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ImportClientBrandingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportClientBrandingError {
fn code(&self) -> Option<&str> {
ImportClientBrandingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportClientBrandingError {
pub fn new(kind: ImportClientBrandingErrorKind, 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: ImportClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ImportClientBrandingErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
ImportClientBrandingErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ImportClientBrandingErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportClientBrandingErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ImportClientBrandingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportClientBrandingErrorKind::AccessDeniedException(_inner) => Some(_inner),
ImportClientBrandingErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
ImportClientBrandingErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
ImportClientBrandingErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ImportClientBrandingErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateIpGroupsError {
pub kind: DisassociateIpGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateIpGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateIpGroupsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateIpGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateIpGroupsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateIpGroupsErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DisassociateIpGroupsErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
DisassociateIpGroupsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateIpGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateIpGroupsError {
fn code(&self) -> Option<&str> {
DisassociateIpGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateIpGroupsError {
pub fn new(kind: DisassociateIpGroupsErrorKind, 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: DisassociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateIpGroupsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateIpGroupsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateIpGroupsErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateIpGroupsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateIpGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateIpGroupsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateIpGroupsErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DisassociateIpGroupsErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
DisassociateIpGroupsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateIpGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateConnectionAliasError {
pub kind: DisassociateConnectionAliasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateConnectionAliasError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateConnectionAliasErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateConnectionAliasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateConnectionAliasErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DisassociateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
DisassociateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
DisassociateConnectionAliasErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateConnectionAliasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateConnectionAliasError {
fn code(&self) -> Option<&str> {
DisassociateConnectionAliasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateConnectionAliasError {
pub fn new(kind: DisassociateConnectionAliasErrorKind, 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: DisassociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectionAliasErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectionAliasErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectionAliasErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectionAliasErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectionAliasErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateConnectionAliasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateConnectionAliasErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DisassociateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
DisassociateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
DisassociateConnectionAliasErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateConnectionAliasErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspaceSnapshotsError {
pub kind: DescribeWorkspaceSnapshotsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspaceSnapshotsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspaceSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspaceSnapshotsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspaceSnapshotsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspaceSnapshotsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeWorkspaceSnapshotsErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceSnapshotsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeWorkspaceSnapshotsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspaceSnapshotsError {
fn code(&self) -> Option<&str> {
DescribeWorkspaceSnapshotsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspaceSnapshotsError {
pub fn new(kind: DescribeWorkspaceSnapshotsErrorKind, 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: DescribeWorkspaceSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspaceSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceSnapshotsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceSnapshotsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceSnapshotsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeWorkspaceSnapshotsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspaceSnapshotsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeWorkspaceSnapshotsErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeWorkspaceSnapshotsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeWorkspaceSnapshotsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspacesConnectionStatusError {
pub kind: DescribeWorkspacesConnectionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspacesConnectionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspacesConnectionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspacesConnectionStatusErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspacesConnectionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspacesConnectionStatusErrorKind::InvalidParameterValuesException(
_inner,
) => _inner.fmt(f),
DescribeWorkspacesConnectionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspacesConnectionStatusError {
fn code(&self) -> Option<&str> {
DescribeWorkspacesConnectionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspacesConnectionStatusError {
pub fn new(
kind: DescribeWorkspacesConnectionStatusErrorKind,
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: DescribeWorkspacesConnectionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspacesConnectionStatusErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspacesConnectionStatusErrorKind::InvalidParameterValuesException(_)
)
}
}
impl std::error::Error for DescribeWorkspacesConnectionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspacesConnectionStatusErrorKind::InvalidParameterValuesException(
_inner,
) => Some(_inner),
DescribeWorkspacesConnectionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspacesError {
pub kind: DescribeWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspacesErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspacesErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DescribeWorkspacesErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
DescribeWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspacesError {
fn code(&self) -> Option<&str> {
DescribeWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspacesError {
pub fn new(kind: DescribeWorkspacesErrorKind, 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: DescribeWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspacesErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspacesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspacesErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for DescribeWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspacesErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DescribeWorkspacesErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
DescribeWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspaceImagesError {
pub kind: DescribeWorkspaceImagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspaceImagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspaceImagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspaceImagesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspaceImagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspaceImagesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeWorkspaceImagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspaceImagesError {
fn code(&self) -> Option<&str> {
DescribeWorkspaceImagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspaceImagesError {
pub fn new(kind: DescribeWorkspaceImagesErrorKind, 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: DescribeWorkspaceImagesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspaceImagesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceImagesErrorKind::AccessDeniedException(_)
)
}
}
impl std::error::Error for DescribeWorkspaceImagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspaceImagesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeWorkspaceImagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspaceImagePermissionsError {
pub kind: DescribeWorkspaceImagePermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspaceImagePermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspaceImagePermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspaceImagePermissionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspaceImagePermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspaceImagePermissionsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceImagePermissionsErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceImagePermissionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceImagePermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspaceImagePermissionsError {
fn code(&self) -> Option<&str> {
DescribeWorkspaceImagePermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspaceImagePermissionsError {
pub fn new(
kind: DescribeWorkspaceImagePermissionsErrorKind,
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: DescribeWorkspaceImagePermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspaceImagePermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceImagePermissionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceImagePermissionsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceImagePermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeWorkspaceImagePermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspaceImagePermissionsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeWorkspaceImagePermissionsErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeWorkspaceImagePermissionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeWorkspaceImagePermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspaceDirectoriesError {
pub kind: DescribeWorkspaceDirectoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspaceDirectoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspaceDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspaceDirectoriesErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspaceDirectoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspaceDirectoriesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceDirectoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspaceDirectoriesError {
fn code(&self) -> Option<&str> {
DescribeWorkspaceDirectoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspaceDirectoriesError {
pub fn new(kind: DescribeWorkspaceDirectoriesErrorKind, 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: DescribeWorkspaceDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspaceDirectoriesErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceDirectoriesErrorKind::InvalidParameterValuesException(_)
)
}
}
impl std::error::Error for DescribeWorkspaceDirectoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspaceDirectoriesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeWorkspaceDirectoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWorkspaceBundlesError {
pub kind: DescribeWorkspaceBundlesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWorkspaceBundlesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWorkspaceBundlesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWorkspaceBundlesErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWorkspaceBundlesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWorkspaceBundlesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeWorkspaceBundlesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWorkspaceBundlesError {
fn code(&self) -> Option<&str> {
DescribeWorkspaceBundlesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWorkspaceBundlesError {
pub fn new(kind: DescribeWorkspaceBundlesErrorKind, 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: DescribeWorkspaceBundlesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWorkspaceBundlesErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeWorkspaceBundlesErrorKind::InvalidParameterValuesException(_)
)
}
}
impl std::error::Error for DescribeWorkspaceBundlesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWorkspaceBundlesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeWorkspaceBundlesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTagsError {
pub kind: DescribeTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTagsErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTagsError {
fn code(&self) -> Option<&str> {
DescribeTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTagsError {
pub fn new(kind: DescribeTagsErrorKind, 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: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTagsErrorKind::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,
DescribeTagsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeIpGroupsError {
pub kind: DescribeIpGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeIpGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeIpGroupsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeIpGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeIpGroupsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeIpGroupsErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DescribeIpGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeIpGroupsError {
fn code(&self) -> Option<&str> {
DescribeIpGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeIpGroupsError {
pub fn new(kind: DescribeIpGroupsErrorKind, 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: DescribeIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeIpGroupsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeIpGroupsErrorKind::InvalidParameterValuesException(_)
)
}
}
impl std::error::Error for DescribeIpGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeIpGroupsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeIpGroupsErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DescribeIpGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeConnectionAliasPermissionsError {
pub kind: DescribeConnectionAliasPermissionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeConnectionAliasPermissionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeConnectionAliasPermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeConnectionAliasPermissionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeConnectionAliasPermissionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeConnectionAliasPermissionsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeConnectionAliasPermissionsErrorKind::InvalidParameterValuesException(
_inner,
) => _inner.fmt(f),
DescribeConnectionAliasPermissionsErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
DescribeConnectionAliasPermissionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeConnectionAliasPermissionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeConnectionAliasPermissionsError {
fn code(&self) -> Option<&str> {
DescribeConnectionAliasPermissionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeConnectionAliasPermissionsError {
pub fn new(
kind: DescribeConnectionAliasPermissionsErrorKind,
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: DescribeConnectionAliasPermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeConnectionAliasPermissionsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasPermissionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasPermissionsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasPermissionsErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasPermissionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeConnectionAliasPermissionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeConnectionAliasPermissionsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeConnectionAliasPermissionsErrorKind::InvalidParameterValuesException(
_inner,
) => Some(_inner),
DescribeConnectionAliasPermissionsErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
DescribeConnectionAliasPermissionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeConnectionAliasPermissionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeConnectionAliasesError {
pub kind: DescribeConnectionAliasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeConnectionAliasesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeConnectionAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeConnectionAliasesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeConnectionAliasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeConnectionAliasesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeConnectionAliasesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeConnectionAliasesErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
DescribeConnectionAliasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeConnectionAliasesError {
fn code(&self) -> Option<&str> {
DescribeConnectionAliasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeConnectionAliasesError {
pub fn new(kind: DescribeConnectionAliasesErrorKind, 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: DescribeConnectionAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeConnectionAliasesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectionAliasesErrorKind::OperationNotSupportedException(_)
)
}
}
impl std::error::Error for DescribeConnectionAliasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeConnectionAliasesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeConnectionAliasesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeConnectionAliasesErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
DescribeConnectionAliasesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeConnectClientAddInsError {
pub kind: DescribeConnectClientAddInsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeConnectClientAddInsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeConnectClientAddInsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeConnectClientAddInsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeConnectClientAddInsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeConnectClientAddInsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeConnectClientAddInsErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeConnectClientAddInsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeConnectClientAddInsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeConnectClientAddInsError {
fn code(&self) -> Option<&str> {
DescribeConnectClientAddInsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeConnectClientAddInsError {
pub fn new(kind: DescribeConnectClientAddInsErrorKind, 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: DescribeConnectClientAddInsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeConnectClientAddInsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectClientAddInsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectClientAddInsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConnectClientAddInsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeConnectClientAddInsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeConnectClientAddInsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeConnectClientAddInsErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeConnectClientAddInsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeConnectClientAddInsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeClientPropertiesError {
pub kind: DescribeClientPropertiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeClientPropertiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeClientPropertiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeClientPropertiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeClientPropertiesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeClientPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeClientPropertiesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeClientPropertiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeClientPropertiesError {
fn code(&self) -> Option<&str> {
DescribeClientPropertiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeClientPropertiesError {
pub fn new(kind: DescribeClientPropertiesErrorKind, 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: DescribeClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeClientPropertiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientPropertiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientPropertiesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientPropertiesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeClientPropertiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeClientPropertiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeClientPropertiesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeClientPropertiesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeClientPropertiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeClientBrandingError {
pub kind: DescribeClientBrandingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeClientBrandingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeClientBrandingErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeClientBrandingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeClientBrandingErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeClientBrandingErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DescribeClientBrandingErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeClientBrandingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeClientBrandingError {
fn code(&self) -> Option<&str> {
DescribeClientBrandingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeClientBrandingError {
pub fn new(kind: DescribeClientBrandingErrorKind, 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: DescribeClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientBrandingErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientBrandingErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientBrandingErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeClientBrandingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeClientBrandingErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeClientBrandingErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DescribeClientBrandingErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeClientBrandingErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountModificationsError {
pub kind: DescribeAccountModificationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAccountModificationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountModificationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountModificationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountModificationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountModificationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeAccountModificationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountModificationsError {
fn code(&self) -> Option<&str> {
DescribeAccountModificationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAccountModificationsError {
pub fn new(kind: DescribeAccountModificationsErrorKind, 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: DescribeAccountModificationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountModificationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountModificationsErrorKind::AccessDeniedException(_)
)
}
}
impl std::error::Error for DescribeAccountModificationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountModificationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeAccountModificationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountError {
pub kind: DescribeAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountError {
fn code(&self) -> Option<&str> {
DescribeAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAccountError {
pub fn new(kind: DescribeAccountErrorKind, 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: DescribeAccountErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountErrorKind::AccessDeniedException(_)
)
}
}
impl std::error::Error for DescribeAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterWorkspaceDirectoryError {
pub kind: DeregisterWorkspaceDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterWorkspaceDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterWorkspaceDirectoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeregisterWorkspaceDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterWorkspaceDirectoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeregisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DeregisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
DeregisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
DeregisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeregisterWorkspaceDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterWorkspaceDirectoryError {
fn code(&self) -> Option<&str> {
DeregisterWorkspaceDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterWorkspaceDirectoryError {
pub fn new(kind: DeregisterWorkspaceDirectoryErrorKind, 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: DeregisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterWorkspaceDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterWorkspaceDirectoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeregisterWorkspaceDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterWorkspaceDirectoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeregisterWorkspaceDirectoryErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DeregisterWorkspaceDirectoryErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
DeregisterWorkspaceDirectoryErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
DeregisterWorkspaceDirectoryErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeregisterWorkspaceDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkspaceImageError {
pub kind: DeleteWorkspaceImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkspaceImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkspaceImageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkspaceImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkspaceImageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
DeleteWorkspaceImageErrorKind::ResourceAssociatedException(_inner) => _inner.fmt(f),
DeleteWorkspaceImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkspaceImageError {
fn code(&self) -> Option<&str> {
DeleteWorkspaceImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWorkspaceImageError {
pub fn new(kind: DeleteWorkspaceImageErrorKind, 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: DeleteWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceImageErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceImageErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceImageErrorKind::ResourceAssociatedException(_)
)
}
}
impl std::error::Error for DeleteWorkspaceImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkspaceImageErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
DeleteWorkspaceImageErrorKind::ResourceAssociatedException(_inner) => Some(_inner),
DeleteWorkspaceImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkspaceBundleError {
pub kind: DeleteWorkspaceBundleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkspaceBundleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkspaceBundleErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkspaceBundleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkspaceBundleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DeleteWorkspaceBundleErrorKind::ResourceAssociatedException(_inner) => _inner.fmt(f),
DeleteWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWorkspaceBundleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkspaceBundleError {
fn code(&self) -> Option<&str> {
DeleteWorkspaceBundleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWorkspaceBundleError {
pub fn new(kind: DeleteWorkspaceBundleErrorKind, 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: DeleteWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceBundleErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceBundleErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceBundleErrorKind::ResourceAssociatedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkspaceBundleErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteWorkspaceBundleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkspaceBundleErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DeleteWorkspaceBundleErrorKind::ResourceAssociatedException(_inner) => Some(_inner),
DeleteWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWorkspaceBundleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTagsError {
pub kind: DeleteTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTagsErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTagsErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTagsError {
fn code(&self) -> Option<&str> {
DeleteTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTagsError {
pub fn new(kind: DeleteTagsErrorKind, 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: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTagsErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTagsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTagsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTagsErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DeleteTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteIpGroupError {
pub kind: DeleteIpGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteIpGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteIpGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteIpGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteIpGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteIpGroupErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DeleteIpGroupErrorKind::ResourceAssociatedException(_inner) => _inner.fmt(f),
DeleteIpGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteIpGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteIpGroupError {
fn code(&self) -> Option<&str> {
DeleteIpGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteIpGroupError {
pub fn new(kind: DeleteIpGroupErrorKind, 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: DeleteIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteIpGroupErrorKind::AccessDeniedException(_))
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteIpGroupErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
DeleteIpGroupErrorKind::ResourceAssociatedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteIpGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteIpGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteIpGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteIpGroupErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DeleteIpGroupErrorKind::ResourceAssociatedException(_inner) => Some(_inner),
DeleteIpGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteIpGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectionAliasError {
pub kind: DeleteConnectionAliasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConnectionAliasError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectionAliasErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConnectionAliasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectionAliasErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DeleteConnectionAliasErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
DeleteConnectionAliasErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
DeleteConnectionAliasErrorKind::ResourceAssociatedException(_inner) => _inner.fmt(f),
DeleteConnectionAliasErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConnectionAliasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectionAliasError {
fn code(&self) -> Option<&str> {
DeleteConnectionAliasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConnectionAliasError {
pub fn new(kind: DeleteConnectionAliasErrorKind, 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: DeleteConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::ResourceAssociatedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionAliasErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteConnectionAliasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectionAliasErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::ResourceAssociatedException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectionAliasErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectClientAddInError {
pub kind: DeleteConnectClientAddInErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConnectClientAddInError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectClientAddInErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConnectClientAddInError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectClientAddInErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
DeleteConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConnectClientAddInErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectClientAddInError {
fn code(&self) -> Option<&str> {
DeleteConnectClientAddInError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConnectClientAddInError {
pub fn new(kind: DeleteConnectClientAddInErrorKind, 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: DeleteConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectClientAddInErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectClientAddInErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectClientAddInErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteConnectClientAddInError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectClientAddInErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
DeleteConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectClientAddInErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteClientBrandingError {
pub kind: DeleteClientBrandingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteClientBrandingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteClientBrandingErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteClientBrandingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteClientBrandingErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteClientBrandingErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
DeleteClientBrandingErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteClientBrandingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteClientBrandingError {
fn code(&self) -> Option<&str> {
DeleteClientBrandingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteClientBrandingError {
pub fn new(kind: DeleteClientBrandingErrorKind, 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: DeleteClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteClientBrandingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteClientBrandingErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
DeleteClientBrandingErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteClientBrandingErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteClientBrandingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteClientBrandingErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteClientBrandingErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
DeleteClientBrandingErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteClientBrandingErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkspacesError {
pub kind: CreateWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkspacesErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkspacesErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
CreateWorkspacesErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkspacesError {
fn code(&self) -> Option<&str> {
CreateWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWorkspacesError {
pub fn new(kind: CreateWorkspacesErrorKind, 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: CreateWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkspacesErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspacesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspacesErrorKind::ResourceLimitExceededException(_)
)
}
}
impl std::error::Error for CreateWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkspacesErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateWorkspacesErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkspaceImageError {
pub kind: CreateWorkspaceImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkspaceImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkspaceImageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkspaceImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkspaceImageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateWorkspaceImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkspaceImageError {
fn code(&self) -> Option<&str> {
CreateWorkspaceImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWorkspaceImageError {
pub fn new(kind: CreateWorkspaceImageErrorKind, 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: CreateWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceImageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateWorkspaceImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkspaceImageErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateWorkspaceImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkspaceBundleError {
pub kind: CreateWorkspaceBundleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkspaceBundleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkspaceBundleErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkspaceBundleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkspaceBundleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
CreateWorkspaceBundleErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateWorkspaceBundleErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateWorkspaceBundleErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
CreateWorkspaceBundleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkspaceBundleError {
fn code(&self) -> Option<&str> {
CreateWorkspaceBundleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateWorkspaceBundleError {
pub fn new(kind: CreateWorkspaceBundleErrorKind, 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: CreateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkspaceBundleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkspaceBundleErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for CreateWorkspaceBundleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkspaceBundleErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
CreateWorkspaceBundleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUpdatedWorkspaceImageError {
pub kind: CreateUpdatedWorkspaceImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUpdatedWorkspaceImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUpdatedWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUpdatedWorkspaceImageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUpdatedWorkspaceImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUpdatedWorkspaceImageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateUpdatedWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateUpdatedWorkspaceImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUpdatedWorkspaceImageError {
fn code(&self) -> Option<&str> {
CreateUpdatedWorkspaceImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUpdatedWorkspaceImageError {
pub fn new(kind: CreateUpdatedWorkspaceImageErrorKind, 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: CreateUpdatedWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUpdatedWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateUpdatedWorkspaceImageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateUpdatedWorkspaceImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUpdatedWorkspaceImageErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateUpdatedWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
CreateUpdatedWorkspaceImageErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
CreateUpdatedWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
CreateUpdatedWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateUpdatedWorkspaceImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTagsError {
pub kind: CreateTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTagsErrorKind {
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTagsErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
CreateTagsErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateTagsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTagsError {
fn code(&self) -> Option<&str> {
CreateTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTagsError {
pub fn new(kind: CreateTagsErrorKind, 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: CreateTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTagsErrorKind::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_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateTagsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateTagsErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateTagsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTagsErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateTagsErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateTagsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateStandbyWorkspacesError {
pub kind: CreateStandbyWorkspacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateStandbyWorkspacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateStandbyWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateStandbyWorkspacesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateStandbyWorkspacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateStandbyWorkspacesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateStandbyWorkspacesErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
CreateStandbyWorkspacesErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
CreateStandbyWorkspacesErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateStandbyWorkspacesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateStandbyWorkspacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateStandbyWorkspacesError {
fn code(&self) -> Option<&str> {
CreateStandbyWorkspacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateStandbyWorkspacesError {
pub fn new(kind: CreateStandbyWorkspacesErrorKind, 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: CreateStandbyWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateStandbyWorkspacesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateStandbyWorkspacesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateStandbyWorkspacesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
CreateStandbyWorkspacesErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateStandbyWorkspacesErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateStandbyWorkspacesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateStandbyWorkspacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateStandbyWorkspacesErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateStandbyWorkspacesErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
CreateStandbyWorkspacesErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
CreateStandbyWorkspacesErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
CreateStandbyWorkspacesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateStandbyWorkspacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateIpGroupError {
pub kind: CreateIpGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateIpGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateIpGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceCreationFailedException(crate::error::ResourceCreationFailedException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateIpGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateIpGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateIpGroupErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
CreateIpGroupErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateIpGroupErrorKind::ResourceCreationFailedException(_inner) => _inner.fmt(f),
CreateIpGroupErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateIpGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateIpGroupError {
fn code(&self) -> Option<&str> {
CreateIpGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateIpGroupError {
pub fn new(kind: CreateIpGroupErrorKind, 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: CreateIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateIpGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateIpGroupErrorKind::AccessDeniedException(_))
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateIpGroupErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateIpGroupErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_creation_failed_exception(&self) -> bool {
matches!(
&self.kind,
CreateIpGroupErrorKind::ResourceCreationFailedException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateIpGroupErrorKind::ResourceLimitExceededException(_)
)
}
}
impl std::error::Error for CreateIpGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateIpGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateIpGroupErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateIpGroupErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateIpGroupErrorKind::ResourceCreationFailedException(_inner) => Some(_inner),
CreateIpGroupErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateIpGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceCreationFailedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceCreationFailedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceCreationFailedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceCreationFailedException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceCreationFailedException {}
pub mod resource_creation_failed_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceCreationFailedException {
crate::error::ResourceCreationFailedException {
message: self.message,
}
}
}
}
impl ResourceCreationFailedException {
pub fn builder() -> crate::error::resource_creation_failed_exception::Builder {
crate::error::resource_creation_failed_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectionAliasError {
pub kind: CreateConnectionAliasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConnectionAliasError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectionAliasErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConnectionAliasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectionAliasErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
CreateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
CreateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
CreateConnectionAliasErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateConnectionAliasErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateConnectionAliasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectionAliasError {
fn code(&self) -> Option<&str> {
CreateConnectionAliasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectionAliasError {
pub fn new(kind: CreateConnectionAliasErrorKind, 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: CreateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionAliasErrorKind::ResourceLimitExceededException(_)
)
}
}
impl std::error::Error for CreateConnectionAliasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectionAliasErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateConnectionAliasErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectClientAddInError {
pub kind: CreateConnectClientAddInErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConnectClientAddInError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectClientAddInErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceCreationFailedException(crate::error::ResourceCreationFailedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConnectClientAddInError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectClientAddInErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
CreateConnectClientAddInErrorKind::ResourceAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateConnectClientAddInErrorKind::ResourceCreationFailedException(_inner) => {
_inner.fmt(f)
}
CreateConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateConnectClientAddInErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectClientAddInError {
fn code(&self) -> Option<&str> {
CreateConnectClientAddInError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectClientAddInError {
pub fn new(kind: CreateConnectClientAddInErrorKind, 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: CreateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectClientAddInErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectClientAddInErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectClientAddInErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectClientAddInErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_creation_failed_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectClientAddInErrorKind::ResourceCreationFailedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectClientAddInErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateConnectClientAddInError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectClientAddInErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConnectClientAddInErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
CreateConnectClientAddInErrorKind::ResourceAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateConnectClientAddInErrorKind::ResourceCreationFailedException(_inner) => {
Some(_inner)
}
CreateConnectClientAddInErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateConnectClientAddInErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CopyWorkspaceImageError {
pub kind: CopyWorkspaceImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CopyWorkspaceImageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CopyWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CopyWorkspaceImageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceUnavailableException(crate::error::ResourceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CopyWorkspaceImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CopyWorkspaceImageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::ResourceUnavailableException(_inner) => _inner.fmt(f),
CopyWorkspaceImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CopyWorkspaceImageError {
fn code(&self) -> Option<&str> {
CopyWorkspaceImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CopyWorkspaceImageError {
pub fn new(kind: CopyWorkspaceImageErrorKind, 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: CopyWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CopyWorkspaceImageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CopyWorkspaceImageErrorKind::ResourceUnavailableException(_)
)
}
}
impl std::error::Error for CopyWorkspaceImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CopyWorkspaceImageErrorKind::AccessDeniedException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::ResourceUnavailableException(_inner) => Some(_inner),
CopyWorkspaceImageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AuthorizeIpRulesError {
pub kind: AuthorizeIpRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AuthorizeIpRulesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AuthorizeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AuthorizeIpRulesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AuthorizeIpRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AuthorizeIpRulesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AuthorizeIpRulesErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
AuthorizeIpRulesErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
AuthorizeIpRulesErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
AuthorizeIpRulesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AuthorizeIpRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AuthorizeIpRulesError {
fn code(&self) -> Option<&str> {
AuthorizeIpRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AuthorizeIpRulesError {
pub fn new(kind: AuthorizeIpRulesErrorKind, 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: AuthorizeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AuthorizeIpRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeIpRulesErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeIpRulesErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeIpRulesErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeIpRulesErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeIpRulesErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AuthorizeIpRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AuthorizeIpRulesErrorKind::AccessDeniedException(_inner) => Some(_inner),
AuthorizeIpRulesErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
AuthorizeIpRulesErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
AuthorizeIpRulesErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
AuthorizeIpRulesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AuthorizeIpRulesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateIpGroupsError {
pub kind: AssociateIpGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateIpGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateIpGroupsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateIpGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateIpGroupsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::InvalidParameterValuesException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::InvalidResourceStateException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::OperationNotSupportedException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateIpGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateIpGroupsError {
fn code(&self) -> Option<&str> {
AssociateIpGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateIpGroupsError {
pub fn new(kind: AssociateIpGroupsErrorKind, 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: AssociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateIpGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateIpGroupsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateIpGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateIpGroupsErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::InvalidParameterValuesException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::InvalidResourceStateException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::OperationNotSupportedException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateIpGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateConnectionAliasError {
pub kind: AssociateConnectionAliasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateConnectionAliasError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateConnectionAliasErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InvalidParameterValuesException(crate::error::InvalidParameterValuesException),
InvalidResourceStateException(crate::error::InvalidResourceStateException),
OperationNotSupportedException(crate::error::OperationNotSupportedException),
ResourceAssociatedException(crate::error::ResourceAssociatedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateConnectionAliasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateConnectionAliasErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
_inner.fmt(f)
}
AssociateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => {
_inner.fmt(f)
}
AssociateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => {
_inner.fmt(f)
}
AssociateConnectionAliasErrorKind::ResourceAssociatedException(_inner) => _inner.fmt(f),
AssociateConnectionAliasErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateConnectionAliasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateConnectionAliasError {
fn code(&self) -> Option<&str> {
AssociateConnectionAliasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateConnectionAliasError {
pub fn new(kind: AssociateConnectionAliasErrorKind, 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: AssociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateConnectionAliasErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::AccessDeniedException(_)
)
}
pub fn is_invalid_parameter_values_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::InvalidParameterValuesException(_)
)
}
pub fn is_invalid_resource_state_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::InvalidResourceStateException(_)
)
}
pub fn is_operation_not_supported_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::OperationNotSupportedException(_)
)
}
pub fn is_resource_associated_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::ResourceAssociatedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectionAliasErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateConnectionAliasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateConnectionAliasErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateConnectionAliasErrorKind::InvalidParameterValuesException(_inner) => {
Some(_inner)
}
AssociateConnectionAliasErrorKind::InvalidResourceStateException(_inner) => {
Some(_inner)
}
AssociateConnectionAliasErrorKind::OperationNotSupportedException(_inner) => {
Some(_inner)
}
AssociateConnectionAliasErrorKind::ResourceAssociatedException(_inner) => Some(_inner),
AssociateConnectionAliasErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateConnectionAliasErrorKind::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 _)
}
}