#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidPaginationToken(crate::error::InvalidPaginationToken),
UnsupportedLocale(crate::error::UnsupportedLocale),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::InvalidPaginationToken(inner) => inner.fmt(f),
Error::UnsupportedLocale(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeAffectedAccountsForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeAffectedAccountsForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeAffectedAccountsForOrganizationError> for Error {
fn from(err: crate::error::DescribeAffectedAccountsForOrganizationError) -> Self {
match err.kind {
crate::error::DescribeAffectedAccountsForOrganizationErrorKind::InvalidPaginationToken(inner) => Error::InvalidPaginationToken(inner),
crate::error::DescribeAffectedAccountsForOrganizationErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeAffectedEntitiesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeAffectedEntitiesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeAffectedEntitiesError> for Error {
fn from(err: crate::error::DescribeAffectedEntitiesError) -> Self {
match err.kind {
crate::error::DescribeAffectedEntitiesErrorKind::InvalidPaginationToken(inner) => {
Error::InvalidPaginationToken(inner)
}
crate::error::DescribeAffectedEntitiesErrorKind::UnsupportedLocale(inner) => {
Error::UnsupportedLocale(inner)
}
crate::error::DescribeAffectedEntitiesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeAffectedEntitiesForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeAffectedEntitiesForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeAffectedEntitiesForOrganizationError> for Error {
fn from(err: crate::error::DescribeAffectedEntitiesForOrganizationError) -> Self {
match err.kind {
crate::error::DescribeAffectedEntitiesForOrganizationErrorKind::InvalidPaginationToken(inner) => Error::InvalidPaginationToken(inner),
crate::error::DescribeAffectedEntitiesForOrganizationErrorKind::UnsupportedLocale(inner) => Error::UnsupportedLocale(inner),
crate::error::DescribeAffectedEntitiesForOrganizationErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEntityAggregatesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEntityAggregatesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEntityAggregatesError> for Error {
fn from(err: crate::error::DescribeEntityAggregatesError) -> Self {
match err.kind {
crate::error::DescribeEntityAggregatesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEventAggregatesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEventAggregatesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventAggregatesError> for Error {
fn from(err: crate::error::DescribeEventAggregatesError) -> Self {
match err.kind {
crate::error::DescribeEventAggregatesErrorKind::InvalidPaginationToken(inner) => {
Error::InvalidPaginationToken(inner)
}
crate::error::DescribeEventAggregatesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEventDetailsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEventDetailsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventDetailsError> for Error {
fn from(err: crate::error::DescribeEventDetailsError) -> Self {
match err.kind {
crate::error::DescribeEventDetailsErrorKind::UnsupportedLocale(inner) => {
Error::UnsupportedLocale(inner)
}
crate::error::DescribeEventDetailsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeEventDetailsForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeEventDetailsForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventDetailsForOrganizationError> for Error {
fn from(err: crate::error::DescribeEventDetailsForOrganizationError) -> Self {
match err.kind {
crate::error::DescribeEventDetailsForOrganizationErrorKind::UnsupportedLocale(
inner,
) => Error::UnsupportedLocale(inner),
crate::error::DescribeEventDetailsForOrganizationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEventsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeEventsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventsError> for Error {
fn from(err: crate::error::DescribeEventsError) -> Self {
match err.kind {
crate::error::DescribeEventsErrorKind::InvalidPaginationToken(inner) => {
Error::InvalidPaginationToken(inner)
}
crate::error::DescribeEventsErrorKind::UnsupportedLocale(inner) => {
Error::UnsupportedLocale(inner)
}
crate::error::DescribeEventsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEventsForOrganizationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEventsForOrganizationError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventsForOrganizationError> for Error {
fn from(err: crate::error::DescribeEventsForOrganizationError) -> Self {
match err.kind {
crate::error::DescribeEventsForOrganizationErrorKind::InvalidPaginationToken(inner) => {
Error::InvalidPaginationToken(inner)
}
crate::error::DescribeEventsForOrganizationErrorKind::UnsupportedLocale(inner) => {
Error::UnsupportedLocale(inner)
}
crate::error::DescribeEventsForOrganizationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeEventTypesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeEventTypesError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeEventTypesError> for Error {
fn from(err: crate::error::DescribeEventTypesError) -> Self {
match err.kind {
crate::error::DescribeEventTypesErrorKind::InvalidPaginationToken(inner) => {
Error::InvalidPaginationToken(inner)
}
crate::error::DescribeEventTypesErrorKind::UnsupportedLocale(inner) => {
Error::UnsupportedLocale(inner)
}
crate::error::DescribeEventTypesErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DescribeHealthServiceStatusForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeHealthServiceStatusForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeHealthServiceStatusForOrganizationError> for Error {
fn from(err: crate::error::DescribeHealthServiceStatusForOrganizationError) -> Self {
match err.kind {
crate::error::DescribeHealthServiceStatusForOrganizationErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DisableHealthServiceAccessForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DisableHealthServiceAccessForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DisableHealthServiceAccessForOrganizationError> for Error {
fn from(err: crate::error::DisableHealthServiceAccessForOrganizationError) -> Self {
match err.kind {
crate::error::DisableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::error::DisableHealthServiceAccessForOrganizationErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::EnableHealthServiceAccessForOrganizationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::EnableHealthServiceAccessForOrganizationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::EnableHealthServiceAccessForOrganizationError> for Error {
fn from(err: crate::error::EnableHealthServiceAccessForOrganizationError) -> Self {
match err.kind {
crate::error::EnableHealthServiceAccessForOrganizationErrorKind::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::error::EnableHealthServiceAccessForOrganizationErrorKind::Unhandled(inner) => Error::Unhandled(crate::error::Unhandled::new(inner.into())),
}
}
}
impl std::error::Error for Error {}