#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateS3ResourcesError {
pub kind: UpdateS3ResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateS3ResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateS3ResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateS3ResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateS3ResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateS3ResourcesErrorKind::InternalException(_inner) => _inner.fmt(f),
UpdateS3ResourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
UpdateS3ResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateS3ResourcesError {
fn code(&self) -> Option<&str> {
UpdateS3ResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateS3ResourcesError {
pub fn new(kind: UpdateS3ResourcesErrorKind, 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: UpdateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateS3ResourcesErrorKind::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,
UpdateS3ResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_exception(&self) -> bool {
matches!(&self.kind, UpdateS3ResourcesErrorKind::InternalException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
UpdateS3ResourcesErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for UpdateS3ResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateS3ResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateS3ResourcesErrorKind::InternalException(_inner) => Some(_inner),
UpdateS3ResourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
UpdateS3ResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidInputException {
#[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub field_name: std::option::Option<std::string::String>,
}
impl InvalidInputException {
pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
pub fn field_name(&self) -> std::option::Option<&str> {
self.field_name.as_deref()
}
}
impl InvalidInputException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidInputException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidInputException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidInputException {}
pub mod invalid_input_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) field_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn field_name(mut self, input: impl Into<std::string::String>) -> Self {
self.field_name = Some(input.into());
self
}
pub fn set_field_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.field_name = input;
self
}
pub fn build(self) -> crate::error::InvalidInputException {
crate::error::InvalidInputException {
error_code: self.error_code,
message: self.message,
field_name: self.field_name,
}
}
}
}
impl InvalidInputException {
pub fn builder() -> crate::error::invalid_input_exception::Builder {
crate::error::invalid_input_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalException {
#[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalException {
pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
}
impl InternalException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalException {}
pub mod internal_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalException {
crate::error::InternalException {
error_code: self.error_code,
message: self.message,
}
}
}
}
impl InternalException {
pub fn builder() -> crate::error::internal_exception::Builder {
crate::error::internal_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
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) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
resource_type: self.resource_type,
}
}
}
}
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 ListS3ResourcesError {
pub kind: ListS3ResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListS3ResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListS3ResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListS3ResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListS3ResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListS3ResourcesErrorKind::InternalException(_inner) => _inner.fmt(f),
ListS3ResourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListS3ResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListS3ResourcesError {
fn code(&self) -> Option<&str> {
ListS3ResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListS3ResourcesError {
pub fn new(kind: ListS3ResourcesErrorKind, 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: ListS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListS3ResourcesErrorKind::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,
ListS3ResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_exception(&self) -> bool {
matches!(&self.kind, ListS3ResourcesErrorKind::InternalException(_))
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListS3ResourcesErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for ListS3ResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListS3ResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListS3ResourcesErrorKind::InternalException(_inner) => Some(_inner),
ListS3ResourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
ListS3ResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMemberAccountsError {
pub kind: ListMemberAccountsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListMemberAccountsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListMemberAccountsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMemberAccountsErrorKind {
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListMemberAccountsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMemberAccountsErrorKind::InternalException(_inner) => _inner.fmt(f),
ListMemberAccountsErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
ListMemberAccountsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMemberAccountsError {
fn code(&self) -> Option<&str> {
ListMemberAccountsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMemberAccountsError {
pub fn new(kind: ListMemberAccountsErrorKind, 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: ListMemberAccountsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMemberAccountsErrorKind::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_internal_exception(&self) -> bool {
matches!(
&self.kind,
ListMemberAccountsErrorKind::InternalException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
ListMemberAccountsErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for ListMemberAccountsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMemberAccountsErrorKind::InternalException(_inner) => Some(_inner),
ListMemberAccountsErrorKind::InvalidInputException(_inner) => Some(_inner),
ListMemberAccountsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateS3ResourcesError {
pub kind: DisassociateS3ResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateS3ResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateS3ResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateS3ResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateS3ResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateS3ResourcesErrorKind::InternalException(_inner) => _inner.fmt(f),
DisassociateS3ResourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DisassociateS3ResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateS3ResourcesError {
fn code(&self) -> Option<&str> {
DisassociateS3ResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateS3ResourcesError {
pub fn new(kind: DisassociateS3ResourcesErrorKind, 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: DisassociateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateS3ResourcesErrorKind::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,
DisassociateS3ResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateS3ResourcesErrorKind::InternalException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateS3ResourcesErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DisassociateS3ResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateS3ResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateS3ResourcesErrorKind::InternalException(_inner) => Some(_inner),
DisassociateS3ResourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
DisassociateS3ResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateMemberAccountError {
pub kind: DisassociateMemberAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateMemberAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateMemberAccountErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateMemberAccountErrorKind {
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateMemberAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateMemberAccountErrorKind::InternalException(_inner) => _inner.fmt(f),
DisassociateMemberAccountErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
DisassociateMemberAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateMemberAccountError {
fn code(&self) -> Option<&str> {
DisassociateMemberAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateMemberAccountError {
pub fn new(kind: DisassociateMemberAccountErrorKind, 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: DisassociateMemberAccountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateMemberAccountErrorKind::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_internal_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateMemberAccountErrorKind::InternalException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateMemberAccountErrorKind::InvalidInputException(_)
)
}
}
impl std::error::Error for DisassociateMemberAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateMemberAccountErrorKind::InternalException(_inner) => Some(_inner),
DisassociateMemberAccountErrorKind::InvalidInputException(_inner) => Some(_inner),
DisassociateMemberAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateS3ResourcesError {
pub kind: AssociateS3ResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateS3ResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateS3ResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateS3ResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateS3ResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateS3ResourcesErrorKind::InternalException(_inner) => _inner.fmt(f),
AssociateS3ResourcesErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
AssociateS3ResourcesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AssociateS3ResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateS3ResourcesError {
fn code(&self) -> Option<&str> {
AssociateS3ResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateS3ResourcesError {
pub fn new(kind: AssociateS3ResourcesErrorKind, 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: AssociateS3ResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateS3ResourcesErrorKind::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,
AssociateS3ResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_exception(&self) -> bool {
matches!(
&self.kind,
AssociateS3ResourcesErrorKind::InternalException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
AssociateS3ResourcesErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateS3ResourcesErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for AssociateS3ResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateS3ResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateS3ResourcesErrorKind::InternalException(_inner) => Some(_inner),
AssociateS3ResourcesErrorKind::InvalidInputException(_inner) => Some(_inner),
AssociateS3ResourcesErrorKind::LimitExceededException(_inner) => Some(_inner),
AssociateS3ResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[doc(hidden)]
pub error_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn error_code(&self) -> std::option::Option<&str> {
self.error_code.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) error_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn error_code(mut self, input: impl Into<std::string::String>) -> Self {
self.error_code = Some(input.into());
self
}
pub fn set_error_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.error_code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
error_code: self.error_code,
message: self.message,
resource_type: self.resource_type,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateMemberAccountError {
pub kind: AssociateMemberAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateMemberAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateMemberAccountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateMemberAccountErrorKind {
InternalException(crate::error::InternalException),
InvalidInputException(crate::error::InvalidInputException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateMemberAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateMemberAccountErrorKind::InternalException(_inner) => _inner.fmt(f),
AssociateMemberAccountErrorKind::InvalidInputException(_inner) => _inner.fmt(f),
AssociateMemberAccountErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AssociateMemberAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateMemberAccountError {
fn code(&self) -> Option<&str> {
AssociateMemberAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateMemberAccountError {
pub fn new(kind: AssociateMemberAccountErrorKind, 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: AssociateMemberAccountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateMemberAccountErrorKind::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_internal_exception(&self) -> bool {
matches!(
&self.kind,
AssociateMemberAccountErrorKind::InternalException(_)
)
}
pub fn is_invalid_input_exception(&self) -> bool {
matches!(
&self.kind,
AssociateMemberAccountErrorKind::InvalidInputException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateMemberAccountErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for AssociateMemberAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateMemberAccountErrorKind::InternalException(_inner) => Some(_inner),
AssociateMemberAccountErrorKind::InvalidInputException(_inner) => Some(_inner),
AssociateMemberAccountErrorKind::LimitExceededException(_inner) => Some(_inner),
AssociateMemberAccountErrorKind::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 _)
}
}