#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
ValidationException(crate::types::error::ValidationException),
Unhandled(::aws_smithy_types::error::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::add_notification_channels::AddNotificationChannelsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::add_notification_channels::AddNotificationChannelsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::add_notification_channels::AddNotificationChannelsError> for Error {
fn from(err: crate::operation::add_notification_channels::AddNotificationChannelsError) -> Self {
match err {
crate::operation::add_notification_channels::AddNotificationChannelsError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::add_notification_channels::AddNotificationChannelsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::add_notification_channels::AddNotificationChannelsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::add_notification_channels::AddNotificationChannelsError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::add_notification_channels::AddNotificationChannelsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::add_notification_channels::AddNotificationChannelsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::add_notification_channels::AddNotificationChannelsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError> for Error {
fn from(err: crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError) -> Self {
match err {
crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::batch_get_frame_metric_data::BatchGetFrameMetricDataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::configure_agent::ConfigureAgentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::configure_agent::ConfigureAgentError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::configure_agent::ConfigureAgentError> for Error {
fn from(err: crate::operation::configure_agent::ConfigureAgentError) -> Self {
match err {
crate::operation::configure_agent::ConfigureAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::configure_agent::ConfigureAgentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::configure_agent::ConfigureAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::configure_agent::ConfigureAgentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::configure_agent::ConfigureAgentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::create_profiling_group::CreateProfilingGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::create_profiling_group::CreateProfilingGroupError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::create_profiling_group::CreateProfilingGroupError> for Error {
fn from(err: crate::operation::create_profiling_group::CreateProfilingGroupError) -> Self {
match err {
crate::operation::create_profiling_group::CreateProfilingGroupError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_profiling_group::CreateProfilingGroupError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::create_profiling_group::CreateProfilingGroupError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_profiling_group::CreateProfilingGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_profiling_group::CreateProfilingGroupError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_profiling_group::CreateProfilingGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::delete_profiling_group::DeleteProfilingGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::delete_profiling_group::DeleteProfilingGroupError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::delete_profiling_group::DeleteProfilingGroupError> for Error {
fn from(err: crate::operation::delete_profiling_group::DeleteProfilingGroupError) -> Self {
match err {
crate::operation::delete_profiling_group::DeleteProfilingGroupError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_profiling_group::DeleteProfilingGroupError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_profiling_group::DeleteProfilingGroupError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_profiling_group::DeleteProfilingGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_profiling_group::DeleteProfilingGroupError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_profiling_group::DeleteProfilingGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::describe_profiling_group::DescribeProfilingGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::describe_profiling_group::DescribeProfilingGroupError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::describe_profiling_group::DescribeProfilingGroupError> for Error {
fn from(err: crate::operation::describe_profiling_group::DescribeProfilingGroupError) -> Self {
match err {
crate::operation::describe_profiling_group::DescribeProfilingGroupError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::describe_profiling_group::DescribeProfilingGroupError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_profiling_group::DescribeProfilingGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_profiling_group::DescribeProfilingGroupError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_profiling_group::DescribeProfilingGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_http::result::SdkError<crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError, R>,
) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError> for Error {
fn from(err: crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError) -> Self {
match err {
crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_findings_report_account_summary::GetFindingsReportAccountSummaryError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_notification_configuration::GetNotificationConfigurationError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_http::result::SdkError<crate::operation::get_notification_configuration::GetNotificationConfigurationError, R>,
) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_notification_configuration::GetNotificationConfigurationError> for Error {
fn from(err: crate::operation::get_notification_configuration::GetNotificationConfigurationError) -> Self {
match err {
crate::operation::get_notification_configuration::GetNotificationConfigurationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_notification_configuration::GetNotificationConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_notification_configuration::GetNotificationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_notification_configuration::GetNotificationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_notification_configuration::GetNotificationConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_policy::GetPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::get_policy::GetPolicyError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_policy::GetPolicyError> for Error {
fn from(err: crate::operation::get_policy::GetPolicyError) -> Self {
match err {
crate::operation::get_policy::GetPolicyError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_policy::GetPolicyError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_policy::GetPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_policy::GetPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_profile::GetProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::get_profile::GetProfileError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_profile::GetProfileError> for Error {
fn from(err: crate::operation::get_profile::GetProfileError) -> Self {
match err {
crate::operation::get_profile::GetProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_profile::GetProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_profile::GetProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_profile::GetProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_profile::GetProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::get_recommendations::GetRecommendationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::get_recommendations::GetRecommendationsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_recommendations::GetRecommendationsError> for Error {
fn from(err: crate::operation::get_recommendations::GetRecommendationsError) -> Self {
match err {
crate::operation::get_recommendations::GetRecommendationsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_recommendations::GetRecommendationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_recommendations::GetRecommendationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_recommendations::GetRecommendationsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_recommendations::GetRecommendationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_findings_reports::ListFindingsReportsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_findings_reports::ListFindingsReportsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_findings_reports::ListFindingsReportsError> for Error {
fn from(err: crate::operation::list_findings_reports::ListFindingsReportsError) -> Self {
match err {
crate::operation::list_findings_reports::ListFindingsReportsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_findings_reports::ListFindingsReportsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_findings_reports::ListFindingsReportsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_findings_reports::ListFindingsReportsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_findings_reports::ListFindingsReportsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_profile_times::ListProfileTimesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_profile_times::ListProfileTimesError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_profile_times::ListProfileTimesError> for Error {
fn from(err: crate::operation::list_profile_times::ListProfileTimesError) -> Self {
match err {
crate::operation::list_profile_times::ListProfileTimesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_profile_times::ListProfileTimesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_profile_times::ListProfileTimesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_profile_times::ListProfileTimesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_profile_times::ListProfileTimesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_profiling_groups::ListProfilingGroupsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_profiling_groups::ListProfilingGroupsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_profiling_groups::ListProfilingGroupsError> for Error {
fn from(err: crate::operation::list_profiling_groups::ListProfilingGroupsError) -> Self {
match err {
crate::operation::list_profiling_groups::ListProfilingGroupsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_profiling_groups::ListProfilingGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_profiling_groups::ListProfilingGroupsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::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_http::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::post_agent_profile::PostAgentProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::post_agent_profile::PostAgentProfileError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::post_agent_profile::PostAgentProfileError> for Error {
fn from(err: crate::operation::post_agent_profile::PostAgentProfileError) -> Self {
match err {
crate::operation::post_agent_profile::PostAgentProfileError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::post_agent_profile::PostAgentProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::post_agent_profile::PostAgentProfileError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::post_agent_profile::PostAgentProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::post_agent_profile::PostAgentProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::put_permission::PutPermissionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::put_permission::PutPermissionError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::put_permission::PutPermissionError> for Error {
fn from(err: crate::operation::put_permission::PutPermissionError) -> Self {
match err {
crate::operation::put_permission::PutPermissionError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_permission::PutPermissionError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::put_permission::PutPermissionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_permission::PutPermissionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_permission::PutPermissionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_permission::PutPermissionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::remove_notification_channel::RemoveNotificationChannelError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::remove_notification_channel::RemoveNotificationChannelError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::remove_notification_channel::RemoveNotificationChannelError> for Error {
fn from(err: crate::operation::remove_notification_channel::RemoveNotificationChannelError) -> Self {
match err {
crate::operation::remove_notification_channel::RemoveNotificationChannelError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::remove_notification_channel::RemoveNotificationChannelError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::remove_notification_channel::RemoveNotificationChannelError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::remove_notification_channel::RemoveNotificationChannelError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::remove_notification_channel::RemoveNotificationChannelError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::remove_permission::RemovePermissionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::remove_permission::RemovePermissionError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::remove_permission::RemovePermissionError> for Error {
fn from(err: crate::operation::remove_permission::RemovePermissionError) -> Self {
match err {
crate::operation::remove_permission::RemovePermissionError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::remove_permission::RemovePermissionError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::remove_permission::RemovePermissionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::remove_permission::RemovePermissionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::remove_permission::RemovePermissionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::remove_permission::RemovePermissionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::submit_feedback::SubmitFeedbackError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::submit_feedback::SubmitFeedbackError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::submit_feedback::SubmitFeedbackError> for Error {
fn from(err: crate::operation::submit_feedback::SubmitFeedbackError) -> Self {
match err {
crate::operation::submit_feedback::SubmitFeedbackError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::submit_feedback::SubmitFeedbackError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::submit_feedback::SubmitFeedbackError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::submit_feedback::SubmitFeedbackError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::submit_feedback::SubmitFeedbackError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::update_profiling_group::UpdateProfilingGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::update_profiling_group::UpdateProfilingGroupError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::update_profiling_group::UpdateProfilingGroupError> for Error {
fn from(err: crate::operation::update_profiling_group::UpdateProfilingGroupError) -> Self {
match err {
crate::operation::update_profiling_group::UpdateProfilingGroupError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_profiling_group::UpdateProfilingGroupError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_profiling_group::UpdateProfilingGroupError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_profiling_group::UpdateProfilingGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_profiling_group::UpdateProfilingGroupError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_profiling_group::UpdateProfilingGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::ConflictException(inner) => inner.source(),
Error::InternalServerException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::ValidationException(inner) => inner.source(),
Error::Unhandled(inner) => inner.source(),
}
}
}
impl ::aws_http::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::ConflictException(e) => e.request_id(),
Self::InternalServerException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}