#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableHealthServiceAccessForOrganizationError {
pub kind: EnableHealthServiceAccessForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for EnableHealthServiceAccessForOrganizationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableHealthServiceAccessForOrganizationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableHealthServiceAccessForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(
_inner,
) => _inner.fmt(f),
EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableHealthServiceAccessForOrganizationError {
fn code(&self) -> Option<&str> {
EnableHealthServiceAccessForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableHealthServiceAccessForOrganizationError {
pub fn new(
kind: EnableHealthServiceAccessForOrganizationErrorKind,
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: EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
EnableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(_)
)
}
}
impl std::error::Error for EnableHealthServiceAccessForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(
_inner,
) => Some(_inner),
EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConcurrentModificationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConcurrentModificationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentModificationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ConcurrentModificationException {}
pub mod concurrent_modification_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::ConcurrentModificationException {
crate::error::ConcurrentModificationException {
message: self.message,
}
}
}
}
impl ConcurrentModificationException {
pub fn builder() -> crate::error::concurrent_modification_exception::Builder {
crate::error::concurrent_modification_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableHealthServiceAccessForOrganizationError {
pub kind: DisableHealthServiceAccessForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DisableHealthServiceAccessForOrganizationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableHealthServiceAccessForOrganizationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableHealthServiceAccessForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(
_inner,
) => _inner.fmt(f),
DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableHealthServiceAccessForOrganizationError {
fn code(&self) -> Option<&str> {
DisableHealthServiceAccessForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableHealthServiceAccessForOrganizationError {
pub fn new(
kind: DisableHealthServiceAccessForOrganizationErrorKind,
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: DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DisableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(_)
)
}
}
impl std::error::Error for DisableHealthServiceAccessForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(
_inner,
) => Some(_inner),
DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeHealthServiceStatusForOrganizationError {
pub kind: DescribeHealthServiceStatusForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeHealthServiceStatusForOrganizationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeHealthServiceStatusForOrganizationErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeHealthServiceStatusForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeHealthServiceStatusForOrganizationError {
fn code(&self) -> Option<&str> {
DescribeHealthServiceStatusForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeHealthServiceStatusForOrganizationError {
pub fn new(
kind: DescribeHealthServiceStatusForOrganizationErrorKind,
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: DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for DescribeHealthServiceStatusForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventTypesError {
pub kind: DescribeEventTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventTypesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventTypesErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventTypesErrorKind::InvalidPaginationToken(_inner) => _inner.fmt(f),
DescribeEventTypesErrorKind::UnsupportedLocale(_inner) => _inner.fmt(f),
DescribeEventTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventTypesError {
fn code(&self) -> Option<&str> {
DescribeEventTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventTypesError {
pub fn new(kind: DescribeEventTypesErrorKind, 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: DescribeEventTypesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventTypesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeEventTypesErrorKind::InvalidPaginationToken(_)
)
}
pub fn is_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeEventTypesErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeEventTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventTypesErrorKind::InvalidPaginationToken(_inner) => Some(_inner),
DescribeEventTypesErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeEventTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedLocale {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedLocale {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedLocale {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedLocale")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedLocale {}
pub mod unsupported_locale {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedLocale {
crate::error::UnsupportedLocale {
message: self.message,
}
}
}
}
impl UnsupportedLocale {
pub fn builder() -> crate::error::unsupported_locale::Builder {
crate::error::unsupported_locale::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPaginationToken {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPaginationToken {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPaginationToken {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPaginationToken")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPaginationToken {}
pub mod invalid_pagination_token {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidPaginationToken {
crate::error::InvalidPaginationToken {
message: self.message,
}
}
}
}
impl InvalidPaginationToken {
pub fn builder() -> crate::error::invalid_pagination_token::Builder {
crate::error::invalid_pagination_token::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventsForOrganizationError {
pub kind: DescribeEventsForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventsForOrganizationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventsForOrganizationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventsForOrganizationErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventsForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventsForOrganizationErrorKind::InvalidPaginationToken(_inner) => _inner.fmt(f),
DescribeEventsForOrganizationErrorKind::UnsupportedLocale(_inner) => _inner.fmt(f),
DescribeEventsForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventsForOrganizationError {
fn code(&self) -> Option<&str> {
DescribeEventsForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventsForOrganizationError {
pub fn new(
kind: DescribeEventsForOrganizationErrorKind,
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: DescribeEventsForOrganizationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventsForOrganizationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeEventsForOrganizationErrorKind::InvalidPaginationToken(_)
)
}
pub fn is_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeEventsForOrganizationErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeEventsForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventsForOrganizationErrorKind::InvalidPaginationToken(_inner) => Some(_inner),
DescribeEventsForOrganizationErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeEventsForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventsError {
pub kind: DescribeEventsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventsErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventsErrorKind::InvalidPaginationToken(_inner) => _inner.fmt(f),
DescribeEventsErrorKind::UnsupportedLocale(_inner) => _inner.fmt(f),
DescribeEventsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventsError {
fn code(&self) -> Option<&str> {
DescribeEventsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventsError {
pub fn new(kind: DescribeEventsErrorKind, 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: DescribeEventsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeEventsErrorKind::InvalidPaginationToken(_)
)
}
pub fn is_unsupported_locale(&self) -> bool {
matches!(&self.kind, DescribeEventsErrorKind::UnsupportedLocale(_))
}
}
impl std::error::Error for DescribeEventsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventsErrorKind::InvalidPaginationToken(_inner) => Some(_inner),
DescribeEventsErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeEventsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventDetailsForOrganizationError {
pub kind: DescribeEventDetailsForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventDetailsForOrganizationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventDetailsForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventDetailsForOrganizationErrorKind {
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventDetailsForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventDetailsForOrganizationErrorKind::UnsupportedLocale(_inner) => {
_inner.fmt(f)
}
DescribeEventDetailsForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventDetailsForOrganizationError {
fn code(&self) -> Option<&str> {
DescribeEventDetailsForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventDetailsForOrganizationError {
pub fn new(
kind: DescribeEventDetailsForOrganizationErrorKind,
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: DescribeEventDetailsForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventDetailsForOrganizationErrorKind::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_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeEventDetailsForOrganizationErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeEventDetailsForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventDetailsForOrganizationErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeEventDetailsForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventDetailsError {
pub kind: DescribeEventDetailsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventDetailsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventDetailsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventDetailsErrorKind {
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventDetailsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventDetailsErrorKind::UnsupportedLocale(_inner) => _inner.fmt(f),
DescribeEventDetailsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventDetailsError {
fn code(&self) -> Option<&str> {
DescribeEventDetailsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventDetailsError {
pub fn new(kind: DescribeEventDetailsErrorKind, 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: DescribeEventDetailsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventDetailsErrorKind::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_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeEventDetailsErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeEventDetailsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventDetailsErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeEventDetailsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventAggregatesError {
pub kind: DescribeEventAggregatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventAggregatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventAggregatesErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventAggregatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventAggregatesErrorKind::InvalidPaginationToken(_inner) => _inner.fmt(f),
DescribeEventAggregatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventAggregatesError {
fn code(&self) -> Option<&str> {
DescribeEventAggregatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventAggregatesError {
pub fn new(kind: DescribeEventAggregatesErrorKind, 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: DescribeEventAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeEventAggregatesErrorKind::InvalidPaginationToken(_)
)
}
}
impl std::error::Error for DescribeEventAggregatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventAggregatesErrorKind::InvalidPaginationToken(_inner) => Some(_inner),
DescribeEventAggregatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEntityAggregatesError {
pub kind: DescribeEntityAggregatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEntityAggregatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEntityAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEntityAggregatesErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEntityAggregatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEntityAggregatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEntityAggregatesError {
fn code(&self) -> Option<&str> {
DescribeEntityAggregatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEntityAggregatesError {
pub fn new(kind: DescribeEntityAggregatesErrorKind, 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: DescribeEntityAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEntityAggregatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for DescribeEntityAggregatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEntityAggregatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAffectedEntitiesForOrganizationError {
pub kind: DescribeAffectedEntitiesForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeAffectedEntitiesForOrganizationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAffectedEntitiesForOrganizationErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAffectedEntitiesForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAffectedEntitiesForOrganizationErrorKind::InvalidPaginationToken(_inner) => {
_inner.fmt(f)
}
DescribeAffectedEntitiesForOrganizationErrorKind::UnsupportedLocale(_inner) => {
_inner.fmt(f)
}
DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAffectedEntitiesForOrganizationError {
fn code(&self) -> Option<&str> {
DescribeAffectedEntitiesForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAffectedEntitiesForOrganizationError {
pub fn new(
kind: DescribeAffectedEntitiesForOrganizationErrorKind,
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: DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeAffectedEntitiesForOrganizationErrorKind::InvalidPaginationToken(_)
)
}
pub fn is_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeAffectedEntitiesForOrganizationErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeAffectedEntitiesForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAffectedEntitiesForOrganizationErrorKind::InvalidPaginationToken(_inner) => {
Some(_inner)
}
DescribeAffectedEntitiesForOrganizationErrorKind::UnsupportedLocale(_inner) => {
Some(_inner)
}
DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAffectedEntitiesError {
pub kind: DescribeAffectedEntitiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAffectedEntitiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAffectedEntitiesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAffectedEntitiesErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAffectedEntitiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAffectedEntitiesErrorKind::InvalidPaginationToken(_inner) => _inner.fmt(f),
DescribeAffectedEntitiesErrorKind::UnsupportedLocale(_inner) => _inner.fmt(f),
DescribeAffectedEntitiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAffectedEntitiesError {
fn code(&self) -> Option<&str> {
DescribeAffectedEntitiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAffectedEntitiesError {
pub fn new(kind: DescribeAffectedEntitiesErrorKind, 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: DescribeAffectedEntitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAffectedEntitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeAffectedEntitiesErrorKind::InvalidPaginationToken(_)
)
}
pub fn is_unsupported_locale(&self) -> bool {
matches!(
&self.kind,
DescribeAffectedEntitiesErrorKind::UnsupportedLocale(_)
)
}
}
impl std::error::Error for DescribeAffectedEntitiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAffectedEntitiesErrorKind::InvalidPaginationToken(_inner) => Some(_inner),
DescribeAffectedEntitiesErrorKind::UnsupportedLocale(_inner) => Some(_inner),
DescribeAffectedEntitiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAffectedAccountsForOrganizationError {
pub kind: DescribeAffectedAccountsForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeAffectedAccountsForOrganizationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAffectedAccountsForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAffectedAccountsForOrganizationErrorKind {
InvalidPaginationToken(crate::error::InvalidPaginationToken),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAffectedAccountsForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAffectedAccountsForOrganizationErrorKind::InvalidPaginationToken(_inner) => {
_inner.fmt(f)
}
DescribeAffectedAccountsForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAffectedAccountsForOrganizationError {
fn code(&self) -> Option<&str> {
DescribeAffectedAccountsForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAffectedAccountsForOrganizationError {
pub fn new(
kind: DescribeAffectedAccountsForOrganizationErrorKind,
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: DescribeAffectedAccountsForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAffectedAccountsForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_invalid_pagination_token(&self) -> bool {
matches!(
&self.kind,
DescribeAffectedAccountsForOrganizationErrorKind::InvalidPaginationToken(_)
)
}
}
impl std::error::Error for DescribeAffectedAccountsForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAffectedAccountsForOrganizationErrorKind::InvalidPaginationToken(_inner) => {
Some(_inner)
}
DescribeAffectedAccountsForOrganizationErrorKind::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 _)
}
}