// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// All possible error types for this service.
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
/// The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.
AccessDeniedException(crate::types::error::AccessDeniedException),
/// Another change to the resource is already in progress. Retry the request.
ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
/// A client-supplied precondition (e.g. ExpectedRevisionId on a resource-policy write) did not match the current state of the resource. Retrying the same request will fail again; re-read the resource and re-evaluate before retrying. A conditional request is not retry-safe on its own. If an earlier attempt committed but its response never reached the caller, retrying fails with this error, which is indistinguishable from another writer having won. Compare the resource's current contents with what the request intended: a successful attempt stores a revision ID the caller never saw, so the revision alone cannot tell the two apart, but matching contents mean the change took effect.
ConflictException(crate::types::error::ConflictException),
/// The request reuses the client token of an earlier request with different parameters. Use a new client token, or resend the earlier request unchanged.
IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
/// The request failed because of an internal service error. Retry the request.
InternalException(crate::types::error::InternalException),
/// A request parameter is missing or not valid.
InvalidInputException(crate::types::error::InvalidInputException),
/// The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.
InvalidStateException(crate::types::error::InvalidStateException),
/// The request would exceed a service quota for the account.
LimitExceededException(crate::types::error::LimitExceededException),
/// The policy document is larger than the account's resource policy size quota, or larger than the service maximum.
PolicyLengthExceededException(crate::types::error::PolicyLengthExceededException),
/// The policy was rejected because it would grant public access to the event bus. A statement grants public access when its principal is a wildcard and no condition limits the callers to specific AWS accounts or principals. To fix it, replace the wildcard principal with specific principals, or add a condition that limits the callers to specific AWS accounts. Conditions on event content (events:source, events:detail-type, events:Metadata/*) do not identify the caller and do not make a wildcard principal non-public. Returned only for the "default" policy; the "AWS_RAM" policy is composed by AWS Resource Access Manager and never grants public access.
PublicPolicyException(crate::types::error::PublicPolicyException),
/// A resource with the same name already exists.
ResourceAlreadyExistsException(crate::types::error::ResourceAlreadyExistsException),
/// The resource is in use and cannot be deleted. For example, an event bus with subscribers or event sources cannot be deleted until they are deleted.
ResourceInUseException(crate::types::error::ResourceInUseException),
/// The resource does not exist.
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
/// The configured schema registry could not be reached. Retry the request.
SchemaRegistryUnavailableException(crate::types::error::SchemaRegistryUnavailableException),
/// The request was throttled because it exceeds a request rate limit. Retry the request with backoff.
ThrottlingException(crate::types::error::ThrottlingException),
/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
variable wildcard pattern and check `.code()`:
\
`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
\
See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AccessDeniedException(inner) => inner.fmt(f),
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::IdempotentParameterMismatchException(inner) => inner.fmt(f),
Error::InternalException(inner) => inner.fmt(f),
Error::InvalidInputException(inner) => inner.fmt(f),
Error::InvalidStateException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::PolicyLengthExceededException(inner) => inner.fmt(f),
Error::PublicPolicyException(inner) => inner.fmt(f),
Error::ResourceAlreadyExistsException(inner) => inner.fmt(f),
Error::ResourceInUseException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::SchemaRegistryUnavailableException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::AccessDeniedException(inner) => inner.meta(),
Self::ConcurrentModificationException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::IdempotentParameterMismatchException(inner) => inner.meta(),
Self::InternalException(inner) => inner.meta(),
Self::InvalidInputException(inner) => inner.meta(),
Self::InvalidStateException(inner) => inner.meta(),
Self::LimitExceededException(inner) => inner.meta(),
Self::PolicyLengthExceededException(inner) => inner.meta(),
Self::PublicPolicyException(inner) => inner.meta(),
Self::ResourceAlreadyExistsException(inner) => inner.meta(),
Self::ResourceInUseException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::SchemaRegistryUnavailableException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_bus::CreateEventBusError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_event_bus::CreateEventBusError> for Error {
fn from(err: crate::operation::create_event_bus::CreateEventBusError) -> Self {
match err {
crate::operation::create_event_bus::CreateEventBusError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::create_event_bus::CreateEventBusError::IdempotentParameterMismatchException(inner) => {
Error::IdempotentParameterMismatchException(inner)
}
crate::operation::create_event_bus::CreateEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::create_event_bus::CreateEventBusError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_event_bus::CreateEventBusError::ResourceAlreadyExistsException(inner) => {
Error::ResourceAlreadyExistsException(inner)
}
crate::operation::create_event_bus::CreateEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_event_bus::CreateEventBusError::InternalException(inner) => Error::InternalException(inner),
crate::operation::create_event_bus::CreateEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::create_event_bus::CreateEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_event_bus::CreateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_source::CreateEventSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_event_source::CreateEventSourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_event_source::CreateEventSourceError> for Error {
fn from(err: crate::operation::create_event_source::CreateEventSourceError) -> Self {
match err {
crate::operation::create_event_source::CreateEventSourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::create_event_source::CreateEventSourceError::IdempotentParameterMismatchException(inner) => {
Error::IdempotentParameterMismatchException(inner)
}
crate::operation::create_event_source::CreateEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::create_event_source::CreateEventSourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_event_source::CreateEventSourceError::ResourceAlreadyExistsException(inner) => {
Error::ResourceAlreadyExistsException(inner)
}
crate::operation::create_event_source::CreateEventSourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_event_source::CreateEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_event_source::CreateEventSourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::create_event_source::CreateEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::create_event_source::CreateEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_event_source::CreateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscriber::CreateSubscriberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_subscriber::CreateSubscriberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_subscriber::CreateSubscriberError> for Error {
fn from(err: crate::operation::create_subscriber::CreateSubscriberError) -> Self {
match err {
crate::operation::create_subscriber::CreateSubscriberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::create_subscriber::CreateSubscriberError::IdempotentParameterMismatchException(inner) => {
Error::IdempotentParameterMismatchException(inner)
}
crate::operation::create_subscriber::CreateSubscriberError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::create_subscriber::CreateSubscriberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_subscriber::CreateSubscriberError::ResourceAlreadyExistsException(inner) => {
Error::ResourceAlreadyExistsException(inner)
}
crate::operation::create_subscriber::CreateSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_subscriber::CreateSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_subscriber::CreateSubscriberError::InternalException(inner) => Error::InternalException(inner),
crate::operation::create_subscriber::CreateSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::create_subscriber::CreateSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_subscriber::CreateSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_bus::DeleteEventBusError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_event_bus::DeleteEventBusError> for Error {
fn from(err: crate::operation::delete_event_bus::DeleteEventBusError) -> Self {
match err {
crate::operation::delete_event_bus::DeleteEventBusError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::delete_event_bus::DeleteEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::ResourceInUseException(inner) => Error::ResourceInUseException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::InternalException(inner) => Error::InternalException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_event_bus::DeleteEventBusError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_source::DeleteEventSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_event_source::DeleteEventSourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_event_source::DeleteEventSourceError> for Error {
fn from(err: crate::operation::delete_event_source::DeleteEventSourceError) -> Self {
match err {
crate::operation::delete_event_source::DeleteEventSourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::delete_event_source::DeleteEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::delete_event_source::DeleteEventSourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_event_source::DeleteEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_event_source::DeleteEventSourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::delete_event_source::DeleteEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::delete_event_source::DeleteEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_event_source::DeleteEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_resource_policy::DeleteResourcePolicyError> for Error {
fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
match err {
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_resource_policy::DeleteResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscriber::DeleteSubscriberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_subscriber::DeleteSubscriberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_subscriber::DeleteSubscriberError> for Error {
fn from(err: crate::operation::delete_subscriber::DeleteSubscriberError) -> Self {
match err {
crate::operation::delete_subscriber::DeleteSubscriberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::delete_subscriber::DeleteSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_subscriber::DeleteSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_subscriber::DeleteSubscriberError::InternalException(inner) => Error::InternalException(inner),
crate::operation::delete_subscriber::DeleteSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::delete_subscriber::DeleteSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_subscriber::DeleteSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_bus::DescribeEventBusError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_event_bus::DescribeEventBusError> for Error {
fn from(err: crate::operation::describe_event_bus::DescribeEventBusError) -> Self {
match err {
crate::operation::describe_event_bus::DescribeEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_event_bus::DescribeEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::describe_event_bus::DescribeEventBusError::InternalException(inner) => Error::InternalException(inner),
crate::operation::describe_event_bus::DescribeEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::describe_event_bus::DescribeEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_event_bus::DescribeEventBusError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_event_source::DescribeEventSourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_event_source::DescribeEventSourceError> for Error {
fn from(err: crate::operation::describe_event_source::DescribeEventSourceError) -> Self {
match err {
crate::operation::describe_event_source::DescribeEventSourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_event_source::DescribeEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::describe_event_source::DescribeEventSourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::describe_event_source::DescribeEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::describe_event_source::DescribeEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_event_source::DescribeEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscriber::DescribeSubscriberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_subscriber::DescribeSubscriberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_subscriber::DescribeSubscriberError> for Error {
fn from(err: crate::operation::describe_subscriber::DescribeSubscriberError) -> Self {
match err {
crate::operation::describe_subscriber::DescribeSubscriberError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_subscriber::DescribeSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::describe_subscriber::DescribeSubscriberError::InternalException(inner) => Error::InternalException(inner),
crate::operation::describe_subscriber::DescribeSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::describe_subscriber::DescribeSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_subscriber::DescribeSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_policy::GetResourcePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_policy::GetResourcePolicyError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_resource_policy::GetResourcePolicyError> for Error {
fn from(err: crate::operation::get_resource_policy::GetResourcePolicyError) -> Self {
match err {
crate::operation::get_resource_policy::GetResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_resource_policy::GetResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_resource_policy::GetResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
crate::operation::get_resource_policy::GetResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::get_resource_policy::GetResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_resource_policy::GetResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_buses::ListEventBusesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_event_buses::ListEventBusesError> for Error {
fn from(err: crate::operation::list_event_buses::ListEventBusesError) -> Self {
match err {
crate::operation::list_event_buses::ListEventBusesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_event_buses::ListEventBusesError::InternalException(inner) => Error::InternalException(inner),
crate::operation::list_event_buses::ListEventBusesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::list_event_buses::ListEventBusesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_event_buses::ListEventBusesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_event_sources::ListEventSourcesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_event_sources::ListEventSourcesError> for Error {
fn from(err: crate::operation::list_event_sources::ListEventSourcesError) -> Self {
match err {
crate::operation::list_event_sources::ListEventSourcesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_event_sources::ListEventSourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_event_sources::ListEventSourcesError::InternalException(inner) => Error::InternalException(inner),
crate::operation::list_event_sources::ListEventSourcesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::list_event_sources::ListEventSourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_event_sources::ListEventSourcesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_resource_policies::ListResourcePoliciesError> for Error {
fn from(err: crate::operation::list_resource_policies::ListResourcePoliciesError) -> Self {
match err {
crate::operation::list_resource_policies::ListResourcePoliciesError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_resource_policies::ListResourcePoliciesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_resource_policies::ListResourcePoliciesError::InternalException(inner) => Error::InternalException(inner),
crate::operation::list_resource_policies::ListResourcePoliciesError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::list_resource_policies::ListResourcePoliciesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_resource_policies::ListResourcePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscribers::ListSubscribersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subscribers::ListSubscribersError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_subscribers::ListSubscribersError> for Error {
fn from(err: crate::operation::list_subscribers::ListSubscribersError) -> Self {
match err {
crate::operation::list_subscribers::ListSubscribersError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_subscribers::ListSubscribersError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_subscribers::ListSubscribersError::InternalException(inner) => Error::InternalException(inner),
crate::operation::list_subscribers::ListSubscribersError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::list_subscribers::ListSubscribersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_subscribers::ListSubscribersError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_events::PutEventsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_events::PutEventsError> for Error {
fn from(err: crate::operation::put_events::PutEventsError) -> Self {
match err {
crate::operation::put_events::PutEventsError::InternalException(inner) => Error::InternalException(inner),
crate::operation::put_events::PutEventsError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::put_events::PutEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_events::PutEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_events::PutEventsError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::put_events::PutEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_events::PutEventsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_raw_events::PutRawEventsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_raw_events::PutRawEventsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_raw_events::PutRawEventsError> for Error {
fn from(err: crate::operation::put_raw_events::PutRawEventsError) -> Self {
match err {
crate::operation::put_raw_events::PutRawEventsError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::put_raw_events::PutRawEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_raw_events::PutRawEventsError::SchemaRegistryUnavailableException(inner) => {
Error::SchemaRegistryUnavailableException(inner)
}
crate::operation::put_raw_events::PutRawEventsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_raw_events::PutRawEventsError::InternalException(inner) => Error::InternalException(inner),
crate::operation::put_raw_events::PutRawEventsError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::put_raw_events::PutRawEventsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_raw_events::PutRawEventsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::put_resource_policy::PutResourcePolicyError> for Error {
fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
match err {
crate::operation::put_resource_policy::PutResourcePolicyError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::put_resource_policy::PutResourcePolicyError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::PolicyLengthExceededException(inner) => {
Error::PolicyLengthExceededException(inner)
}
crate::operation::put_resource_policy::PutResourcePolicyError::PublicPolicyException(inner) => Error::PublicPolicyException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_resource_policy::PutResourcePolicyError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::InternalException(inner) => Error::InternalException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_resource::RevokeResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::revoke_resource::RevokeResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::revoke_resource::RevokeResourceError> for Error {
fn from(err: crate::operation::revoke_resource::RevokeResourceError) -> Self {
match err {
crate::operation::revoke_resource::RevokeResourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::revoke_resource::RevokeResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::revoke_resource::RevokeResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::revoke_resource::RevokeResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::revoke_resource::RevokeResourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::revoke_resource::RevokeResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::revoke_resource::RevokeResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::revoke_resource::RevokeResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::operation::tag_resource::TagResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::tag_resource::TagResourceError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::tag_resource::TagResourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::tag_resource::TagResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::untag_resource::UntagResourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::untag_resource::UntagResourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::untag_resource::UntagResourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_bus::UpdateEventBusError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_event_bus::UpdateEventBusError> for Error {
fn from(err: crate::operation::update_event_bus::UpdateEventBusError) -> Self {
match err {
crate::operation::update_event_bus::UpdateEventBusError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::update_event_bus::UpdateEventBusError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::update_event_bus::UpdateEventBusError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_event_bus::UpdateEventBusError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_event_bus::UpdateEventBusError::InternalException(inner) => Error::InternalException(inner),
crate::operation::update_event_bus::UpdateEventBusError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::update_event_bus::UpdateEventBusError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_event_bus::UpdateEventBusError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_source::UpdateEventSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_event_source::UpdateEventSourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_event_source::UpdateEventSourceError> for Error {
fn from(err: crate::operation::update_event_source::UpdateEventSourceError) -> Self {
match err {
crate::operation::update_event_source::UpdateEventSourceError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::update_event_source::UpdateEventSourceError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::update_event_source::UpdateEventSourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_event_source::UpdateEventSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_event_source::UpdateEventSourceError::InternalException(inner) => Error::InternalException(inner),
crate::operation::update_event_source::UpdateEventSourceError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::update_event_source::UpdateEventSourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_event_source::UpdateEventSourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscriber::UpdateSubscriberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subscriber::UpdateSubscriberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_subscriber::UpdateSubscriberError> for Error {
fn from(err: crate::operation::update_subscriber::UpdateSubscriberError) -> Self {
match err {
crate::operation::update_subscriber::UpdateSubscriberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::update_subscriber::UpdateSubscriberError::InvalidStateException(inner) => Error::InvalidStateException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::InternalException(inner) => Error::InternalException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::InvalidInputException(inner) => Error::InvalidInputException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_subscriber::UpdateSubscriberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
where
O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::std::default::Default::default(),
source: err.into(),
})
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::AccessDeniedException(inner) => inner.source(),
Error::ConcurrentModificationException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::IdempotentParameterMismatchException(inner) => inner.source(),
Error::InternalException(inner) => inner.source(),
Error::InvalidInputException(inner) => inner.source(),
Error::InvalidStateException(inner) => inner.source(),
Error::LimitExceededException(inner) => inner.source(),
Error::PolicyLengthExceededException(inner) => inner.source(),
Error::PublicPolicyException(inner) => inner.source(),
Error::ResourceAlreadyExistsException(inner) => inner.source(),
Error::ResourceInUseException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::SchemaRegistryUnavailableException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::AccessDeniedException(e) => e.request_id(),
Self::ConcurrentModificationException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::IdempotentParameterMismatchException(e) => e.request_id(),
Self::InternalException(e) => e.request_id(),
Self::InvalidInputException(e) => e.request_id(),
Self::InvalidStateException(e) => e.request_id(),
Self::LimitExceededException(e) => e.request_id(),
Self::PolicyLengthExceededException(e) => e.request_id(),
Self::PublicPolicyException(e) => e.request_id(),
Self::ResourceAlreadyExistsException(e) => e.request_id(),
Self::ResourceInUseException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::SchemaRegistryUnavailableException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}