#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct VerifyTrustError {
pub kind: VerifyTrustErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for VerifyTrustError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: VerifyTrustErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum VerifyTrustErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for VerifyTrustError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
VerifyTrustErrorKind::ClientException(_inner) => _inner.fmt(f),
VerifyTrustErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
VerifyTrustErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
VerifyTrustErrorKind::ServiceException(_inner) => _inner.fmt(f),
VerifyTrustErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
VerifyTrustErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for VerifyTrustError {
fn code(&self) -> Option<&str> {
VerifyTrustError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl VerifyTrustError {
pub fn new(kind: VerifyTrustErrorKind, 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: VerifyTrustErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: VerifyTrustErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, VerifyTrustErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
VerifyTrustErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
VerifyTrustErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, VerifyTrustErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
VerifyTrustErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for VerifyTrustError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
VerifyTrustErrorKind::ClientException(_inner) => Some(_inner),
VerifyTrustErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
VerifyTrustErrorKind::InvalidParameterException(_inner) => Some(_inner),
VerifyTrustErrorKind::ServiceException(_inner) => Some(_inner),
VerifyTrustErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
VerifyTrustErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedOperationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl UnsupportedOperationException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl UnsupportedOperationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedOperationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedOperationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedOperationException {}
pub mod unsupported_operation_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::UnsupportedOperationException {
crate::error::UnsupportedOperationException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl UnsupportedOperationException {
pub fn builder() -> crate::error::unsupported_operation_exception::Builder {
crate::error::unsupported_operation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl ServiceException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl ServiceException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceException {}
pub mod service_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::ServiceException {
crate::error::ServiceException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl ServiceException {
pub fn builder() -> crate::error::service_exception::Builder {
crate::error::service_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidParameterException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EntityDoesNotExistException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl EntityDoesNotExistException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl EntityDoesNotExistException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EntityDoesNotExistException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EntityDoesNotExistException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for EntityDoesNotExistException {}
pub mod entity_does_not_exist_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::EntityDoesNotExistException {
crate::error::EntityDoesNotExistException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl EntityDoesNotExistException {
pub fn builder() -> crate::error::entity_does_not_exist_exception::Builder {
crate::error::entity_does_not_exist_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClientException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl ClientException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl ClientException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ClientException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ClientException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ClientException {}
pub mod client_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::ClientException {
crate::error::ClientException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl ClientException {
pub fn builder() -> crate::error::client_exception::Builder {
crate::error::client_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateTrustError {
pub kind: UpdateTrustErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateTrustError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateTrustErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateTrustErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateTrustError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateTrustErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateTrustErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
UpdateTrustErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateTrustErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateTrustErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateTrustError {
fn code(&self) -> Option<&str> {
UpdateTrustError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateTrustError {
pub fn new(kind: UpdateTrustErrorKind, 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: UpdateTrustErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateTrustErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, UpdateTrustErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTrustErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTrustErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, UpdateTrustErrorKind::ServiceException(_))
}
}
impl std::error::Error for UpdateTrustError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateTrustErrorKind::ClientException(_inner) => Some(_inner),
UpdateTrustErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
UpdateTrustErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateTrustErrorKind::ServiceException(_inner) => Some(_inner),
UpdateTrustErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSettingsError {
pub kind: UpdateSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSettingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSettingsErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
IncompatibleSettingsException(crate::error::IncompatibleSettingsException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
UnsupportedSettingsException(crate::error::UnsupportedSettingsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSettingsErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::IncompatibleSettingsException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::UnsupportedSettingsException(_inner) => _inner.fmt(f),
UpdateSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSettingsError {
fn code(&self) -> Option<&str> {
UpdateSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSettingsError {
pub fn new(kind: UpdateSettingsErrorKind, 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: UpdateSettingsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSettingsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, UpdateSettingsErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_incompatible_settings_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::IncompatibleSettingsException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, UpdateSettingsErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::UnsupportedOperationException(_)
)
}
pub fn is_unsupported_settings_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSettingsErrorKind::UnsupportedSettingsException(_)
)
}
}
impl std::error::Error for UpdateSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSettingsErrorKind::ClientException(_inner) => Some(_inner),
UpdateSettingsErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
UpdateSettingsErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
UpdateSettingsErrorKind::IncompatibleSettingsException(_inner) => Some(_inner),
UpdateSettingsErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateSettingsErrorKind::ServiceException(_inner) => Some(_inner),
UpdateSettingsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
UpdateSettingsErrorKind::UnsupportedSettingsException(_inner) => Some(_inner),
UpdateSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedSettingsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl UnsupportedSettingsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl UnsupportedSettingsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedSettingsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedSettingsException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedSettingsException {}
pub mod unsupported_settings_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::UnsupportedSettingsException {
crate::error::UnsupportedSettingsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl UnsupportedSettingsException {
pub fn builder() -> crate::error::unsupported_settings_exception::Builder {
crate::error::unsupported_settings_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IncompatibleSettingsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl IncompatibleSettingsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl IncompatibleSettingsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IncompatibleSettingsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IncompatibleSettingsException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for IncompatibleSettingsException {}
pub mod incompatible_settings_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::IncompatibleSettingsException {
crate::error::IncompatibleSettingsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl IncompatibleSettingsException {
pub fn builder() -> crate::error::incompatible_settings_exception::Builder {
crate::error::incompatible_settings_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryUnavailableException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryUnavailableException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryUnavailableException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryUnavailableException {}
pub mod directory_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryUnavailableException {
crate::error::DirectoryUnavailableException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryUnavailableException {
pub fn builder() -> crate::error::directory_unavailable_exception::Builder {
crate::error::directory_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryDoesNotExistException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryDoesNotExistException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryDoesNotExistException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryDoesNotExistException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryDoesNotExistException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryDoesNotExistException {}
pub mod directory_does_not_exist_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryDoesNotExistException {
crate::error::DirectoryDoesNotExistException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryDoesNotExistException {
pub fn builder() -> crate::error::directory_does_not_exist_exception::Builder {
crate::error::directory_does_not_exist_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRadiusError {
pub kind: UpdateRadiusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRadiusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRadiusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRadiusErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRadiusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRadiusErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateRadiusErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
UpdateRadiusErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateRadiusErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateRadiusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRadiusError {
fn code(&self) -> Option<&str> {
UpdateRadiusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateRadiusError {
pub fn new(kind: UpdateRadiusErrorKind, 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: UpdateRadiusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRadiusErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, UpdateRadiusErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRadiusErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRadiusErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, UpdateRadiusErrorKind::ServiceException(_))
}
}
impl std::error::Error for UpdateRadiusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRadiusErrorKind::ClientException(_inner) => Some(_inner),
UpdateRadiusErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
UpdateRadiusErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateRadiusErrorKind::ServiceException(_inner) => Some(_inner),
UpdateRadiusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNumberOfDomainControllersError {
pub kind: UpdateNumberOfDomainControllersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNumberOfDomainControllersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNumberOfDomainControllersErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNumberOfDomainControllersErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
DomainControllerLimitExceededException(crate::error::DomainControllerLimitExceededException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateNumberOfDomainControllersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNumberOfDomainControllersErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateNumberOfDomainControllersErrorKind::DirectoryUnavailableException(_inner) => {
_inner.fmt(f)
}
UpdateNumberOfDomainControllersErrorKind::DomainControllerLimitExceededException(
_inner,
) => _inner.fmt(f),
UpdateNumberOfDomainControllersErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
UpdateNumberOfDomainControllersErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
UpdateNumberOfDomainControllersErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateNumberOfDomainControllersErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
UpdateNumberOfDomainControllersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNumberOfDomainControllersError {
fn code(&self) -> Option<&str> {
UpdateNumberOfDomainControllersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNumberOfDomainControllersError {
pub fn new(
kind: UpdateNumberOfDomainControllersErrorKind,
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: UpdateNumberOfDomainControllersErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNumberOfDomainControllersErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_domain_controller_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::DomainControllerLimitExceededException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNumberOfDomainControllersErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for UpdateNumberOfDomainControllersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNumberOfDomainControllersErrorKind::ClientException(_inner) => Some(_inner),
UpdateNumberOfDomainControllersErrorKind::DirectoryUnavailableException(_inner) => {
Some(_inner)
}
UpdateNumberOfDomainControllersErrorKind::DomainControllerLimitExceededException(
_inner,
) => Some(_inner),
UpdateNumberOfDomainControllersErrorKind::EntityDoesNotExistException(_inner) => {
Some(_inner)
}
UpdateNumberOfDomainControllersErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
UpdateNumberOfDomainControllersErrorKind::ServiceException(_inner) => Some(_inner),
UpdateNumberOfDomainControllersErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
UpdateNumberOfDomainControllersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DomainControllerLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DomainControllerLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DomainControllerLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DomainControllerLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DomainControllerLimitExceededException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for DomainControllerLimitExceededException {}
pub mod domain_controller_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DomainControllerLimitExceededException {
crate::error::DomainControllerLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DomainControllerLimitExceededException {
pub fn builder() -> crate::error::domain_controller_limit_exceeded_exception::Builder {
crate::error::domain_controller_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDirectorySetupError {
pub kind: UpdateDirectorySetupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDirectorySetupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDirectorySetupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDirectorySetupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryInDesiredStateException(crate::error::DirectoryInDesiredStateException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
SnapshotLimitExceededException(crate::error::SnapshotLimitExceededException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDirectorySetupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDirectorySetupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::DirectoryInDesiredStateException(_inner) => {
_inner.fmt(f)
}
UpdateDirectorySetupErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::SnapshotLimitExceededException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
UpdateDirectorySetupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDirectorySetupError {
fn code(&self) -> Option<&str> {
UpdateDirectorySetupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDirectorySetupError {
pub fn new(kind: UpdateDirectorySetupErrorKind, 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: UpdateDirectorySetupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDirectorySetupErrorKind::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,
UpdateDirectorySetupErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_in_desired_state_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::DirectoryInDesiredStateException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::ServiceException(_)
)
}
pub fn is_snapshot_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::SnapshotLimitExceededException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDirectorySetupErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for UpdateDirectorySetupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDirectorySetupErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::ClientException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::DirectoryInDesiredStateException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::ServiceException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::SnapshotLimitExceededException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
UpdateDirectorySetupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl SnapshotLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl SnapshotLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotLimitExceededException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotLimitExceededException {}
pub mod snapshot_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::SnapshotLimitExceededException {
crate::error::SnapshotLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl SnapshotLimitExceededException {
pub fn builder() -> crate::error::snapshot_limit_exceeded_exception::Builder {
crate::error::snapshot_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryInDesiredStateException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryInDesiredStateException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryInDesiredStateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryInDesiredStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryInDesiredStateException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryInDesiredStateException {}
pub mod directory_in_desired_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryInDesiredStateException {
crate::error::DirectoryInDesiredStateException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryInDesiredStateException {
pub fn builder() -> crate::error::directory_in_desired_state_exception::Builder {
crate::error::directory_in_desired_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
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_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
request_id: self.request_id,
}
}
}
}
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 UpdateConditionalForwarderError {
pub kind: UpdateConditionalForwarderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConditionalForwarderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConditionalForwarderErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateConditionalForwarderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConditionalForwarderErrorKind::ClientException(_inner) => _inner.fmt(f),
UpdateConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
_inner.fmt(f)
}
UpdateConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
UpdateConditionalForwarderErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateConditionalForwarderErrorKind::ServiceException(_inner) => _inner.fmt(f),
UpdateConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
UpdateConditionalForwarderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConditionalForwarderError {
fn code(&self) -> Option<&str> {
UpdateConditionalForwarderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConditionalForwarderError {
pub fn new(kind: UpdateConditionalForwarderErrorKind, 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: UpdateConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConditionalForwarderErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConditionalForwarderErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for UpdateConditionalForwarderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConditionalForwarderErrorKind::ClientException(_inner) => Some(_inner),
UpdateConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
Some(_inner)
}
UpdateConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
Some(_inner)
}
UpdateConditionalForwarderErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateConditionalForwarderErrorKind::ServiceException(_inner) => Some(_inner),
UpdateConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
UpdateConditionalForwarderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UnshareDirectoryError {
pub kind: UnshareDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UnshareDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UnshareDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UnshareDirectoryErrorKind {
ClientException(crate::error::ClientException),
DirectoryNotSharedException(crate::error::DirectoryNotSharedException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidTargetException(crate::error::InvalidTargetException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UnshareDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UnshareDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
UnshareDirectoryErrorKind::DirectoryNotSharedException(_inner) => _inner.fmt(f),
UnshareDirectoryErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
UnshareDirectoryErrorKind::InvalidTargetException(_inner) => _inner.fmt(f),
UnshareDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
UnshareDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UnshareDirectoryError {
fn code(&self) -> Option<&str> {
UnshareDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UnshareDirectoryError {
pub fn new(kind: UnshareDirectoryErrorKind, 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: UnshareDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UnshareDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, UnshareDirectoryErrorKind::ClientException(_))
}
pub fn is_directory_not_shared_exception(&self) -> bool {
matches!(
&self.kind,
UnshareDirectoryErrorKind::DirectoryNotSharedException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
UnshareDirectoryErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_target_exception(&self) -> bool {
matches!(
&self.kind,
UnshareDirectoryErrorKind::InvalidTargetException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, UnshareDirectoryErrorKind::ServiceException(_))
}
}
impl std::error::Error for UnshareDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UnshareDirectoryErrorKind::ClientException(_inner) => Some(_inner),
UnshareDirectoryErrorKind::DirectoryNotSharedException(_inner) => Some(_inner),
UnshareDirectoryErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
UnshareDirectoryErrorKind::InvalidTargetException(_inner) => Some(_inner),
UnshareDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
UnshareDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidTargetException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidTargetException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidTargetException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidTargetException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidTargetException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidTargetException {}
pub mod invalid_target_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidTargetException {
crate::error::InvalidTargetException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidTargetException {
pub fn builder() -> crate::error::invalid_target_exception::Builder {
crate::error::invalid_target_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryNotSharedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryNotSharedException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryNotSharedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryNotSharedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryNotSharedException")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryNotSharedException {}
pub mod directory_not_shared_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryNotSharedException {
crate::error::DirectoryNotSharedException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryNotSharedException {
pub fn builder() -> crate::error::directory_not_shared_exception::Builder {
crate::error::directory_not_shared_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartSchemaExtensionError {
pub kind: StartSchemaExtensionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartSchemaExtensionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartSchemaExtensionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartSchemaExtensionErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
SnapshotLimitExceededException(crate::error::SnapshotLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartSchemaExtensionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartSchemaExtensionErrorKind::ClientException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::ServiceException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::SnapshotLimitExceededException(_inner) => _inner.fmt(f),
StartSchemaExtensionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartSchemaExtensionError {
fn code(&self) -> Option<&str> {
StartSchemaExtensionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartSchemaExtensionError {
pub fn new(kind: StartSchemaExtensionErrorKind, 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: StartSchemaExtensionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartSchemaExtensionErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::ServiceException(_)
)
}
pub fn is_snapshot_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartSchemaExtensionErrorKind::SnapshotLimitExceededException(_)
)
}
}
impl std::error::Error for StartSchemaExtensionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartSchemaExtensionErrorKind::ClientException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::ServiceException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::SnapshotLimitExceededException(_inner) => Some(_inner),
StartSchemaExtensionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ShareDirectoryError {
pub kind: ShareDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ShareDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ShareDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ShareDirectoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryAlreadySharedException(crate::error::DirectoryAlreadySharedException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidTargetException(crate::error::InvalidTargetException),
OrganizationsException(crate::error::OrganizationsException),
ServiceException(crate::error::ServiceException),
ShareLimitExceededException(crate::error::ShareLimitExceededException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ShareDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ShareDirectoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::InvalidTargetException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::OrganizationsException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::ShareLimitExceededException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
ShareDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ShareDirectoryError {
fn code(&self) -> Option<&str> {
ShareDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ShareDirectoryError {
pub fn new(kind: ShareDirectoryErrorKind, 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: ShareDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ShareDirectoryErrorKind::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,
ShareDirectoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ShareDirectoryErrorKind::ClientException(_))
}
pub fn is_directory_already_shared_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::DirectoryAlreadySharedException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_target_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::InvalidTargetException(_)
)
}
pub fn is_organizations_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::OrganizationsException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ShareDirectoryErrorKind::ServiceException(_))
}
pub fn is_share_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::ShareLimitExceededException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
ShareDirectoryErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for ShareDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ShareDirectoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
ShareDirectoryErrorKind::ClientException(_inner) => Some(_inner),
ShareDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => Some(_inner),
ShareDirectoryErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ShareDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
ShareDirectoryErrorKind::InvalidTargetException(_inner) => Some(_inner),
ShareDirectoryErrorKind::OrganizationsException(_inner) => Some(_inner),
ShareDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
ShareDirectoryErrorKind::ShareLimitExceededException(_inner) => Some(_inner),
ShareDirectoryErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
ShareDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ShareLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl ShareLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl ShareLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ShareLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ShareLimitExceededException")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for ShareLimitExceededException {}
pub mod share_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::ShareLimitExceededException {
crate::error::ShareLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl ShareLimitExceededException {
pub fn builder() -> crate::error::share_limit_exceeded_exception::Builder {
crate::error::share_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OrganizationsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl OrganizationsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl OrganizationsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OrganizationsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OrganizationsException")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for OrganizationsException {}
pub mod organizations_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::OrganizationsException {
crate::error::OrganizationsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl OrganizationsException {
pub fn builder() -> crate::error::organizations_exception::Builder {
crate::error::organizations_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryAlreadySharedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryAlreadySharedException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryAlreadySharedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryAlreadySharedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryAlreadySharedException")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryAlreadySharedException {}
pub mod directory_already_shared_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryAlreadySharedException {
crate::error::DirectoryAlreadySharedException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryAlreadySharedException {
pub fn builder() -> crate::error::directory_already_shared_exception::Builder {
crate::error::directory_already_shared_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestoreFromSnapshotError {
pub kind: RestoreFromSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RestoreFromSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RestoreFromSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestoreFromSnapshotErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RestoreFromSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestoreFromSnapshotErrorKind::ClientException(_inner) => _inner.fmt(f),
RestoreFromSnapshotErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
RestoreFromSnapshotErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RestoreFromSnapshotErrorKind::ServiceException(_inner) => _inner.fmt(f),
RestoreFromSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestoreFromSnapshotError {
fn code(&self) -> Option<&str> {
RestoreFromSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestoreFromSnapshotError {
pub fn new(kind: RestoreFromSnapshotErrorKind, 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: RestoreFromSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestoreFromSnapshotErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, RestoreFromSnapshotErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RestoreFromSnapshotErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RestoreFromSnapshotErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
RestoreFromSnapshotErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for RestoreFromSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestoreFromSnapshotErrorKind::ClientException(_inner) => Some(_inner),
RestoreFromSnapshotErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
RestoreFromSnapshotErrorKind::InvalidParameterException(_inner) => Some(_inner),
RestoreFromSnapshotErrorKind::ServiceException(_inner) => Some(_inner),
RestoreFromSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResetUserPasswordError {
pub kind: ResetUserPasswordErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResetUserPasswordError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResetUserPasswordErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResetUserPasswordErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidPasswordException(crate::error::InvalidPasswordException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
UserDoesNotExistException(crate::error::UserDoesNotExistException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResetUserPasswordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResetUserPasswordErrorKind::ClientException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::InvalidPasswordException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::ServiceException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::UserDoesNotExistException(_inner) => _inner.fmt(f),
ResetUserPasswordErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResetUserPasswordError {
fn code(&self) -> Option<&str> {
ResetUserPasswordError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResetUserPasswordError {
pub fn new(kind: ResetUserPasswordErrorKind, 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: ResetUserPasswordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResetUserPasswordErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, ResetUserPasswordErrorKind::ClientException(_))
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ResetUserPasswordErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ResetUserPasswordErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_password_exception(&self) -> bool {
matches!(
&self.kind,
ResetUserPasswordErrorKind::InvalidPasswordException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ResetUserPasswordErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
ResetUserPasswordErrorKind::UnsupportedOperationException(_)
)
}
pub fn is_user_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ResetUserPasswordErrorKind::UserDoesNotExistException(_)
)
}
}
impl std::error::Error for ResetUserPasswordError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResetUserPasswordErrorKind::ClientException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::InvalidPasswordException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::ServiceException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::UserDoesNotExistException(_inner) => Some(_inner),
ResetUserPasswordErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserDoesNotExistException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl UserDoesNotExistException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl UserDoesNotExistException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserDoesNotExistException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserDoesNotExistException")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for UserDoesNotExistException {}
pub mod user_does_not_exist_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::UserDoesNotExistException {
crate::error::UserDoesNotExistException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl UserDoesNotExistException {
pub fn builder() -> crate::error::user_does_not_exist_exception::Builder {
crate::error::user_does_not_exist_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPasswordException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidPasswordException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidPasswordException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPasswordException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPasswordException")?;
if let Some(inner_20) = &self.message {
{
write!(f, ": {}", inner_20)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPasswordException {}
pub mod invalid_password_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidPasswordException {
crate::error::InvalidPasswordException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidPasswordException {
pub fn builder() -> crate::error::invalid_password_exception::Builder {
crate::error::invalid_password_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveTagsFromResourceError {
pub kind: RemoveTagsFromResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveTagsFromResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveTagsFromResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveTagsFromResourceErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveTagsFromResourceErrorKind::ClientException(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::ServiceException(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveTagsFromResourceError {
fn code(&self) -> Option<&str> {
RemoveTagsFromResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveTagsFromResourceError {
pub fn new(kind: RemoveTagsFromResourceErrorKind, 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: RemoveTagsFromResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveTagsFromResourceErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for RemoveTagsFromResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveTagsFromResourceErrorKind::ClientException(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::ServiceException(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveRegionError {
pub kind: RemoveRegionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveRegionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveRegionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveRegionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveRegionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveRegionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::ClientException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::ServiceException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
RemoveRegionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveRegionError {
fn code(&self) -> Option<&str> {
RemoveRegionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveRegionError {
pub fn new(kind: RemoveRegionErrorKind, 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: RemoveRegionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveRegionErrorKind::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, RemoveRegionErrorKind::AccessDeniedException(_))
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, RemoveRegionErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, RemoveRegionErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for RemoveRegionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveRegionErrorKind::AccessDeniedException(_inner) => Some(_inner),
RemoveRegionErrorKind::ClientException(_inner) => Some(_inner),
RemoveRegionErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
RemoveRegionErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
RemoveRegionErrorKind::ServiceException(_inner) => Some(_inner),
RemoveRegionErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
RemoveRegionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveIpRoutesError {
pub kind: RemoveIpRoutesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveIpRoutesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveIpRoutesErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveIpRoutesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveIpRoutesErrorKind::ClientException(_inner) => _inner.fmt(f),
RemoveIpRoutesErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
RemoveIpRoutesErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
RemoveIpRoutesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RemoveIpRoutesErrorKind::ServiceException(_inner) => _inner.fmt(f),
RemoveIpRoutesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveIpRoutesError {
fn code(&self) -> Option<&str> {
RemoveIpRoutesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveIpRoutesError {
pub fn new(kind: RemoveIpRoutesErrorKind, 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: RemoveIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveIpRoutesErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, RemoveIpRoutesErrorKind::ClientException(_))
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveIpRoutesErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RemoveIpRoutesErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RemoveIpRoutesErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, RemoveIpRoutesErrorKind::ServiceException(_))
}
}
impl std::error::Error for RemoveIpRoutesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveIpRoutesErrorKind::ClientException(_inner) => Some(_inner),
RemoveIpRoutesErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
RemoveIpRoutesErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
RemoveIpRoutesErrorKind::InvalidParameterException(_inner) => Some(_inner),
RemoveIpRoutesErrorKind::ServiceException(_inner) => Some(_inner),
RemoveIpRoutesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RejectSharedDirectoryError {
pub kind: RejectSharedDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RejectSharedDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RejectSharedDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RejectSharedDirectoryErrorKind {
ClientException(crate::error::ClientException),
DirectoryAlreadySharedException(crate::error::DirectoryAlreadySharedException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RejectSharedDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RejectSharedDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
RejectSharedDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => {
_inner.fmt(f)
}
RejectSharedDirectoryErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
RejectSharedDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RejectSharedDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
RejectSharedDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RejectSharedDirectoryError {
fn code(&self) -> Option<&str> {
RejectSharedDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RejectSharedDirectoryError {
pub fn new(kind: RejectSharedDirectoryErrorKind, 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: RejectSharedDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RejectSharedDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
RejectSharedDirectoryErrorKind::ClientException(_)
)
}
pub fn is_directory_already_shared_exception(&self) -> bool {
matches!(
&self.kind,
RejectSharedDirectoryErrorKind::DirectoryAlreadySharedException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RejectSharedDirectoryErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RejectSharedDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
RejectSharedDirectoryErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for RejectSharedDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RejectSharedDirectoryErrorKind::ClientException(_inner) => Some(_inner),
RejectSharedDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => Some(_inner),
RejectSharedDirectoryErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
RejectSharedDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
RejectSharedDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
RejectSharedDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterEventTopicError {
pub kind: RegisterEventTopicErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterEventTopicError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterEventTopicErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterEventTopicErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RegisterEventTopicError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterEventTopicErrorKind::ClientException(_inner) => _inner.fmt(f),
RegisterEventTopicErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
RegisterEventTopicErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RegisterEventTopicErrorKind::ServiceException(_inner) => _inner.fmt(f),
RegisterEventTopicErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterEventTopicError {
fn code(&self) -> Option<&str> {
RegisterEventTopicError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterEventTopicError {
pub fn new(kind: RegisterEventTopicErrorKind, 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: RegisterEventTopicErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterEventTopicErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, RegisterEventTopicErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RegisterEventTopicErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RegisterEventTopicErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, RegisterEventTopicErrorKind::ServiceException(_))
}
}
impl std::error::Error for RegisterEventTopicError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterEventTopicErrorKind::ClientException(_inner) => Some(_inner),
RegisterEventTopicErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
RegisterEventTopicErrorKind::InvalidParameterException(_inner) => Some(_inner),
RegisterEventTopicErrorKind::ServiceException(_inner) => Some(_inner),
RegisterEventTopicErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterCertificateError {
pub kind: RegisterCertificateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterCertificateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterCertificateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterCertificateErrorKind {
CertificateAlreadyExistsException(crate::error::CertificateAlreadyExistsException),
CertificateLimitExceededException(crate::error::CertificateLimitExceededException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
InvalidCertificateException(crate::error::InvalidCertificateException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RegisterCertificateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterCertificateErrorKind::CertificateAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
RegisterCertificateErrorKind::CertificateLimitExceededException(_inner) => {
_inner.fmt(f)
}
RegisterCertificateErrorKind::ClientException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::InvalidCertificateException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::ServiceException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
RegisterCertificateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterCertificateError {
fn code(&self) -> Option<&str> {
RegisterCertificateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterCertificateError {
pub fn new(kind: RegisterCertificateErrorKind, 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: RegisterCertificateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterCertificateErrorKind::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_certificate_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::CertificateAlreadyExistsException(_)
)
}
pub fn is_certificate_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::CertificateLimitExceededException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, RegisterCertificateErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_invalid_certificate_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::InvalidCertificateException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
RegisterCertificateErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for RegisterCertificateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterCertificateErrorKind::CertificateAlreadyExistsException(_inner) => Some(_inner),
RegisterCertificateErrorKind::CertificateLimitExceededException(_inner) => Some(_inner),
RegisterCertificateErrorKind::ClientException(_inner) => Some(_inner),
RegisterCertificateErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
RegisterCertificateErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
RegisterCertificateErrorKind::InvalidCertificateException(_inner) => Some(_inner),
RegisterCertificateErrorKind::InvalidParameterException(_inner) => Some(_inner),
RegisterCertificateErrorKind::ServiceException(_inner) => Some(_inner),
RegisterCertificateErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
RegisterCertificateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidCertificateException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidCertificateException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidCertificateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidCertificateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidCertificateException")?;
if let Some(inner_21) = &self.message {
{
write!(f, ": {}", inner_21)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidCertificateException {}
pub mod invalid_certificate_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidCertificateException {
crate::error::InvalidCertificateException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidCertificateException {
pub fn builder() -> crate::error::invalid_certificate_exception::Builder {
crate::error::invalid_certificate_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl CertificateLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl CertificateLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CertificateLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CertificateLimitExceededException")?;
if let Some(inner_22) = &self.message {
{
write!(f, ": {}", inner_22)?;
}
}
Ok(())
}
}
impl std::error::Error for CertificateLimitExceededException {}
pub mod certificate_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::CertificateLimitExceededException {
crate::error::CertificateLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl CertificateLimitExceededException {
pub fn builder() -> crate::error::certificate_limit_exceeded_exception::Builder {
crate::error::certificate_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl CertificateAlreadyExistsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl CertificateAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CertificateAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CertificateAlreadyExistsException")?;
if let Some(inner_23) = &self.message {
{
write!(f, ": {}", inner_23)?;
}
}
Ok(())
}
}
impl std::error::Error for CertificateAlreadyExistsException {}
pub mod certificate_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::CertificateAlreadyExistsException {
crate::error::CertificateAlreadyExistsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl CertificateAlreadyExistsException {
pub fn builder() -> crate::error::certificate_already_exists_exception::Builder {
crate::error::certificate_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::ClientException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, ListTagsForResourceErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::ClientException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ServiceException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_24) = &self.message {
{
write!(f, ": {}", inner_24)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_token_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSchemaExtensionsError {
pub kind: ListSchemaExtensionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSchemaExtensionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSchemaExtensionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSchemaExtensionsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSchemaExtensionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSchemaExtensionsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListSchemaExtensionsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ListSchemaExtensionsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListSchemaExtensionsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListSchemaExtensionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSchemaExtensionsError {
fn code(&self) -> Option<&str> {
ListSchemaExtensionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSchemaExtensionsError {
pub fn new(kind: ListSchemaExtensionsErrorKind, 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: ListSchemaExtensionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSchemaExtensionsErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
ListSchemaExtensionsErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ListSchemaExtensionsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListSchemaExtensionsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListSchemaExtensionsErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for ListSchemaExtensionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSchemaExtensionsErrorKind::ClientException(_inner) => Some(_inner),
ListSchemaExtensionsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ListSchemaExtensionsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListSchemaExtensionsErrorKind::ServiceException(_inner) => Some(_inner),
ListSchemaExtensionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListLogSubscriptionsError {
pub kind: ListLogSubscriptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListLogSubscriptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListLogSubscriptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListLogSubscriptionsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListLogSubscriptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListLogSubscriptionsErrorKind::ClientException(_inner) => _inner.fmt(f),
ListLogSubscriptionsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ListLogSubscriptionsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListLogSubscriptionsErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListLogSubscriptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListLogSubscriptionsError {
fn code(&self) -> Option<&str> {
ListLogSubscriptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListLogSubscriptionsError {
pub fn new(kind: ListLogSubscriptionsErrorKind, 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: ListLogSubscriptionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListLogSubscriptionsErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
ListLogSubscriptionsErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ListLogSubscriptionsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListLogSubscriptionsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
ListLogSubscriptionsErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for ListLogSubscriptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListLogSubscriptionsErrorKind::ClientException(_inner) => Some(_inner),
ListLogSubscriptionsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ListLogSubscriptionsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListLogSubscriptionsErrorKind::ServiceException(_inner) => Some(_inner),
ListLogSubscriptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListIpRoutesError {
pub kind: ListIpRoutesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListIpRoutesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListIpRoutesErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListIpRoutesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListIpRoutesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListIpRoutesErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
ListIpRoutesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListIpRoutesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListIpRoutesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListIpRoutesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListIpRoutesError {
fn code(&self) -> Option<&str> {
ListIpRoutesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListIpRoutesError {
pub fn new(kind: ListIpRoutesErrorKind, 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: ListIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListIpRoutesErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, ListIpRoutesErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ListIpRoutesErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListIpRoutesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListIpRoutesErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListIpRoutesErrorKind::ServiceException(_))
}
}
impl std::error::Error for ListIpRoutesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListIpRoutesErrorKind::ClientException(_inner) => Some(_inner),
ListIpRoutesErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
ListIpRoutesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListIpRoutesErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListIpRoutesErrorKind::ServiceException(_inner) => Some(_inner),
ListIpRoutesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCertificatesError {
pub kind: ListCertificatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCertificatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCertificatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCertificatesErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCertificatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCertificatesErrorKind::ClientException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::ServiceException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
ListCertificatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCertificatesError {
fn code(&self) -> Option<&str> {
ListCertificatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCertificatesError {
pub fn new(kind: ListCertificatesErrorKind, 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: ListCertificatesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCertificatesErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, ListCertificatesErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
ListCertificatesErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCertificatesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListCertificatesErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ListCertificatesErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
ListCertificatesErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for ListCertificatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCertificatesErrorKind::ClientException(_inner) => Some(_inner),
ListCertificatesErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
ListCertificatesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListCertificatesErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListCertificatesErrorKind::ServiceException(_inner) => Some(_inner),
ListCertificatesErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
ListCertificatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSnapshotLimitsError {
pub kind: GetSnapshotLimitsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSnapshotLimitsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSnapshotLimitsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSnapshotLimitsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSnapshotLimitsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSnapshotLimitsErrorKind::ClientException(_inner) => _inner.fmt(f),
GetSnapshotLimitsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
GetSnapshotLimitsErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetSnapshotLimitsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSnapshotLimitsError {
fn code(&self) -> Option<&str> {
GetSnapshotLimitsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSnapshotLimitsError {
pub fn new(kind: GetSnapshotLimitsErrorKind, 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: GetSnapshotLimitsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSnapshotLimitsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, GetSnapshotLimitsErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
GetSnapshotLimitsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetSnapshotLimitsErrorKind::ServiceException(_))
}
}
impl std::error::Error for GetSnapshotLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSnapshotLimitsErrorKind::ClientException(_inner) => Some(_inner),
GetSnapshotLimitsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
GetSnapshotLimitsErrorKind::ServiceException(_inner) => Some(_inner),
GetSnapshotLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDirectoryLimitsError {
pub kind: GetDirectoryLimitsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDirectoryLimitsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDirectoryLimitsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDirectoryLimitsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDirectoryLimitsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDirectoryLimitsErrorKind::ClientException(_inner) => _inner.fmt(f),
GetDirectoryLimitsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
GetDirectoryLimitsErrorKind::ServiceException(_inner) => _inner.fmt(f),
GetDirectoryLimitsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDirectoryLimitsError {
fn code(&self) -> Option<&str> {
GetDirectoryLimitsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDirectoryLimitsError {
pub fn new(kind: GetDirectoryLimitsErrorKind, 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: GetDirectoryLimitsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDirectoryLimitsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, GetDirectoryLimitsErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
GetDirectoryLimitsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, GetDirectoryLimitsErrorKind::ServiceException(_))
}
}
impl std::error::Error for GetDirectoryLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDirectoryLimitsErrorKind::ClientException(_inner) => Some(_inner),
GetDirectoryLimitsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
GetDirectoryLimitsErrorKind::ServiceException(_inner) => Some(_inner),
GetDirectoryLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableSsoError {
pub kind: EnableSsoErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableSsoError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableSsoErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableSsoErrorKind {
AuthenticationFailedException(crate::error::AuthenticationFailedException),
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InsufficientPermissionsException(crate::error::InsufficientPermissionsException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableSsoError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableSsoErrorKind::AuthenticationFailedException(_inner) => _inner.fmt(f),
EnableSsoErrorKind::ClientException(_inner) => _inner.fmt(f),
EnableSsoErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
EnableSsoErrorKind::InsufficientPermissionsException(_inner) => _inner.fmt(f),
EnableSsoErrorKind::ServiceException(_inner) => _inner.fmt(f),
EnableSsoErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableSsoError {
fn code(&self) -> Option<&str> {
EnableSsoError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableSsoError {
pub fn new(kind: EnableSsoErrorKind, 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: EnableSsoErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableSsoErrorKind::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_authentication_failed_exception(&self) -> bool {
matches!(
&self.kind,
EnableSsoErrorKind::AuthenticationFailedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, EnableSsoErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
EnableSsoErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_insufficient_permissions_exception(&self) -> bool {
matches!(
&self.kind,
EnableSsoErrorKind::InsufficientPermissionsException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, EnableSsoErrorKind::ServiceException(_))
}
}
impl std::error::Error for EnableSsoError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableSsoErrorKind::AuthenticationFailedException(_inner) => Some(_inner),
EnableSsoErrorKind::ClientException(_inner) => Some(_inner),
EnableSsoErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
EnableSsoErrorKind::InsufficientPermissionsException(_inner) => Some(_inner),
EnableSsoErrorKind::ServiceException(_inner) => Some(_inner),
EnableSsoErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InsufficientPermissionsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InsufficientPermissionsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InsufficientPermissionsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InsufficientPermissionsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InsufficientPermissionsException")?;
if let Some(inner_25) = &self.message {
{
write!(f, ": {}", inner_25)?;
}
}
Ok(())
}
}
impl std::error::Error for InsufficientPermissionsException {}
pub mod insufficient_permissions_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InsufficientPermissionsException {
crate::error::InsufficientPermissionsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InsufficientPermissionsException {
pub fn builder() -> crate::error::insufficient_permissions_exception::Builder {
crate::error::insufficient_permissions_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AuthenticationFailedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl AuthenticationFailedException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl AuthenticationFailedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AuthenticationFailedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AuthenticationFailedException")?;
if let Some(inner_26) = &self.message {
{
write!(f, ": {}", inner_26)?;
}
}
Ok(())
}
}
impl std::error::Error for AuthenticationFailedException {}
pub mod authentication_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::AuthenticationFailedException {
crate::error::AuthenticationFailedException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl AuthenticationFailedException {
pub fn builder() -> crate::error::authentication_failed_exception::Builder {
crate::error::authentication_failed_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableRadiusError {
pub kind: EnableRadiusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableRadiusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableRadiusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableRadiusErrorKind {
ClientException(crate::error::ClientException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableRadiusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableRadiusErrorKind::ClientException(_inner) => _inner.fmt(f),
EnableRadiusErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
EnableRadiusErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
EnableRadiusErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
EnableRadiusErrorKind::ServiceException(_inner) => _inner.fmt(f),
EnableRadiusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableRadiusError {
fn code(&self) -> Option<&str> {
EnableRadiusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableRadiusError {
pub fn new(kind: EnableRadiusErrorKind, 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: EnableRadiusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableRadiusErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, EnableRadiusErrorKind::ClientException(_))
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
EnableRadiusErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
EnableRadiusErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
EnableRadiusErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, EnableRadiusErrorKind::ServiceException(_))
}
}
impl std::error::Error for EnableRadiusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableRadiusErrorKind::ClientException(_inner) => Some(_inner),
EnableRadiusErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
EnableRadiusErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
EnableRadiusErrorKind::InvalidParameterException(_inner) => Some(_inner),
EnableRadiusErrorKind::ServiceException(_inner) => Some(_inner),
EnableRadiusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EntityAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl EntityAlreadyExistsException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl EntityAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EntityAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EntityAlreadyExistsException")?;
if let Some(inner_27) = &self.message {
{
write!(f, ": {}", inner_27)?;
}
}
Ok(())
}
}
impl std::error::Error for EntityAlreadyExistsException {}
pub mod entity_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::EntityAlreadyExistsException {
crate::error::EntityAlreadyExistsException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl EntityAlreadyExistsException {
pub fn builder() -> crate::error::entity_already_exists_exception::Builder {
crate::error::entity_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableLDAPSError {
pub kind: EnableLDAPSErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableLDAPSError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableLDAPSErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableLDAPSErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
InvalidLdapsStatusException(crate::error::InvalidLdapsStatusException),
InvalidParameterException(crate::error::InvalidParameterException),
NoAvailableCertificateException(crate::error::NoAvailableCertificateException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableLDAPSError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableLDAPSErrorKind::ClientException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::InvalidLdapsStatusException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::NoAvailableCertificateException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::ServiceException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
EnableLDAPSErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableLDAPSError {
fn code(&self) -> Option<&str> {
EnableLDAPSError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableLDAPSError {
pub fn new(kind: EnableLDAPSErrorKind, 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: EnableLDAPSErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableLDAPSErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, EnableLDAPSErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_invalid_ldaps_status_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::InvalidLdapsStatusException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::InvalidParameterException(_)
)
}
pub fn is_no_available_certificate_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::NoAvailableCertificateException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, EnableLDAPSErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
EnableLDAPSErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for EnableLDAPSError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableLDAPSErrorKind::ClientException(_inner) => Some(_inner),
EnableLDAPSErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
EnableLDAPSErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
EnableLDAPSErrorKind::InvalidLdapsStatusException(_inner) => Some(_inner),
EnableLDAPSErrorKind::InvalidParameterException(_inner) => Some(_inner),
EnableLDAPSErrorKind::NoAvailableCertificateException(_inner) => Some(_inner),
EnableLDAPSErrorKind::ServiceException(_inner) => Some(_inner),
EnableLDAPSErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
EnableLDAPSErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NoAvailableCertificateException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl NoAvailableCertificateException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl NoAvailableCertificateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NoAvailableCertificateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NoAvailableCertificateException")?;
if let Some(inner_28) = &self.message {
{
write!(f, ": {}", inner_28)?;
}
}
Ok(())
}
}
impl std::error::Error for NoAvailableCertificateException {}
pub mod no_available_certificate_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::NoAvailableCertificateException {
crate::error::NoAvailableCertificateException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl NoAvailableCertificateException {
pub fn builder() -> crate::error::no_available_certificate_exception::Builder {
crate::error::no_available_certificate_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidLdapsStatusException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidLdapsStatusException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidLdapsStatusException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidLdapsStatusException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"InvalidLdapsStatusException [InvalidLDAPSStatusException]"
)?;
if let Some(inner_29) = &self.message {
{
write!(f, ": {}", inner_29)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidLdapsStatusException {}
pub mod invalid_ldaps_status_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidLdapsStatusException {
crate::error::InvalidLdapsStatusException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidLdapsStatusException {
pub fn builder() -> crate::error::invalid_ldaps_status_exception::Builder {
crate::error::invalid_ldaps_status_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableClientAuthenticationError {
pub kind: EnableClientAuthenticationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableClientAuthenticationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableClientAuthenticationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableClientAuthenticationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidClientAuthStatusException(crate::error::InvalidClientAuthStatusException),
NoAvailableCertificateException(crate::error::NoAvailableCertificateException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableClientAuthenticationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableClientAuthenticationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
EnableClientAuthenticationErrorKind::ClientException(_inner) => _inner.fmt(f),
EnableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_inner) => {
_inner.fmt(f)
}
EnableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_inner) => {
_inner.fmt(f)
}
EnableClientAuthenticationErrorKind::NoAvailableCertificateException(_inner) => {
_inner.fmt(f)
}
EnableClientAuthenticationErrorKind::ServiceException(_inner) => _inner.fmt(f),
EnableClientAuthenticationErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
EnableClientAuthenticationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableClientAuthenticationError {
fn code(&self) -> Option<&str> {
EnableClientAuthenticationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableClientAuthenticationError {
pub fn new(kind: EnableClientAuthenticationErrorKind, 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: EnableClientAuthenticationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableClientAuthenticationErrorKind::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,
EnableClientAuthenticationErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_client_auth_status_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_)
)
}
pub fn is_no_available_certificate_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::NoAvailableCertificateException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
EnableClientAuthenticationErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for EnableClientAuthenticationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableClientAuthenticationErrorKind::AccessDeniedException(_inner) => Some(_inner),
EnableClientAuthenticationErrorKind::ClientException(_inner) => Some(_inner),
EnableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_inner) => {
Some(_inner)
}
EnableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_inner) => {
Some(_inner)
}
EnableClientAuthenticationErrorKind::NoAvailableCertificateException(_inner) => {
Some(_inner)
}
EnableClientAuthenticationErrorKind::ServiceException(_inner) => Some(_inner),
EnableClientAuthenticationErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
EnableClientAuthenticationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidClientAuthStatusException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InvalidClientAuthStatusException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InvalidClientAuthStatusException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidClientAuthStatusException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidClientAuthStatusException")?;
if let Some(inner_30) = &self.message {
{
write!(f, ": {}", inner_30)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidClientAuthStatusException {}
pub mod invalid_client_auth_status_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InvalidClientAuthStatusException {
crate::error::InvalidClientAuthStatusException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InvalidClientAuthStatusException {
pub fn builder() -> crate::error::invalid_client_auth_status_exception::Builder {
crate::error::invalid_client_auth_status_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableSsoError {
pub kind: DisableSsoErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableSsoError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableSsoErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableSsoErrorKind {
AuthenticationFailedException(crate::error::AuthenticationFailedException),
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InsufficientPermissionsException(crate::error::InsufficientPermissionsException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableSsoError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableSsoErrorKind::AuthenticationFailedException(_inner) => _inner.fmt(f),
DisableSsoErrorKind::ClientException(_inner) => _inner.fmt(f),
DisableSsoErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DisableSsoErrorKind::InsufficientPermissionsException(_inner) => _inner.fmt(f),
DisableSsoErrorKind::ServiceException(_inner) => _inner.fmt(f),
DisableSsoErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableSsoError {
fn code(&self) -> Option<&str> {
DisableSsoError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableSsoError {
pub fn new(kind: DisableSsoErrorKind, 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: DisableSsoErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableSsoErrorKind::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_authentication_failed_exception(&self) -> bool {
matches!(
&self.kind,
DisableSsoErrorKind::AuthenticationFailedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DisableSsoErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DisableSsoErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_insufficient_permissions_exception(&self) -> bool {
matches!(
&self.kind,
DisableSsoErrorKind::InsufficientPermissionsException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DisableSsoErrorKind::ServiceException(_))
}
}
impl std::error::Error for DisableSsoError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableSsoErrorKind::AuthenticationFailedException(_inner) => Some(_inner),
DisableSsoErrorKind::ClientException(_inner) => Some(_inner),
DisableSsoErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DisableSsoErrorKind::InsufficientPermissionsException(_inner) => Some(_inner),
DisableSsoErrorKind::ServiceException(_inner) => Some(_inner),
DisableSsoErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableRadiusError {
pub kind: DisableRadiusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableRadiusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableRadiusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableRadiusErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableRadiusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableRadiusErrorKind::ClientException(_inner) => _inner.fmt(f),
DisableRadiusErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DisableRadiusErrorKind::ServiceException(_inner) => _inner.fmt(f),
DisableRadiusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableRadiusError {
fn code(&self) -> Option<&str> {
DisableRadiusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableRadiusError {
pub fn new(kind: DisableRadiusErrorKind, 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: DisableRadiusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableRadiusErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DisableRadiusErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DisableRadiusErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DisableRadiusErrorKind::ServiceException(_))
}
}
impl std::error::Error for DisableRadiusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableRadiusErrorKind::ClientException(_inner) => Some(_inner),
DisableRadiusErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DisableRadiusErrorKind::ServiceException(_inner) => Some(_inner),
DisableRadiusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableLDAPSError {
pub kind: DisableLDAPSErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableLDAPSError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableLDAPSErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableLDAPSErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
InvalidLdapsStatusException(crate::error::InvalidLdapsStatusException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableLDAPSError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableLDAPSErrorKind::ClientException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::InvalidLdapsStatusException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::ServiceException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DisableLDAPSErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableLDAPSError {
fn code(&self) -> Option<&str> {
DisableLDAPSError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableLDAPSError {
pub fn new(kind: DisableLDAPSErrorKind, 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: DisableLDAPSErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableLDAPSErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DisableLDAPSErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DisableLDAPSErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DisableLDAPSErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_invalid_ldaps_status_exception(&self) -> bool {
matches!(
&self.kind,
DisableLDAPSErrorKind::InvalidLdapsStatusException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DisableLDAPSErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DisableLDAPSErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisableLDAPSErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DisableLDAPSError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableLDAPSErrorKind::ClientException(_inner) => Some(_inner),
DisableLDAPSErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DisableLDAPSErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
DisableLDAPSErrorKind::InvalidLdapsStatusException(_inner) => Some(_inner),
DisableLDAPSErrorKind::InvalidParameterException(_inner) => Some(_inner),
DisableLDAPSErrorKind::ServiceException(_inner) => Some(_inner),
DisableLDAPSErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DisableLDAPSErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableClientAuthenticationError {
pub kind: DisableClientAuthenticationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableClientAuthenticationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableClientAuthenticationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableClientAuthenticationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidClientAuthStatusException(crate::error::InvalidClientAuthStatusException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableClientAuthenticationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableClientAuthenticationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisableClientAuthenticationErrorKind::ClientException(_inner) => _inner.fmt(f),
DisableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DisableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_inner) => {
_inner.fmt(f)
}
DisableClientAuthenticationErrorKind::ServiceException(_inner) => _inner.fmt(f),
DisableClientAuthenticationErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
DisableClientAuthenticationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableClientAuthenticationError {
fn code(&self) -> Option<&str> {
DisableClientAuthenticationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableClientAuthenticationError {
pub fn new(kind: DisableClientAuthenticationErrorKind, 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: DisableClientAuthenticationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableClientAuthenticationErrorKind::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,
DisableClientAuthenticationErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DisableClientAuthenticationErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DisableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_client_auth_status_exception(&self) -> bool {
matches!(
&self.kind,
DisableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DisableClientAuthenticationErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisableClientAuthenticationErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DisableClientAuthenticationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableClientAuthenticationErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisableClientAuthenticationErrorKind::ClientException(_inner) => Some(_inner),
DisableClientAuthenticationErrorKind::DirectoryDoesNotExistException(_inner) => {
Some(_inner)
}
DisableClientAuthenticationErrorKind::InvalidClientAuthStatusException(_inner) => {
Some(_inner)
}
DisableClientAuthenticationErrorKind::ServiceException(_inner) => Some(_inner),
DisableClientAuthenticationErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
DisableClientAuthenticationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUpdateDirectoryError {
pub kind: DescribeUpdateDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUpdateDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUpdateDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUpdateDirectoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUpdateDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUpdateDirectoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeUpdateDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeUpdateDirectoryErrorKind::DirectoryDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DescribeUpdateDirectoryErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeUpdateDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeUpdateDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeUpdateDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUpdateDirectoryError {
fn code(&self) -> Option<&str> {
DescribeUpdateDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUpdateDirectoryError {
pub fn new(kind: DescribeUpdateDirectoryErrorKind, 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: DescribeUpdateDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUpdateDirectoryErrorKind::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,
DescribeUpdateDirectoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateDirectoryErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateDirectoryErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateDirectoryErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateDirectoryErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for DescribeUpdateDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUpdateDirectoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeUpdateDirectoryErrorKind::ClientException(_inner) => Some(_inner),
DescribeUpdateDirectoryErrorKind::DirectoryDoesNotExistException(_inner) => {
Some(_inner)
}
DescribeUpdateDirectoryErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeUpdateDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeUpdateDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
DescribeUpdateDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTrustsError {
pub kind: DescribeTrustsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTrustsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTrustsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTrustsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTrustsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTrustsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeTrustsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTrustsError {
fn code(&self) -> Option<&str> {
DescribeTrustsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTrustsError {
pub fn new(kind: DescribeTrustsErrorKind, 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: DescribeTrustsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTrustsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DescribeTrustsErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrustsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrustsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrustsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DescribeTrustsErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrustsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeTrustsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTrustsErrorKind::ClientException(_inner) => Some(_inner),
DescribeTrustsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeTrustsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeTrustsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeTrustsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeTrustsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeTrustsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSnapshotsError {
pub kind: DescribeSnapshotsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSnapshotsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSnapshotsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSnapshotsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSnapshotsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSnapshotsError {
fn code(&self) -> Option<&str> {
DescribeSnapshotsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSnapshotsError {
pub fn new(kind: DescribeSnapshotsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DescribeSnapshotsErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DescribeSnapshotsErrorKind::ServiceException(_))
}
}
impl std::error::Error for DescribeSnapshotsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSnapshotsErrorKind::ClientException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSharedDirectoriesError {
pub kind: DescribeSharedDirectoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSharedDirectoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSharedDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSharedDirectoriesErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSharedDirectoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSharedDirectoriesErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeSharedDirectoriesErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DescribeSharedDirectoriesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeSharedDirectoriesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeSharedDirectoriesErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeSharedDirectoriesErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
DescribeSharedDirectoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSharedDirectoriesError {
fn code(&self) -> Option<&str> {
DescribeSharedDirectoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSharedDirectoriesError {
pub fn new(kind: DescribeSharedDirectoriesErrorKind, 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: DescribeSharedDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSharedDirectoriesErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSharedDirectoriesErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeSharedDirectoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSharedDirectoriesErrorKind::ClientException(_inner) => Some(_inner),
DescribeSharedDirectoriesErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeSharedDirectoriesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeSharedDirectoriesErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeSharedDirectoriesErrorKind::ServiceException(_inner) => Some(_inner),
DescribeSharedDirectoriesErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
DescribeSharedDirectoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSettingsError {
pub kind: DescribeSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSettingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSettingsErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSettingsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSettingsError {
fn code(&self) -> Option<&str> {
DescribeSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSettingsError {
pub fn new(kind: DescribeSettingsErrorKind, 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: DescribeSettingsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSettingsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DescribeSettingsErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSettingsErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSettingsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSettingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DescribeSettingsErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSettingsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSettingsErrorKind::ClientException(_inner) => Some(_inner),
DescribeSettingsErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DescribeSettingsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeSettingsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeSettingsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeSettingsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRegionsError {
pub kind: DescribeRegionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRegionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRegionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRegionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRegionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRegionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeRegionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRegionsError {
fn code(&self) -> Option<&str> {
DescribeRegionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRegionsError {
pub fn new(kind: DescribeRegionsErrorKind, 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: DescribeRegionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRegionsErrorKind::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,
DescribeRegionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DescribeRegionsErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegionsErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegionsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegionsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DescribeRegionsErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRegionsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeRegionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRegionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeRegionsErrorKind::ClientException(_inner) => Some(_inner),
DescribeRegionsErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DescribeRegionsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeRegionsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeRegionsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeRegionsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeRegionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLDAPSSettingsError {
pub kind: DescribeLDAPSSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLDAPSSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLDAPSSettingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLDAPSSettingsErrorKind {
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLDAPSSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLDAPSSettingsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeLDAPSSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLDAPSSettingsError {
fn code(&self) -> Option<&str> {
DescribeLDAPSSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLDAPSSettingsError {
pub fn new(kind: DescribeLDAPSSettingsErrorKind, 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: DescribeLDAPSSettingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLDAPSSettingsErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLDAPSSettingsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeLDAPSSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLDAPSSettingsErrorKind::ClientException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeLDAPSSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventTopicsError {
pub kind: DescribeEventTopicsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventTopicsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventTopicsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventTopicsErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventTopicsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventTopicsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeEventTopicsErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DescribeEventTopicsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeEventTopicsErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeEventTopicsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventTopicsError {
fn code(&self) -> Option<&str> {
DescribeEventTopicsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventTopicsError {
pub fn new(kind: DescribeEventTopicsErrorKind, 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: DescribeEventTopicsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventTopicsErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DescribeEventTopicsErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEventTopicsErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEventTopicsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEventTopicsErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for DescribeEventTopicsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventTopicsErrorKind::ClientException(_inner) => Some(_inner),
DescribeEventTopicsErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeEventTopicsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeEventTopicsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeEventTopicsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDomainControllersError {
pub kind: DescribeDomainControllersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDomainControllersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDomainControllersErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDomainControllersErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDomainControllersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDomainControllersErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeDomainControllersErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DescribeDomainControllersErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeDomainControllersErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeDomainControllersErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeDomainControllersErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
DescribeDomainControllersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDomainControllersError {
fn code(&self) -> Option<&str> {
DescribeDomainControllersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDomainControllersError {
pub fn new(kind: DescribeDomainControllersErrorKind, 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: DescribeDomainControllersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDomainControllersErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDomainControllersErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeDomainControllersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDomainControllersErrorKind::ClientException(_inner) => Some(_inner),
DescribeDomainControllersErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeDomainControllersErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeDomainControllersErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeDomainControllersErrorKind::ServiceException(_inner) => Some(_inner),
DescribeDomainControllersErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
DescribeDomainControllersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDirectoriesError {
pub kind: DescribeDirectoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDirectoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDirectoriesErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDirectoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDirectoriesErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeDirectoriesErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DescribeDirectoriesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeDirectoriesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeDirectoriesErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeDirectoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDirectoriesError {
fn code(&self) -> Option<&str> {
DescribeDirectoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDirectoriesError {
pub fn new(kind: DescribeDirectoriesErrorKind, 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: DescribeDirectoriesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDirectoriesErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DescribeDirectoriesErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDirectoriesErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDirectoriesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDirectoriesErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDirectoriesErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for DescribeDirectoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDirectoriesErrorKind::ClientException(_inner) => Some(_inner),
DescribeDirectoriesErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DescribeDirectoriesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeDirectoriesErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeDirectoriesErrorKind::ServiceException(_inner) => Some(_inner),
DescribeDirectoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeConditionalForwardersError {
pub kind: DescribeConditionalForwardersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeConditionalForwardersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeConditionalForwardersErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeConditionalForwardersErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeConditionalForwardersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeConditionalForwardersErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeConditionalForwardersErrorKind::DirectoryUnavailableException(_inner) => {
_inner.fmt(f)
}
DescribeConditionalForwardersErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DescribeConditionalForwardersErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeConditionalForwardersErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeConditionalForwardersErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
DescribeConditionalForwardersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeConditionalForwardersError {
fn code(&self) -> Option<&str> {
DescribeConditionalForwardersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeConditionalForwardersError {
pub fn new(
kind: DescribeConditionalForwardersErrorKind,
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: DescribeConditionalForwardersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeConditionalForwardersErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConditionalForwardersErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeConditionalForwardersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeConditionalForwardersErrorKind::ClientException(_inner) => Some(_inner),
DescribeConditionalForwardersErrorKind::DirectoryUnavailableException(_inner) => {
Some(_inner)
}
DescribeConditionalForwardersErrorKind::EntityDoesNotExistException(_inner) => {
Some(_inner)
}
DescribeConditionalForwardersErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeConditionalForwardersErrorKind::ServiceException(_inner) => Some(_inner),
DescribeConditionalForwardersErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
DescribeConditionalForwardersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeClientAuthenticationSettingsError {
pub kind: DescribeClientAuthenticationSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeClientAuthenticationSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeClientAuthenticationSettingsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeClientAuthenticationSettingsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeClientAuthenticationSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeClientAuthenticationSettingsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeClientAuthenticationSettingsErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeClientAuthenticationSettingsErrorKind::DirectoryDoesNotExistException(
_inner,
) => _inner.fmt(f),
DescribeClientAuthenticationSettingsErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeClientAuthenticationSettingsErrorKind::ServiceException(_inner) => {
_inner.fmt(f)
}
DescribeClientAuthenticationSettingsErrorKind::UnsupportedOperationException(
_inner,
) => _inner.fmt(f),
DescribeClientAuthenticationSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeClientAuthenticationSettingsError {
fn code(&self) -> Option<&str> {
DescribeClientAuthenticationSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeClientAuthenticationSettingsError {
pub fn new(
kind: DescribeClientAuthenticationSettingsErrorKind,
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: DescribeClientAuthenticationSettingsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeClientAuthenticationSettingsErrorKind::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,
DescribeClientAuthenticationSettingsErrorKind::AccessDeniedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientAuthenticationSettingsErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientAuthenticationSettingsErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientAuthenticationSettingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientAuthenticationSettingsErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeClientAuthenticationSettingsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeClientAuthenticationSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeClientAuthenticationSettingsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeClientAuthenticationSettingsErrorKind::ClientException(_inner) => Some(_inner),
DescribeClientAuthenticationSettingsErrorKind::DirectoryDoesNotExistException(
_inner,
) => Some(_inner),
DescribeClientAuthenticationSettingsErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeClientAuthenticationSettingsErrorKind::ServiceException(_inner) => Some(_inner),
DescribeClientAuthenticationSettingsErrorKind::UnsupportedOperationException(
_inner,
) => Some(_inner),
DescribeClientAuthenticationSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCertificateError {
pub kind: DescribeCertificateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCertificateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCertificateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCertificateErrorKind {
CertificateDoesNotExistException(crate::error::CertificateDoesNotExistException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCertificateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCertificateErrorKind::CertificateDoesNotExistException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::ClientException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::ServiceException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeCertificateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCertificateError {
fn code(&self) -> Option<&str> {
DescribeCertificateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCertificateError {
pub fn new(kind: DescribeCertificateErrorKind, 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: DescribeCertificateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCertificateErrorKind::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_certificate_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCertificateErrorKind::CertificateDoesNotExistException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DescribeCertificateErrorKind::ClientException(_))
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCertificateErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCertificateErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCertificateErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCertificateErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeCertificateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCertificateErrorKind::CertificateDoesNotExistException(_inner) => Some(_inner),
DescribeCertificateErrorKind::ClientException(_inner) => Some(_inner),
DescribeCertificateErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DescribeCertificateErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeCertificateErrorKind::ServiceException(_inner) => Some(_inner),
DescribeCertificateErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeCertificateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateDoesNotExistException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl CertificateDoesNotExistException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl CertificateDoesNotExistException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CertificateDoesNotExistException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CertificateDoesNotExistException")?;
if let Some(inner_31) = &self.message {
{
write!(f, ": {}", inner_31)?;
}
}
Ok(())
}
}
impl std::error::Error for CertificateDoesNotExistException {}
pub mod certificate_does_not_exist_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::CertificateDoesNotExistException {
crate::error::CertificateDoesNotExistException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl CertificateDoesNotExistException {
pub fn builder() -> crate::error::certificate_does_not_exist_exception::Builder {
crate::error::certificate_does_not_exist_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterEventTopicError {
pub kind: DeregisterEventTopicErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterEventTopicError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterEventTopicErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterEventTopicErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeregisterEventTopicError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterEventTopicErrorKind::ClientException(_inner) => _inner.fmt(f),
DeregisterEventTopicErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DeregisterEventTopicErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeregisterEventTopicErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeregisterEventTopicErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterEventTopicError {
fn code(&self) -> Option<&str> {
DeregisterEventTopicError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterEventTopicError {
pub fn new(kind: DeregisterEventTopicErrorKind, 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: DeregisterEventTopicErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterEventTopicErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterEventTopicErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterEventTopicErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterEventTopicErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterEventTopicErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for DeregisterEventTopicError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterEventTopicErrorKind::ClientException(_inner) => Some(_inner),
DeregisterEventTopicErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DeregisterEventTopicErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeregisterEventTopicErrorKind::ServiceException(_inner) => Some(_inner),
DeregisterEventTopicErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterCertificateError {
pub kind: DeregisterCertificateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterCertificateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterCertificateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterCertificateErrorKind {
CertificateDoesNotExistException(crate::error::CertificateDoesNotExistException),
CertificateInUseException(crate::error::CertificateInUseException),
ClientException(crate::error::ClientException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeregisterCertificateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterCertificateErrorKind::CertificateDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DeregisterCertificateErrorKind::CertificateInUseException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::ClientException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeregisterCertificateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterCertificateError {
fn code(&self) -> Option<&str> {
DeregisterCertificateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterCertificateError {
pub fn new(kind: DeregisterCertificateErrorKind, 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: DeregisterCertificateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterCertificateErrorKind::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_certificate_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::CertificateDoesNotExistException(_)
)
}
pub fn is_certificate_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::CertificateInUseException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::ClientException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterCertificateErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeregisterCertificateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterCertificateErrorKind::CertificateDoesNotExistException(_inner) => {
Some(_inner)
}
DeregisterCertificateErrorKind::CertificateInUseException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::ClientException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::ServiceException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeregisterCertificateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateInUseException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl CertificateInUseException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl CertificateInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CertificateInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CertificateInUseException")?;
if let Some(inner_32) = &self.message {
{
write!(f, ": {}", inner_32)?;
}
}
Ok(())
}
}
impl std::error::Error for CertificateInUseException {}
pub mod certificate_in_use_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::CertificateInUseException {
crate::error::CertificateInUseException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl CertificateInUseException {
pub fn builder() -> crate::error::certificate_in_use_exception::Builder {
crate::error::certificate_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTrustError {
pub kind: DeleteTrustErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTrustError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTrustErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTrustErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTrustError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTrustErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteTrustErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DeleteTrustErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteTrustErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteTrustErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeleteTrustErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTrustError {
fn code(&self) -> Option<&str> {
DeleteTrustError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTrustError {
pub fn new(kind: DeleteTrustErrorKind, 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: DeleteTrustErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTrustErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DeleteTrustErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTrustErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTrustErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteTrustErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTrustErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteTrustError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTrustErrorKind::ClientException(_inner) => Some(_inner),
DeleteTrustErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DeleteTrustErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteTrustErrorKind::ServiceException(_inner) => Some(_inner),
DeleteTrustErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeleteTrustErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSnapshotError {
pub kind: DeleteSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSnapshotErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSnapshotErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSnapshotError {
fn code(&self) -> Option<&str> {
DeleteSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSnapshotError {
pub fn new(kind: DeleteSnapshotErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, DeleteSnapshotErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteSnapshotErrorKind::ServiceException(_))
}
}
impl std::error::Error for DeleteSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSnapshotErrorKind::ClientException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::ServiceException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLogSubscriptionError {
pub kind: DeleteLogSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLogSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLogSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLogSubscriptionErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLogSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLogSubscriptionErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteLogSubscriptionErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DeleteLogSubscriptionErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteLogSubscriptionErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeleteLogSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLogSubscriptionError {
fn code(&self) -> Option<&str> {
DeleteLogSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLogSubscriptionError {
pub fn new(kind: DeleteLogSubscriptionErrorKind, 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: DeleteLogSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLogSubscriptionErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLogSubscriptionErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLogSubscriptionErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLogSubscriptionErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLogSubscriptionErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteLogSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLogSubscriptionErrorKind::ClientException(_inner) => Some(_inner),
DeleteLogSubscriptionErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DeleteLogSubscriptionErrorKind::ServiceException(_inner) => Some(_inner),
DeleteLogSubscriptionErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeleteLogSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDirectoryError {
pub kind: DeleteDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDirectoryErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteDirectoryErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
DeleteDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDirectoryError {
fn code(&self) -> Option<&str> {
DeleteDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDirectoryError {
pub fn new(kind: DeleteDirectoryErrorKind, 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: DeleteDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, DeleteDirectoryErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDirectoryErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, DeleteDirectoryErrorKind::ServiceException(_))
}
}
impl std::error::Error for DeleteDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDirectoryErrorKind::ClientException(_inner) => Some(_inner),
DeleteDirectoryErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
DeleteDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
DeleteDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConditionalForwarderError {
pub kind: DeleteConditionalForwarderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConditionalForwarderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConditionalForwarderErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConditionalForwarderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConditionalForwarderErrorKind::ClientException(_inner) => _inner.fmt(f),
DeleteConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
_inner.fmt(f)
}
DeleteConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
DeleteConditionalForwarderErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteConditionalForwarderErrorKind::ServiceException(_inner) => _inner.fmt(f),
DeleteConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
DeleteConditionalForwarderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConditionalForwarderError {
fn code(&self) -> Option<&str> {
DeleteConditionalForwarderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConditionalForwarderError {
pub fn new(kind: DeleteConditionalForwarderErrorKind, 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: DeleteConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConditionalForwarderErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConditionalForwarderErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteConditionalForwarderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConditionalForwarderErrorKind::ClientException(_inner) => Some(_inner),
DeleteConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
Some(_inner)
}
DeleteConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
Some(_inner)
}
DeleteConditionalForwarderErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteConditionalForwarderErrorKind::ServiceException(_inner) => Some(_inner),
DeleteConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
DeleteConditionalForwarderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTrustError {
pub kind: CreateTrustErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTrustError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTrustErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTrustErrorKind {
ClientException(crate::error::ClientException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTrustError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTrustErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
CreateTrustErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTrustError {
fn code(&self) -> Option<&str> {
CreateTrustError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTrustError {
pub fn new(kind: CreateTrustErrorKind, 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: CreateTrustErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTrustErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, CreateTrustErrorKind::ClientException(_))
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateTrustErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateTrustErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateTrustErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateTrustErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateTrustErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for CreateTrustError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTrustErrorKind::ClientException(_inner) => Some(_inner),
CreateTrustErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
CreateTrustErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CreateTrustErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateTrustErrorKind::ServiceException(_inner) => Some(_inner),
CreateTrustErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
CreateTrustErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSnapshotError {
pub kind: CreateSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSnapshotErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
SnapshotLimitExceededException(crate::error::SnapshotLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSnapshotErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::SnapshotLimitExceededException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSnapshotError {
fn code(&self) -> Option<&str> {
CreateSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSnapshotError {
pub fn new(kind: CreateSnapshotErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateSnapshotErrorKind::ServiceException(_))
}
pub fn is_snapshot_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::SnapshotLimitExceededException(_)
)
}
}
impl std::error::Error for CreateSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSnapshotErrorKind::ClientException(_inner) => Some(_inner),
CreateSnapshotErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CreateSnapshotErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateSnapshotErrorKind::ServiceException(_inner) => Some(_inner),
CreateSnapshotErrorKind::SnapshotLimitExceededException(_inner) => Some(_inner),
CreateSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateMicrosoftADError {
pub kind: CreateMicrosoftADErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateMicrosoftADError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateMicrosoftADErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateMicrosoftADErrorKind {
ClientException(crate::error::ClientException),
DirectoryLimitExceededException(crate::error::DirectoryLimitExceededException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateMicrosoftADError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateMicrosoftADErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateMicrosoftADErrorKind::DirectoryLimitExceededException(_inner) => _inner.fmt(f),
CreateMicrosoftADErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateMicrosoftADErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateMicrosoftADErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
CreateMicrosoftADErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateMicrosoftADError {
fn code(&self) -> Option<&str> {
CreateMicrosoftADError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateMicrosoftADError {
pub fn new(kind: CreateMicrosoftADErrorKind, 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: CreateMicrosoftADErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateMicrosoftADErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, CreateMicrosoftADErrorKind::ClientException(_))
}
pub fn is_directory_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateMicrosoftADErrorKind::DirectoryLimitExceededException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateMicrosoftADErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateMicrosoftADErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateMicrosoftADErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for CreateMicrosoftADError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateMicrosoftADErrorKind::ClientException(_inner) => Some(_inner),
CreateMicrosoftADErrorKind::DirectoryLimitExceededException(_inner) => Some(_inner),
CreateMicrosoftADErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateMicrosoftADErrorKind::ServiceException(_inner) => Some(_inner),
CreateMicrosoftADErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
CreateMicrosoftADErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryLimitExceededException")?;
if let Some(inner_33) = &self.message {
{
write!(f, ": {}", inner_33)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryLimitExceededException {}
pub mod directory_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryLimitExceededException {
crate::error::DirectoryLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryLimitExceededException {
pub fn builder() -> crate::error::directory_limit_exceeded_exception::Builder {
crate::error::directory_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLogSubscriptionError {
pub kind: CreateLogSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLogSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLogSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLogSubscriptionErrorKind {
ClientException(crate::error::ClientException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InsufficientPermissionsException(crate::error::InsufficientPermissionsException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLogSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLogSubscriptionErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateLogSubscriptionErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
CreateLogSubscriptionErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CreateLogSubscriptionErrorKind::InsufficientPermissionsException(_inner) => {
_inner.fmt(f)
}
CreateLogSubscriptionErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateLogSubscriptionErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
CreateLogSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLogSubscriptionError {
fn code(&self) -> Option<&str> {
CreateLogSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLogSubscriptionError {
pub fn new(kind: CreateLogSubscriptionErrorKind, 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: CreateLogSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLogSubscriptionErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::ClientException(_)
)
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_insufficient_permissions_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::InsufficientPermissionsException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateLogSubscriptionErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for CreateLogSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLogSubscriptionErrorKind::ClientException(_inner) => Some(_inner),
CreateLogSubscriptionErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
CreateLogSubscriptionErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CreateLogSubscriptionErrorKind::InsufficientPermissionsException(_inner) => {
Some(_inner)
}
CreateLogSubscriptionErrorKind::ServiceException(_inner) => Some(_inner),
CreateLogSubscriptionErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
CreateLogSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDirectoryError {
pub kind: CreateDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDirectoryErrorKind {
ClientException(crate::error::ClientException),
DirectoryLimitExceededException(crate::error::DirectoryLimitExceededException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateDirectoryErrorKind::DirectoryLimitExceededException(_inner) => _inner.fmt(f),
CreateDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDirectoryError {
fn code(&self) -> Option<&str> {
CreateDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDirectoryError {
pub fn new(kind: CreateDirectoryErrorKind, 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: CreateDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, CreateDirectoryErrorKind::ClientException(_))
}
pub fn is_directory_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryErrorKind::DirectoryLimitExceededException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateDirectoryErrorKind::ServiceException(_))
}
}
impl std::error::Error for CreateDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDirectoryErrorKind::ClientException(_inner) => Some(_inner),
CreateDirectoryErrorKind::DirectoryLimitExceededException(_inner) => Some(_inner),
CreateDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
CreateDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConditionalForwarderError {
pub kind: CreateConditionalForwarderErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConditionalForwarderError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConditionalForwarderErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConditionalForwarderError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConditionalForwarderErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
_inner.fmt(f)
}
CreateConditionalForwarderErrorKind::EntityAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
_inner.fmt(f)
}
CreateConditionalForwarderErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateConditionalForwarderErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
_inner.fmt(f)
}
CreateConditionalForwarderErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConditionalForwarderError {
fn code(&self) -> Option<&str> {
CreateConditionalForwarderError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConditionalForwarderError {
pub fn new(kind: CreateConditionalForwarderErrorKind, 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: CreateConditionalForwarderErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConditionalForwarderErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::ClientException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::ServiceException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateConditionalForwarderErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for CreateConditionalForwarderError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConditionalForwarderErrorKind::ClientException(_inner) => Some(_inner),
CreateConditionalForwarderErrorKind::DirectoryUnavailableException(_inner) => {
Some(_inner)
}
CreateConditionalForwarderErrorKind::EntityAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateConditionalForwarderErrorKind::EntityDoesNotExistException(_inner) => {
Some(_inner)
}
CreateConditionalForwarderErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateConditionalForwarderErrorKind::ServiceException(_inner) => Some(_inner),
CreateConditionalForwarderErrorKind::UnsupportedOperationException(_inner) => {
Some(_inner)
}
CreateConditionalForwarderErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateComputerError {
pub kind: CreateComputerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateComputerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateComputerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateComputerErrorKind {
AuthenticationFailedException(crate::error::AuthenticationFailedException),
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateComputerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateComputerErrorKind::AuthenticationFailedException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
CreateComputerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateComputerError {
fn code(&self) -> Option<&str> {
CreateComputerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateComputerError {
pub fn new(kind: CreateComputerErrorKind, 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: CreateComputerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateComputerErrorKind::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_authentication_failed_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::AuthenticationFailedException(_)
)
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, CreateComputerErrorKind::ClientException(_))
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateComputerErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateComputerErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for CreateComputerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateComputerErrorKind::AuthenticationFailedException(_inner) => Some(_inner),
CreateComputerErrorKind::ClientException(_inner) => Some(_inner),
CreateComputerErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
CreateComputerErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
CreateComputerErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CreateComputerErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateComputerErrorKind::ServiceException(_inner) => Some(_inner),
CreateComputerErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
CreateComputerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAliasError {
pub kind: CreateAliasErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAliasError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAliasErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAliasErrorKind {
ClientException(crate::error::ClientException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAliasError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAliasErrorKind::ClientException(_inner) => _inner.fmt(f),
CreateAliasErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
CreateAliasErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CreateAliasErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateAliasErrorKind::ServiceException(_inner) => _inner.fmt(f),
CreateAliasErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAliasError {
fn code(&self) -> Option<&str> {
CreateAliasError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAliasError {
pub fn new(kind: CreateAliasErrorKind, 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: CreateAliasErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAliasErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, CreateAliasErrorKind::ClientException(_))
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateAliasErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CreateAliasErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateAliasErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, CreateAliasErrorKind::ServiceException(_))
}
}
impl std::error::Error for CreateAliasError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAliasErrorKind::ClientException(_inner) => Some(_inner),
CreateAliasErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
CreateAliasErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CreateAliasErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateAliasErrorKind::ServiceException(_inner) => Some(_inner),
CreateAliasErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ConnectDirectoryError {
pub kind: ConnectDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ConnectDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ConnectDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ConnectDirectoryErrorKind {
ClientException(crate::error::ClientException),
DirectoryLimitExceededException(crate::error::DirectoryLimitExceededException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ConnectDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ConnectDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
ConnectDirectoryErrorKind::DirectoryLimitExceededException(_inner) => _inner.fmt(f),
ConnectDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ConnectDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
ConnectDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ConnectDirectoryError {
fn code(&self) -> Option<&str> {
ConnectDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ConnectDirectoryError {
pub fn new(kind: ConnectDirectoryErrorKind, 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: ConnectDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ConnectDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, ConnectDirectoryErrorKind::ClientException(_))
}
pub fn is_directory_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ConnectDirectoryErrorKind::DirectoryLimitExceededException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ConnectDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, ConnectDirectoryErrorKind::ServiceException(_))
}
}
impl std::error::Error for ConnectDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ConnectDirectoryErrorKind::ClientException(_inner) => Some(_inner),
ConnectDirectoryErrorKind::DirectoryLimitExceededException(_inner) => Some(_inner),
ConnectDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
ConnectDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
ConnectDirectoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelSchemaExtensionError {
pub kind: CancelSchemaExtensionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelSchemaExtensionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelSchemaExtensionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelSchemaExtensionErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelSchemaExtensionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelSchemaExtensionErrorKind::ClientException(_inner) => _inner.fmt(f),
CancelSchemaExtensionErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
CancelSchemaExtensionErrorKind::ServiceException(_inner) => _inner.fmt(f),
CancelSchemaExtensionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelSchemaExtensionError {
fn code(&self) -> Option<&str> {
CancelSchemaExtensionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelSchemaExtensionError {
pub fn new(kind: CancelSchemaExtensionErrorKind, 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: CancelSchemaExtensionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelSchemaExtensionErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
CancelSchemaExtensionErrorKind::ClientException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
CancelSchemaExtensionErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
CancelSchemaExtensionErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for CancelSchemaExtensionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelSchemaExtensionErrorKind::ClientException(_inner) => Some(_inner),
CancelSchemaExtensionErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
CancelSchemaExtensionErrorKind::ServiceException(_inner) => Some(_inner),
CancelSchemaExtensionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddTagsToResourceError {
pub kind: AddTagsToResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddTagsToResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddTagsToResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddTagsToResourceErrorKind {
ClientException(crate::error::ClientException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
TagLimitExceededException(crate::error::TagLimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddTagsToResourceErrorKind::ClientException(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::ServiceException(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::TagLimitExceededException(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddTagsToResourceError {
fn code(&self) -> Option<&str> {
AddTagsToResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddTagsToResourceError {
pub fn new(kind: AddTagsToResourceErrorKind, 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: AddTagsToResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddTagsToResourceErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, AddTagsToResourceErrorKind::ClientException(_))
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, AddTagsToResourceErrorKind::ServiceException(_))
}
pub fn is_tag_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::TagLimitExceededException(_)
)
}
}
impl std::error::Error for AddTagsToResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddTagsToResourceErrorKind::ClientException(_inner) => Some(_inner),
AddTagsToResourceErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
AddTagsToResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
AddTagsToResourceErrorKind::ServiceException(_inner) => Some(_inner),
AddTagsToResourceErrorKind::TagLimitExceededException(_inner) => Some(_inner),
AddTagsToResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl TagLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl TagLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TagLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TagLimitExceededException")?;
if let Some(inner_34) = &self.message {
{
write!(f, ": {}", inner_34)?;
}
}
Ok(())
}
}
impl std::error::Error for TagLimitExceededException {}
pub mod tag_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::TagLimitExceededException {
crate::error::TagLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl TagLimitExceededException {
pub fn builder() -> crate::error::tag_limit_exceeded_exception::Builder {
crate::error::tag_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddRegionError {
pub kind: AddRegionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddRegionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddRegionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddRegionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ClientException(crate::error::ClientException),
DirectoryAlreadyInRegionException(crate::error::DirectoryAlreadyInRegionException),
DirectoryDoesNotExistException(crate::error::DirectoryDoesNotExistException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
RegionLimitExceededException(crate::error::RegionLimitExceededException),
ServiceException(crate::error::ServiceException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddRegionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddRegionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AddRegionErrorKind::ClientException(_inner) => _inner.fmt(f),
AddRegionErrorKind::DirectoryAlreadyInRegionException(_inner) => _inner.fmt(f),
AddRegionErrorKind::DirectoryDoesNotExistException(_inner) => _inner.fmt(f),
AddRegionErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
AddRegionErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
AddRegionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AddRegionErrorKind::RegionLimitExceededException(_inner) => _inner.fmt(f),
AddRegionErrorKind::ServiceException(_inner) => _inner.fmt(f),
AddRegionErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
AddRegionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddRegionError {
fn code(&self) -> Option<&str> {
AddRegionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddRegionError {
pub fn new(kind: AddRegionErrorKind, 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: AddRegionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddRegionErrorKind::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, AddRegionErrorKind::AccessDeniedException(_))
}
pub fn is_client_exception(&self) -> bool {
matches!(&self.kind, AddRegionErrorKind::ClientException(_))
}
pub fn is_directory_already_in_region_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::DirectoryAlreadyInRegionException(_)
)
}
pub fn is_directory_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::DirectoryDoesNotExistException(_)
)
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(&self.kind, AddRegionErrorKind::InvalidParameterException(_))
}
pub fn is_region_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::RegionLimitExceededException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, AddRegionErrorKind::ServiceException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
AddRegionErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for AddRegionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddRegionErrorKind::AccessDeniedException(_inner) => Some(_inner),
AddRegionErrorKind::ClientException(_inner) => Some(_inner),
AddRegionErrorKind::DirectoryAlreadyInRegionException(_inner) => Some(_inner),
AddRegionErrorKind::DirectoryDoesNotExistException(_inner) => Some(_inner),
AddRegionErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
AddRegionErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
AddRegionErrorKind::InvalidParameterException(_inner) => Some(_inner),
AddRegionErrorKind::RegionLimitExceededException(_inner) => Some(_inner),
AddRegionErrorKind::ServiceException(_inner) => Some(_inner),
AddRegionErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
AddRegionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegionLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl RegionLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl RegionLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RegionLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RegionLimitExceededException")?;
if let Some(inner_35) = &self.message {
{
write!(f, ": {}", inner_35)?;
}
}
Ok(())
}
}
impl std::error::Error for RegionLimitExceededException {}
pub mod region_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::RegionLimitExceededException {
crate::error::RegionLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl RegionLimitExceededException {
pub fn builder() -> crate::error::region_limit_exceeded_exception::Builder {
crate::error::region_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectoryAlreadyInRegionException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl DirectoryAlreadyInRegionException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl DirectoryAlreadyInRegionException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DirectoryAlreadyInRegionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DirectoryAlreadyInRegionException")?;
if let Some(inner_36) = &self.message {
{
write!(f, ": {}", inner_36)?;
}
}
Ok(())
}
}
impl std::error::Error for DirectoryAlreadyInRegionException {}
pub mod directory_already_in_region_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) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::DirectoryAlreadyInRegionException {
crate::error::DirectoryAlreadyInRegionException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl DirectoryAlreadyInRegionException {
pub fn builder() -> crate::error::directory_already_in_region_exception::Builder {
crate::error::directory_already_in_region_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddIpRoutesError {
pub kind: AddIpRoutesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddIpRoutesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddIpRoutesErrorKind {
ClientException(crate::error::ClientException),
DirectoryUnavailableException(crate::error::DirectoryUnavailableException),
EntityAlreadyExistsException(crate::error::EntityAlreadyExistsException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
IpRouteLimitExceededException(crate::error::IpRouteLimitExceededException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddIpRoutesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddIpRoutesErrorKind::ClientException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::DirectoryUnavailableException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::EntityAlreadyExistsException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::IpRouteLimitExceededException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::ServiceException(_inner) => _inner.fmt(f),
AddIpRoutesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddIpRoutesError {
fn code(&self) -> Option<&str> {
AddIpRoutesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddIpRoutesError {
pub fn new(kind: AddIpRoutesErrorKind, 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: AddIpRoutesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddIpRoutesErrorKind::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_client_exception(&self) -> bool {
matches!(&self.kind, AddIpRoutesErrorKind::ClientException(_))
}
pub fn is_directory_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddIpRoutesErrorKind::DirectoryUnavailableException(_)
)
}
pub fn is_entity_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
AddIpRoutesErrorKind::EntityAlreadyExistsException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
AddIpRoutesErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AddIpRoutesErrorKind::InvalidParameterException(_)
)
}
pub fn is_ip_route_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AddIpRoutesErrorKind::IpRouteLimitExceededException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(&self.kind, AddIpRoutesErrorKind::ServiceException(_))
}
}
impl std::error::Error for AddIpRoutesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddIpRoutesErrorKind::ClientException(_inner) => Some(_inner),
AddIpRoutesErrorKind::DirectoryUnavailableException(_inner) => Some(_inner),
AddIpRoutesErrorKind::EntityAlreadyExistsException(_inner) => Some(_inner),
AddIpRoutesErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
AddIpRoutesErrorKind::InvalidParameterException(_inner) => Some(_inner),
AddIpRoutesErrorKind::IpRouteLimitExceededException(_inner) => Some(_inner),
AddIpRoutesErrorKind::ServiceException(_inner) => Some(_inner),
AddIpRoutesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IpRouteLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl IpRouteLimitExceededException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl IpRouteLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IpRouteLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IpRouteLimitExceededException")?;
if let Some(inner_37) = &self.message {
{
write!(f, ": {}", inner_37)?;
}
}
Ok(())
}
}
impl std::error::Error for IpRouteLimitExceededException {}
pub mod ip_route_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>,
pub(crate) request_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 request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::IpRouteLimitExceededException {
crate::error::IpRouteLimitExceededException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl IpRouteLimitExceededException {
pub fn builder() -> crate::error::ip_route_limit_exceeded_exception::Builder {
crate::error::ip_route_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AcceptSharedDirectoryError {
pub kind: AcceptSharedDirectoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AcceptSharedDirectoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AcceptSharedDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AcceptSharedDirectoryErrorKind {
ClientException(crate::error::ClientException),
DirectoryAlreadySharedException(crate::error::DirectoryAlreadySharedException),
EntityDoesNotExistException(crate::error::EntityDoesNotExistException),
InvalidParameterException(crate::error::InvalidParameterException),
ServiceException(crate::error::ServiceException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AcceptSharedDirectoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AcceptSharedDirectoryErrorKind::ClientException(_inner) => _inner.fmt(f),
AcceptSharedDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => {
_inner.fmt(f)
}
AcceptSharedDirectoryErrorKind::EntityDoesNotExistException(_inner) => _inner.fmt(f),
AcceptSharedDirectoryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AcceptSharedDirectoryErrorKind::ServiceException(_inner) => _inner.fmt(f),
AcceptSharedDirectoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AcceptSharedDirectoryError {
fn code(&self) -> Option<&str> {
AcceptSharedDirectoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AcceptSharedDirectoryError {
pub fn new(kind: AcceptSharedDirectoryErrorKind, 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: AcceptSharedDirectoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AcceptSharedDirectoryErrorKind::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_client_exception(&self) -> bool {
matches!(
&self.kind,
AcceptSharedDirectoryErrorKind::ClientException(_)
)
}
pub fn is_directory_already_shared_exception(&self) -> bool {
matches!(
&self.kind,
AcceptSharedDirectoryErrorKind::DirectoryAlreadySharedException(_)
)
}
pub fn is_entity_does_not_exist_exception(&self) -> bool {
matches!(
&self.kind,
AcceptSharedDirectoryErrorKind::EntityDoesNotExistException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AcceptSharedDirectoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_service_exception(&self) -> bool {
matches!(
&self.kind,
AcceptSharedDirectoryErrorKind::ServiceException(_)
)
}
}
impl std::error::Error for AcceptSharedDirectoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AcceptSharedDirectoryErrorKind::ClientException(_inner) => Some(_inner),
AcceptSharedDirectoryErrorKind::DirectoryAlreadySharedException(_inner) => Some(_inner),
AcceptSharedDirectoryErrorKind::EntityDoesNotExistException(_inner) => Some(_inner),
AcceptSharedDirectoryErrorKind::InvalidParameterException(_inner) => Some(_inner),
AcceptSharedDirectoryErrorKind::ServiceException(_inner) => Some(_inner),
AcceptSharedDirectoryErrorKind::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 _)
}
}