#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAssistantError {
pub kind: CreateAssistantErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAssistantErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateAssistantError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAssistantErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateAssistantErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateAssistantErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateAssistantErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateAssistantErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAssistantError {
fn code(&self) -> Option<&str> {
CreateAssistantError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAssistantError {
pub fn new(kind: CreateAssistantErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateAssistantErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAssistantErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateAssistantErrorKind::ConflictException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateAssistantErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateAssistantError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAssistantErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateAssistantErrorKind::ConflictException(_inner) => Some(_inner),
CreateAssistantErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateAssistantErrorKind::ValidationException(_inner) => Some(_inner),
CreateAssistantErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAssistantAssociationError {
pub kind: CreateAssistantAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAssistantAssociationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateAssistantAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAssistantAssociationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateAssistantAssociationErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateAssistantAssociationErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateAssistantAssociationErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateAssistantAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAssistantAssociationError {
fn code(&self) -> Option<&str> {
CreateAssistantAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAssistantAssociationError {
pub fn new(kind: CreateAssistantAssociationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateAssistantAssociationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAssistantAssociationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantAssociationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantAssociationErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantAssociationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantAssociationErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateAssistantAssociationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateAssistantAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAssistantAssociationErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateAssistantAssociationErrorKind::ConflictException(_inner) => Some(_inner),
CreateAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateAssistantAssociationErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateAssistantAssociationErrorKind::ValidationException(_inner) => Some(_inner),
CreateAssistantAssociationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateContentError {
pub kind: CreateContentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateContentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateContentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateContentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateContentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateContentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateContentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateContentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateContentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateContentError {
fn code(&self) -> Option<&str> {
CreateContentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateContentError {
pub fn new(kind: CreateContentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateContentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateContentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateContentErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateContentErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateContentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateContentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateContentErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateContentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateContentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateContentErrorKind::ConflictException(_inner) => Some(_inner),
CreateContentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateContentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateContentErrorKind::ValidationException(_inner) => Some(_inner),
CreateContentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateKnowledgeBaseError {
pub kind: CreateKnowledgeBaseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateKnowledgeBaseErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateKnowledgeBaseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateKnowledgeBaseErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateKnowledgeBaseErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateKnowledgeBaseErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateKnowledgeBaseErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateKnowledgeBaseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateKnowledgeBaseError {
fn code(&self) -> Option<&str> {
CreateKnowledgeBaseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateKnowledgeBaseError {
pub fn new(kind: CreateKnowledgeBaseErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateKnowledgeBaseErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateKnowledgeBaseErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateKnowledgeBaseErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateKnowledgeBaseErrorKind::ConflictException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateKnowledgeBaseErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateKnowledgeBaseErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateKnowledgeBaseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateKnowledgeBaseErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateKnowledgeBaseErrorKind::ConflictException(_inner) => Some(_inner),
CreateKnowledgeBaseErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateKnowledgeBaseErrorKind::ValidationException(_inner) => Some(_inner),
CreateKnowledgeBaseErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSessionError {
pub kind: CreateSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSessionErrorKind {
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSessionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateSessionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSessionError {
fn code(&self) -> Option<&str> {
CreateSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSessionError {
pub fn new(kind: CreateSessionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateSessionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSessionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateSessionErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateSessionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateSessionErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSessionErrorKind::ConflictException(_inner) => Some(_inner),
CreateSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateSessionErrorKind::ValidationException(_inner) => Some(_inner),
CreateSessionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAssistantError {
pub kind: DeleteAssistantErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAssistantErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteAssistantError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAssistantErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteAssistantErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAssistantErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteAssistantErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAssistantError {
fn code(&self) -> Option<&str> {
DeleteAssistantError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAssistantError {
pub fn new(kind: DeleteAssistantErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteAssistantErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAssistantErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAssistantErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAssistantErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteAssistantErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteAssistantError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAssistantErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteAssistantErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAssistantErrorKind::ValidationException(_inner) => Some(_inner),
DeleteAssistantErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAssistantAssociationError {
pub kind: DeleteAssistantAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAssistantAssociationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteAssistantAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAssistantAssociationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAssistantAssociationErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteAssistantAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAssistantAssociationError {
fn code(&self) -> Option<&str> {
DeleteAssistantAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAssistantAssociationError {
pub fn new(kind: DeleteAssistantAssociationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteAssistantAssociationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAssistantAssociationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAssistantAssociationErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAssistantAssociationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAssistantAssociationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteAssistantAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAssistantAssociationErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAssistantAssociationErrorKind::ValidationException(_inner) => Some(_inner),
DeleteAssistantAssociationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteContentError {
pub kind: DeleteContentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteContentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteContentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteContentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteContentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteContentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteContentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteContentError {
fn code(&self) -> Option<&str> {
DeleteContentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteContentError {
pub fn new(kind: DeleteContentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteContentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteContentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteContentErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteContentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteContentErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteContentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteContentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteContentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteContentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteContentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteKnowledgeBaseError {
pub kind: DeleteKnowledgeBaseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteKnowledgeBaseErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteKnowledgeBaseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteKnowledgeBaseErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteKnowledgeBaseErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteKnowledgeBaseErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteKnowledgeBaseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteKnowledgeBaseError {
fn code(&self) -> Option<&str> {
DeleteKnowledgeBaseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteKnowledgeBaseError {
pub fn new(kind: DeleteKnowledgeBaseErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteKnowledgeBaseErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteKnowledgeBaseErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteKnowledgeBaseErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteKnowledgeBaseErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteKnowledgeBaseErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteKnowledgeBaseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteKnowledgeBaseErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteKnowledgeBaseErrorKind::ConflictException(_inner) => Some(_inner),
DeleteKnowledgeBaseErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteKnowledgeBaseErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAssistantError {
pub kind: GetAssistantErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAssistantErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetAssistantError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAssistantErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetAssistantErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetAssistantErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetAssistantErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAssistantError {
fn code(&self) -> Option<&str> {
GetAssistantError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAssistantError {
pub fn new(kind: GetAssistantErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetAssistantErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAssistantErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetAssistantErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetAssistantErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetAssistantErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetAssistantError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAssistantErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetAssistantErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetAssistantErrorKind::ValidationException(_inner) => Some(_inner),
GetAssistantErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAssistantAssociationError {
pub kind: GetAssistantAssociationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAssistantAssociationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetAssistantAssociationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAssistantAssociationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetAssistantAssociationErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetAssistantAssociationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAssistantAssociationError {
fn code(&self) -> Option<&str> {
GetAssistantAssociationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAssistantAssociationError {
pub fn new(kind: GetAssistantAssociationErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetAssistantAssociationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAssistantAssociationErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetAssistantAssociationErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetAssistantAssociationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetAssistantAssociationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetAssistantAssociationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAssistantAssociationErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetAssistantAssociationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetAssistantAssociationErrorKind::ValidationException(_inner) => Some(_inner),
GetAssistantAssociationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetContentError {
pub kind: GetContentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetContentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetContentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetContentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetContentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetContentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetContentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetContentError {
fn code(&self) -> Option<&str> {
GetContentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetContentError {
pub fn new(kind: GetContentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetContentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetContentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetContentErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetContentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetContentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetContentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetContentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetContentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetContentErrorKind::ValidationException(_inner) => Some(_inner),
GetContentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetContentSummaryError {
pub kind: GetContentSummaryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetContentSummaryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetContentSummaryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetContentSummaryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetContentSummaryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetContentSummaryErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetContentSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetContentSummaryError {
fn code(&self) -> Option<&str> {
GetContentSummaryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetContentSummaryError {
pub fn new(kind: GetContentSummaryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetContentSummaryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetContentSummaryErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetContentSummaryErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetContentSummaryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetContentSummaryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetContentSummaryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetContentSummaryErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetContentSummaryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetContentSummaryErrorKind::ValidationException(_inner) => Some(_inner),
GetContentSummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetKnowledgeBaseError {
pub kind: GetKnowledgeBaseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetKnowledgeBaseErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetKnowledgeBaseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetKnowledgeBaseErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetKnowledgeBaseErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetKnowledgeBaseErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetKnowledgeBaseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetKnowledgeBaseError {
fn code(&self) -> Option<&str> {
GetKnowledgeBaseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetKnowledgeBaseError {
pub fn new(kind: GetKnowledgeBaseErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetKnowledgeBaseErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetKnowledgeBaseErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetKnowledgeBaseErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetKnowledgeBaseErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetKnowledgeBaseErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetKnowledgeBaseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetKnowledgeBaseErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetKnowledgeBaseErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetKnowledgeBaseErrorKind::ValidationException(_inner) => Some(_inner),
GetKnowledgeBaseErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRecommendationsError {
pub kind: GetRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRecommendationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRecommendationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRecommendationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRecommendationsError {
fn code(&self) -> Option<&str> {
GetRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRecommendationsError {
pub fn new(kind: GetRecommendationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetRecommendationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRecommendationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRecommendationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRecommendationsErrorKind::ValidationException(_inner) => Some(_inner),
GetRecommendationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSessionError {
pub kind: GetSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSessionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSessionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSessionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSessionError {
fn code(&self) -> Option<&str> {
GetSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSessionError {
pub fn new(kind: GetSessionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetSessionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSessionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetSessionErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSessionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetSessionErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSessionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSessionErrorKind::ValidationException(_inner) => Some(_inner),
GetSessionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAssistantAssociationsError {
pub kind: ListAssistantAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAssistantAssociationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListAssistantAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAssistantAssociationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListAssistantAssociationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListAssistantAssociationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListAssistantAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAssistantAssociationsError {
fn code(&self) -> Option<&str> {
ListAssistantAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAssistantAssociationsError {
pub fn new(kind: ListAssistantAssociationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListAssistantAssociationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAssistantAssociationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListAssistantAssociationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAssistantAssociationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAssistantAssociationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAssistantAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAssistantAssociationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListAssistantAssociationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListAssistantAssociationsErrorKind::ValidationException(_inner) => Some(_inner),
ListAssistantAssociationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAssistantsError {
pub kind: ListAssistantsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAssistantsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListAssistantsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAssistantsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListAssistantsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListAssistantsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAssistantsError {
fn code(&self) -> Option<&str> {
ListAssistantsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAssistantsError {
pub fn new(kind: ListAssistantsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListAssistantsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAssistantsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListAssistantsErrorKind::AccessDeniedException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListAssistantsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListAssistantsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAssistantsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListAssistantsErrorKind::ValidationException(_inner) => Some(_inner),
ListAssistantsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListContentsError {
pub kind: ListContentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListContentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListContentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListContentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListContentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListContentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListContentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListContentsError {
fn code(&self) -> Option<&str> {
ListContentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListContentsError {
pub fn new(kind: ListContentsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListContentsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListContentsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListContentsErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListContentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListContentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListContentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListContentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListContentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListContentsErrorKind::ValidationException(_inner) => Some(_inner),
ListContentsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListKnowledgeBasesError {
pub kind: ListKnowledgeBasesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListKnowledgeBasesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListKnowledgeBasesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListKnowledgeBasesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListKnowledgeBasesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListKnowledgeBasesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListKnowledgeBasesError {
fn code(&self) -> Option<&str> {
ListKnowledgeBasesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListKnowledgeBasesError {
pub fn new(kind: ListKnowledgeBasesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListKnowledgeBasesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListKnowledgeBasesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListKnowledgeBasesErrorKind::AccessDeniedException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListKnowledgeBasesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListKnowledgeBasesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListKnowledgeBasesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListKnowledgeBasesErrorKind::ValidationException(_inner) => Some(_inner),
ListKnowledgeBasesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct NotifyRecommendationsReceivedError {
pub kind: NotifyRecommendationsReceivedErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum NotifyRecommendationsReceivedErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for NotifyRecommendationsReceivedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
NotifyRecommendationsReceivedErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
NotifyRecommendationsReceivedErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
NotifyRecommendationsReceivedErrorKind::ValidationException(_inner) => _inner.fmt(f),
NotifyRecommendationsReceivedErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for NotifyRecommendationsReceivedError {
fn code(&self) -> Option<&str> {
NotifyRecommendationsReceivedError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl NotifyRecommendationsReceivedError {
pub fn new(
kind: NotifyRecommendationsReceivedErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: NotifyRecommendationsReceivedErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: NotifyRecommendationsReceivedErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
NotifyRecommendationsReceivedErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
NotifyRecommendationsReceivedErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
NotifyRecommendationsReceivedErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for NotifyRecommendationsReceivedError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
NotifyRecommendationsReceivedErrorKind::AccessDeniedException(_inner) => Some(_inner),
NotifyRecommendationsReceivedErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
NotifyRecommendationsReceivedErrorKind::ValidationException(_inner) => Some(_inner),
NotifyRecommendationsReceivedErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct QueryAssistantError {
pub kind: QueryAssistantErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum QueryAssistantErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for QueryAssistantError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
QueryAssistantErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
QueryAssistantErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
QueryAssistantErrorKind::ValidationException(_inner) => _inner.fmt(f),
QueryAssistantErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for QueryAssistantError {
fn code(&self) -> Option<&str> {
QueryAssistantError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl QueryAssistantError {
pub fn new(kind: QueryAssistantErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: QueryAssistantErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: QueryAssistantErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
QueryAssistantErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
QueryAssistantErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, QueryAssistantErrorKind::ValidationException(_))
}
}
impl std::error::Error for QueryAssistantError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
QueryAssistantErrorKind::AccessDeniedException(_inner) => Some(_inner),
QueryAssistantErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
QueryAssistantErrorKind::ValidationException(_inner) => Some(_inner),
QueryAssistantErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveKnowledgeBaseTemplateUriError {
pub kind: RemoveKnowledgeBaseTemplateUriErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveKnowledgeBaseTemplateUriErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for RemoveKnowledgeBaseTemplateUriError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RemoveKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
RemoveKnowledgeBaseTemplateUriErrorKind::ValidationException(_inner) => _inner.fmt(f),
RemoveKnowledgeBaseTemplateUriErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveKnowledgeBaseTemplateUriError {
fn code(&self) -> Option<&str> {
RemoveKnowledgeBaseTemplateUriError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveKnowledgeBaseTemplateUriError {
pub fn new(
kind: RemoveKnowledgeBaseTemplateUriErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: RemoveKnowledgeBaseTemplateUriErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveKnowledgeBaseTemplateUriErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RemoveKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RemoveKnowledgeBaseTemplateUriErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RemoveKnowledgeBaseTemplateUriError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_inner) => Some(_inner),
RemoveKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
RemoveKnowledgeBaseTemplateUriErrorKind::ValidationException(_inner) => Some(_inner),
RemoveKnowledgeBaseTemplateUriErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchContentError {
pub kind: SearchContentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchContentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for SearchContentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchContentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SearchContentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SearchContentErrorKind::ValidationException(_inner) => _inner.fmt(f),
SearchContentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchContentError {
fn code(&self) -> Option<&str> {
SearchContentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SearchContentError {
pub fn new(kind: SearchContentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SearchContentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchContentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, SearchContentErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SearchContentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, SearchContentErrorKind::ValidationException(_))
}
}
impl std::error::Error for SearchContentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchContentErrorKind::AccessDeniedException(_inner) => Some(_inner),
SearchContentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SearchContentErrorKind::ValidationException(_inner) => Some(_inner),
SearchContentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchSessionsError {
pub kind: SearchSessionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchSessionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for SearchSessionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchSessionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SearchSessionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SearchSessionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
SearchSessionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchSessionsError {
fn code(&self) -> Option<&str> {
SearchSessionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SearchSessionsError {
pub fn new(kind: SearchSessionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SearchSessionsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchSessionsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SearchSessionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SearchSessionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, SearchSessionsErrorKind::ValidationException(_))
}
}
impl std::error::Error for SearchSessionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchSessionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
SearchSessionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SearchSessionsErrorKind::ValidationException(_inner) => Some(_inner),
SearchSessionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartContentUploadError {
pub kind: StartContentUploadErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartContentUploadErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartContentUploadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartContentUploadErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartContentUploadErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartContentUploadErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartContentUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartContentUploadError {
fn code(&self) -> Option<&str> {
StartContentUploadError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartContentUploadError {
pub fn new(kind: StartContentUploadErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartContentUploadErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartContentUploadErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
StartContentUploadErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartContentUploadErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartContentUploadErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartContentUploadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartContentUploadErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartContentUploadErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartContentUploadErrorKind::ValidationException(_inner) => Some(_inner),
StartContentUploadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::TooManyTagsException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateContentError {
pub kind: UpdateContentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateContentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
PreconditionFailedException(crate::error::PreconditionFailedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateContentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateContentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateContentErrorKind::PreconditionFailedException(_inner) => _inner.fmt(f),
UpdateContentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateContentErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateContentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateContentError {
fn code(&self) -> Option<&str> {
UpdateContentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateContentError {
pub fn new(kind: UpdateContentErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateContentErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateContentErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateContentErrorKind::AccessDeniedException(_))
}
pub fn is_precondition_failed_exception(&self) -> bool {
matches!(
&self.kind,
UpdateContentErrorKind::PreconditionFailedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateContentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateContentErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateContentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateContentErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateContentErrorKind::PreconditionFailedException(_inner) => Some(_inner),
UpdateContentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateContentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateContentErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateKnowledgeBaseTemplateUriError {
pub kind: UpdateKnowledgeBaseTemplateUriErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateKnowledgeBaseTemplateUriErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateKnowledgeBaseTemplateUriError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateKnowledgeBaseTemplateUriErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateKnowledgeBaseTemplateUriErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateKnowledgeBaseTemplateUriError {
fn code(&self) -> Option<&str> {
UpdateKnowledgeBaseTemplateUriError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateKnowledgeBaseTemplateUriError {
pub fn new(
kind: UpdateKnowledgeBaseTemplateUriErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateKnowledgeBaseTemplateUriErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateKnowledgeBaseTemplateUriErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateKnowledgeBaseTemplateUriErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateKnowledgeBaseTemplateUriError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateKnowledgeBaseTemplateUriErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateKnowledgeBaseTemplateUriErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateKnowledgeBaseTemplateUriErrorKind::ValidationException(_inner) => Some(_inner),
UpdateKnowledgeBaseTemplateUriErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ValidationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub resource_name: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &self.message);
formatter.field("resource_name", &self.resource_name);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccessDeniedException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccessDeniedException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl AccessDeniedException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceQuotaExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConflictException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConflictException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ConflictException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PreconditionFailedException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for PreconditionFailedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PreconditionFailedException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl PreconditionFailedException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PreconditionFailedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PreconditionFailedException")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for PreconditionFailedException {}
pub mod precondition_failed_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PreconditionFailedException {
crate::error::PreconditionFailedException {
message: self.message,
}
}
}
}
impl PreconditionFailedException {
pub fn builder() -> crate::error::precondition_failed_exception::Builder {
crate::error::precondition_failed_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TooManyTagsException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub resource_name: std::option::Option<std::string::String>,
}
impl TooManyTagsException {
pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl std::fmt::Debug for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TooManyTagsException");
formatter.field("message", &self.message);
formatter.field("resource_name", &self.resource_name);
formatter.finish()
}
}
impl TooManyTagsException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyTagsException")?;
if let Some(inner_7) = &self.message {
write!(f, ": {}", inner_7)?;
}
Ok(())
}
}
impl std::error::Error for TooManyTagsException {}
pub mod too_many_tags_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::TooManyTagsException {
crate::error::TooManyTagsException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl TooManyTagsException {
pub fn builder() -> crate::error::too_many_tags_exception::Builder {
crate::error::too_many_tags_exception::Builder::default()
}
}