#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConflictException(crate::types::error::ConflictException),
PreconditionFailedException(crate::types::error::PreconditionFailedException),
RequestTimeoutException(crate::types::error::RequestTimeoutException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
TooManyTagsException(crate::types::error::TooManyTagsException),
ValidationException(crate::types::error::ValidationException),
#[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::ConflictException(inner) => inner.fmt(f),
Error::PreconditionFailedException(inner) => inner.fmt(f),
Error::RequestTimeoutException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::TooManyTagsException(inner) => inner.fmt(f),
Error::ValidationException(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::ConflictException(inner) => inner.meta(),
Self::PreconditionFailedException(inner) => inner.meta(),
Self::RequestTimeoutException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::TooManyTagsException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_assistant::CreateAssistantError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_assistant::CreateAssistantError, 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_assistant::CreateAssistantError> for Error {
fn from(err: crate::operation::create_assistant::CreateAssistantError) -> Self {
match err {
crate::operation::create_assistant::CreateAssistantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_assistant::CreateAssistantError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_assistant::CreateAssistantError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_assistant::CreateAssistantError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_assistant::CreateAssistantError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_assistant_association::CreateAssistantAssociationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_assistant_association::CreateAssistantAssociationError, 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_assistant_association::CreateAssistantAssociationError> for Error {
fn from(err: crate::operation::create_assistant_association::CreateAssistantAssociationError) -> Self {
match err {
crate::operation::create_assistant_association::CreateAssistantAssociationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::create_assistant_association::CreateAssistantAssociationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::create_assistant_association::CreateAssistantAssociationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_assistant_association::CreateAssistantAssociationError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_assistant_association::CreateAssistantAssociationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_assistant_association::CreateAssistantAssociationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_content::CreateContentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_content::CreateContentError, 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_content::CreateContentError> for Error {
fn from(err: crate::operation::create_content::CreateContentError) -> Self {
match err {
crate::operation::create_content::CreateContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_content::CreateContentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_content::CreateContentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_content::CreateContentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_content::CreateContentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_content::CreateContentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_knowledge_base::CreateKnowledgeBaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_knowledge_base::CreateKnowledgeBaseError, 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_knowledge_base::CreateKnowledgeBaseError> for Error {
fn from(err: crate::operation::create_knowledge_base::CreateKnowledgeBaseError) -> Self {
match err {
crate::operation::create_knowledge_base::CreateKnowledgeBaseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_knowledge_base::CreateKnowledgeBaseError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_knowledge_base::CreateKnowledgeBaseError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_knowledge_base::CreateKnowledgeBaseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_knowledge_base::CreateKnowledgeBaseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_quick_response::CreateQuickResponseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_quick_response::CreateQuickResponseError, 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_quick_response::CreateQuickResponseError> for Error {
fn from(err: crate::operation::create_quick_response::CreateQuickResponseError) -> Self {
match err {
crate::operation::create_quick_response::CreateQuickResponseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_quick_response::CreateQuickResponseError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_quick_response::CreateQuickResponseError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_quick_response::CreateQuickResponseError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_quick_response::CreateQuickResponseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_quick_response::CreateQuickResponseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, 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_session::CreateSessionError> for Error {
fn from(err: crate::operation::create_session::CreateSessionError) -> Self {
match err {
crate::operation::create_session::CreateSessionError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_session::CreateSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_session::CreateSessionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_session::CreateSessionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_assistant::DeleteAssistantError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_assistant::DeleteAssistantError, 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_assistant::DeleteAssistantError> for Error {
fn from(err: crate::operation::delete_assistant::DeleteAssistantError) -> Self {
match err {
crate::operation::delete_assistant::DeleteAssistantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_assistant::DeleteAssistantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_assistant::DeleteAssistantError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_assistant::DeleteAssistantError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_assistant_association::DeleteAssistantAssociationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_assistant_association::DeleteAssistantAssociationError, 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_assistant_association::DeleteAssistantAssociationError> for Error {
fn from(err: crate::operation::delete_assistant_association::DeleteAssistantAssociationError) -> Self {
match err {
crate::operation::delete_assistant_association::DeleteAssistantAssociationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_assistant_association::DeleteAssistantAssociationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_assistant_association::DeleteAssistantAssociationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_assistant_association::DeleteAssistantAssociationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_content::DeleteContentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_content::DeleteContentError, 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_content::DeleteContentError> for Error {
fn from(err: crate::operation::delete_content::DeleteContentError) -> Self {
match err {
crate::operation::delete_content::DeleteContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_content::DeleteContentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_content::DeleteContentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_content::DeleteContentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_import_job::DeleteImportJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_import_job::DeleteImportJobError, 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_import_job::DeleteImportJobError> for Error {
fn from(err: crate::operation::delete_import_job::DeleteImportJobError) -> Self {
match err {
crate::operation::delete_import_job::DeleteImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_import_job::DeleteImportJobError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_import_job::DeleteImportJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_import_job::DeleteImportJobError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_import_job::DeleteImportJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError, 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_knowledge_base::DeleteKnowledgeBaseError> for Error {
fn from(err: crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError) -> Self {
match err {
crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_knowledge_base::DeleteKnowledgeBaseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_quick_response::DeleteQuickResponseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_quick_response::DeleteQuickResponseError, 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_quick_response::DeleteQuickResponseError> for Error {
fn from(err: crate::operation::delete_quick_response::DeleteQuickResponseError) -> Self {
match err {
crate::operation::delete_quick_response::DeleteQuickResponseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_quick_response::DeleteQuickResponseError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_quick_response::DeleteQuickResponseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_quick_response::DeleteQuickResponseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_assistant::GetAssistantError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_assistant::GetAssistantError, 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_assistant::GetAssistantError> for Error {
fn from(err: crate::operation::get_assistant::GetAssistantError) -> Self {
match err {
crate::operation::get_assistant::GetAssistantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_assistant::GetAssistantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_assistant::GetAssistantError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_assistant::GetAssistantError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_assistant_association::GetAssistantAssociationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_assistant_association::GetAssistantAssociationError, 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_assistant_association::GetAssistantAssociationError> for Error {
fn from(err: crate::operation::get_assistant_association::GetAssistantAssociationError) -> Self {
match err {
crate::operation::get_assistant_association::GetAssistantAssociationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_assistant_association::GetAssistantAssociationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_assistant_association::GetAssistantAssociationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_assistant_association::GetAssistantAssociationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_content::GetContentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_content::GetContentError, 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_content::GetContentError> for Error {
fn from(err: crate::operation::get_content::GetContentError) -> Self {
match err {
crate::operation::get_content::GetContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_content::GetContentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_content::GetContentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_content::GetContentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_content_summary::GetContentSummaryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_content_summary::GetContentSummaryError, 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_content_summary::GetContentSummaryError> for Error {
fn from(err: crate::operation::get_content_summary::GetContentSummaryError) -> Self {
match err {
crate::operation::get_content_summary::GetContentSummaryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_content_summary::GetContentSummaryError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_content_summary::GetContentSummaryError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_content_summary::GetContentSummaryError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_import_job::GetImportJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_import_job::GetImportJobError, 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_import_job::GetImportJobError> for Error {
fn from(err: crate::operation::get_import_job::GetImportJobError) -> Self {
match err {
crate::operation::get_import_job::GetImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_import_job::GetImportJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_import_job::GetImportJobError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_import_job::GetImportJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_knowledge_base::GetKnowledgeBaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_knowledge_base::GetKnowledgeBaseError, 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_knowledge_base::GetKnowledgeBaseError> for Error {
fn from(err: crate::operation::get_knowledge_base::GetKnowledgeBaseError) -> Self {
match err {
crate::operation::get_knowledge_base::GetKnowledgeBaseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_knowledge_base::GetKnowledgeBaseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_knowledge_base::GetKnowledgeBaseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_knowledge_base::GetKnowledgeBaseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_quick_response::GetQuickResponseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_quick_response::GetQuickResponseError, 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_quick_response::GetQuickResponseError> for Error {
fn from(err: crate::operation::get_quick_response::GetQuickResponseError) -> Self {
match err {
crate::operation::get_quick_response::GetQuickResponseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_quick_response::GetQuickResponseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_quick_response::GetQuickResponseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_quick_response::GetQuickResponseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recommendations::GetRecommendationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_recommendations::GetRecommendationsError, 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_recommendations::GetRecommendationsError> for Error {
fn from(err: crate::operation::get_recommendations::GetRecommendationsError) -> Self {
match err {
crate::operation::get_recommendations::GetRecommendationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_recommendations::GetRecommendationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(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_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, 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_session::GetSessionError> for Error {
fn from(err: crate::operation::get_session::GetSessionError) -> Self {
match err {
crate::operation::get_session::GetSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_session::GetSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_session::GetSessionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_session::GetSessionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_assistant_associations::ListAssistantAssociationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_assistant_associations::ListAssistantAssociationsError, 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_assistant_associations::ListAssistantAssociationsError> for Error {
fn from(err: crate::operation::list_assistant_associations::ListAssistantAssociationsError) -> Self {
match err {
crate::operation::list_assistant_associations::ListAssistantAssociationsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_assistant_associations::ListAssistantAssociationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_assistant_associations::ListAssistantAssociationsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_assistant_associations::ListAssistantAssociationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_assistants::ListAssistantsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_assistants::ListAssistantsError, 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_assistants::ListAssistantsError> for Error {
fn from(err: crate::operation::list_assistants::ListAssistantsError) -> Self {
match err {
crate::operation::list_assistants::ListAssistantsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_assistants::ListAssistantsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_assistants::ListAssistantsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_contents::ListContentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_contents::ListContentsError, 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_contents::ListContentsError> for Error {
fn from(err: crate::operation::list_contents::ListContentsError) -> Self {
match err {
crate::operation::list_contents::ListContentsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_contents::ListContentsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_contents::ListContentsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_contents::ListContentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_import_jobs::ListImportJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_import_jobs::ListImportJobsError, 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_import_jobs::ListImportJobsError> for Error {
fn from(err: crate::operation::list_import_jobs::ListImportJobsError) -> Self {
match err {
crate::operation::list_import_jobs::ListImportJobsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_import_jobs::ListImportJobsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_import_jobs::ListImportJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_knowledge_bases::ListKnowledgeBasesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_knowledge_bases::ListKnowledgeBasesError, 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_knowledge_bases::ListKnowledgeBasesError> for Error {
fn from(err: crate::operation::list_knowledge_bases::ListKnowledgeBasesError) -> Self {
match err {
crate::operation::list_knowledge_bases::ListKnowledgeBasesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_knowledge_bases::ListKnowledgeBasesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_knowledge_bases::ListKnowledgeBasesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_quick_responses::ListQuickResponsesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_quick_responses::ListQuickResponsesError, 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_quick_responses::ListQuickResponsesError> for Error {
fn from(err: crate::operation::list_quick_responses::ListQuickResponsesError) -> Self {
match err {
crate::operation::list_quick_responses::ListQuickResponsesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_quick_responses::ListQuickResponsesError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_quick_responses::ListQuickResponsesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_quick_responses::ListQuickResponsesError::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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError,
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::notify_recommendations_received::NotifyRecommendationsReceivedError> for Error {
fn from(err: crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError) -> Self {
match err {
crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_assistant::QueryAssistantError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_assistant::QueryAssistantError, 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::query_assistant::QueryAssistantError> for Error {
fn from(err: crate::operation::query_assistant::QueryAssistantError) -> Self {
match err {
crate::operation::query_assistant::QueryAssistantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::query_assistant::QueryAssistantError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
crate::operation::query_assistant::QueryAssistantError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::query_assistant::QueryAssistantError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::query_assistant::QueryAssistantError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError,
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::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError> for Error {
fn from(err: crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError) -> Self {
match err {
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::remove_knowledge_base_template_uri::RemoveKnowledgeBaseTemplateUriError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_content::SearchContentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_content::SearchContentError, 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::search_content::SearchContentError> for Error {
fn from(err: crate::operation::search_content::SearchContentError) -> Self {
match err {
crate::operation::search_content::SearchContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::search_content::SearchContentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::search_content::SearchContentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::search_content::SearchContentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_quick_responses::SearchQuickResponsesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_quick_responses::SearchQuickResponsesError, 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::search_quick_responses::SearchQuickResponsesError> for Error {
fn from(err: crate::operation::search_quick_responses::SearchQuickResponsesError) -> Self {
match err {
crate::operation::search_quick_responses::SearchQuickResponsesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::search_quick_responses::SearchQuickResponsesError::RequestTimeoutException(inner) => {
Error::RequestTimeoutException(inner)
}
crate::operation::search_quick_responses::SearchQuickResponsesError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::search_quick_responses::SearchQuickResponsesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::search_quick_responses::SearchQuickResponsesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_sessions::SearchSessionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_sessions::SearchSessionsError, 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::search_sessions::SearchSessionsError> for Error {
fn from(err: crate::operation::search_sessions::SearchSessionsError) -> Self {
match err {
crate::operation::search_sessions::SearchSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::search_sessions::SearchSessionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::search_sessions::SearchSessionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::search_sessions::SearchSessionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_content_upload::StartContentUploadError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_content_upload::StartContentUploadError, 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::start_content_upload::StartContentUploadError> for Error {
fn from(err: crate::operation::start_content_upload::StartContentUploadError) -> Self {
match err {
crate::operation::start_content_upload::StartContentUploadError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_content_upload::StartContentUploadError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::start_content_upload::StartContentUploadError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_content_upload::StartContentUploadError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_import_job::StartImportJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_import_job::StartImportJobError, 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::start_import_job::StartImportJobError> for Error {
fn from(err: crate::operation::start_import_job::StartImportJobError) -> Self {
match err {
crate::operation::start_import_job::StartImportJobError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_import_job::StartImportJobError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::start_import_job::StartImportJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_import_job::StartImportJobError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::start_import_job::StartImportJobError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_import_job::StartImportJobError::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::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(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::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_content::UpdateContentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_content::UpdateContentError, 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_content::UpdateContentError> for Error {
fn from(err: crate::operation::update_content::UpdateContentError) -> Self {
match err {
crate::operation::update_content::UpdateContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_content::UpdateContentError::PreconditionFailedException(inner) => Error::PreconditionFailedException(inner),
crate::operation::update_content::UpdateContentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_content::UpdateContentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_content::UpdateContentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError,
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_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError> for Error {
fn from(err: crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError) -> Self {
match err {
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_knowledge_base_template_uri::UpdateKnowledgeBaseTemplateUriError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_quick_response::UpdateQuickResponseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_quick_response::UpdateQuickResponseError, 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_quick_response::UpdateQuickResponseError> for Error {
fn from(err: crate::operation::update_quick_response::UpdateQuickResponseError) -> Self {
match err {
crate::operation::update_quick_response::UpdateQuickResponseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_quick_response::UpdateQuickResponseError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_quick_response::UpdateQuickResponseError::PreconditionFailedException(inner) => {
Error::PreconditionFailedException(inner)
}
crate::operation::update_quick_response::UpdateQuickResponseError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_quick_response::UpdateQuickResponseError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_quick_response::UpdateQuickResponseError::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::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::PreconditionFailedException(inner) => inner.source(),
Error::RequestTimeoutException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::TooManyTagsException(inner) => inner.source(),
Error::ValidationException(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::ConflictException(e) => e.request_id(),
Self::PreconditionFailedException(e) => e.request_id(),
Self::RequestTimeoutException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::TooManyTagsException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}