#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartLendingAnalysisError {
pub kind: StartLendingAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartLendingAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartLendingAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerError(crate::error::InternalServerError),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
LimitExceededException(crate::error::LimitExceededException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartLendingAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartLendingAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
StartLendingAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
StartLendingAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
StartLendingAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartLendingAnalysisError {
fn code(&self) -> Option<&str> {
StartLendingAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartLendingAnalysisError {
pub fn new(kind: StartLendingAnalysisErrorKind, 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: StartLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
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,
StartLendingAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::LimitExceededException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
StartLendingAnalysisErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for StartLendingAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartLendingAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::BadDocumentException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
StartLendingAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::LimitExceededException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
StartLendingAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
StartLendingAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedDocumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl UnsupportedDocumentException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl UnsupportedDocumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedDocumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedDocumentException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedDocumentException {}
pub mod unsupported_document_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::UnsupportedDocumentException {
crate::error::UnsupportedDocumentException {
message: self.message,
code: self.code,
}
}
}
}
impl UnsupportedDocumentException {
pub fn builder() -> crate::error::unsupported_document_exception::Builder {
crate::error::unsupported_document_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ThrottlingException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
code: self.code,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ProvisionedThroughputExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ProvisionedThroughputExceededException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ProvisionedThroughputExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ProvisionedThroughputExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ProvisionedThroughputExceededException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ProvisionedThroughputExceededException {}
pub mod provisioned_throughput_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ProvisionedThroughputExceededException {
crate::error::ProvisionedThroughputExceededException {
message: self.message,
code: self.code,
}
}
}
}
impl ProvisionedThroughputExceededException {
pub fn builder() -> crate::error::provisioned_throughput_exceeded_exception::Builder {
crate::error::provisioned_throughput_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl LimitExceededException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
code: self.code,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidS3ObjectException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InvalidS3ObjectException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InvalidS3ObjectException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidS3ObjectException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidS3ObjectException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidS3ObjectException {}
pub mod invalid_s3_object_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InvalidS3ObjectException {
crate::error::InvalidS3ObjectException {
message: self.message,
code: self.code,
}
}
}
}
impl InvalidS3ObjectException {
pub fn builder() -> crate::error::invalid_s3_object_exception::Builder {
crate::error::invalid_s3_object_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InvalidParameterException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
code: self.code,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidKmsKeyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InvalidKmsKeyException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InvalidKmsKeyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidKmsKeyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidKmsKeyException [InvalidKMSKeyException]")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidKmsKeyException {}
pub mod invalid_kms_key_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InvalidKmsKeyException {
crate::error::InvalidKmsKeyException {
message: self.message,
code: self.code,
}
}
}
}
impl InvalidKmsKeyException {
pub fn builder() -> crate::error::invalid_kms_key_exception::Builder {
crate::error::invalid_kms_key_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerError {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InternalServerError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InternalServerError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerError")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerError {}
pub mod internal_server_error {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InternalServerError {
crate::error::InternalServerError {
message: self.message,
code: self.code,
}
}
}
}
impl InternalServerError {
pub fn builder() -> crate::error::internal_server_error::Builder {
crate::error::internal_server_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IdempotentParameterMismatchException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl IdempotentParameterMismatchException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl IdempotentParameterMismatchException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IdempotentParameterMismatchException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IdempotentParameterMismatchException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for IdempotentParameterMismatchException {}
pub mod idempotent_parameter_mismatch_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::IdempotentParameterMismatchException {
crate::error::IdempotentParameterMismatchException {
message: self.message,
code: self.code,
}
}
}
}
impl IdempotentParameterMismatchException {
pub fn builder() -> crate::error::idempotent_parameter_mismatch_exception::Builder {
crate::error::idempotent_parameter_mismatch_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DocumentTooLargeException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl DocumentTooLargeException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl DocumentTooLargeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DocumentTooLargeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DocumentTooLargeException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for DocumentTooLargeException {}
pub mod document_too_large_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::DocumentTooLargeException {
crate::error::DocumentTooLargeException {
message: self.message,
code: self.code,
}
}
}
}
impl DocumentTooLargeException {
pub fn builder() -> crate::error::document_too_large_exception::Builder {
crate::error::document_too_large_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadDocumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl BadDocumentException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl BadDocumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadDocumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadDocumentException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for BadDocumentException {}
pub mod bad_document_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::BadDocumentException {
crate::error::BadDocumentException {
message: self.message,
code: self.code,
}
}
}
}
impl BadDocumentException {
pub fn builder() -> crate::error::bad_document_exception::Builder {
crate::error::bad_document_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::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_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
code: self.code,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartExpenseAnalysisError {
pub kind: StartExpenseAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartExpenseAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartExpenseAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerError(crate::error::InternalServerError),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
LimitExceededException(crate::error::LimitExceededException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartExpenseAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartExpenseAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
StartExpenseAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
StartExpenseAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
StartExpenseAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartExpenseAnalysisError {
fn code(&self) -> Option<&str> {
StartExpenseAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartExpenseAnalysisError {
pub fn new(kind: StartExpenseAnalysisErrorKind, 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: StartExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
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,
StartExpenseAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::LimitExceededException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
StartExpenseAnalysisErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for StartExpenseAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartExpenseAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::BadDocumentException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
StartExpenseAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::LimitExceededException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
StartExpenseAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
StartExpenseAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDocumentTextDetectionError {
pub kind: StartDocumentTextDetectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDocumentTextDetectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDocumentTextDetectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerError(crate::error::InternalServerError),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
LimitExceededException(crate::error::LimitExceededException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDocumentTextDetectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDocumentTextDetectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
StartDocumentTextDetectionErrorKind::InternalServerError(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
StartDocumentTextDetectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartDocumentTextDetectionErrorKind::UnsupportedDocumentException(_inner) => {
_inner.fmt(f)
}
StartDocumentTextDetectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDocumentTextDetectionError {
fn code(&self) -> Option<&str> {
StartDocumentTextDetectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartDocumentTextDetectionError {
pub fn new(kind: StartDocumentTextDetectionErrorKind, 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: StartDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
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,
StartDocumentTextDetectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::LimitExceededException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentTextDetectionErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for StartDocumentTextDetectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDocumentTextDetectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::BadDocumentException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
StartDocumentTextDetectionErrorKind::InternalServerError(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::LimitExceededException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
StartDocumentTextDetectionErrorKind::ThrottlingException(_inner) => Some(_inner),
StartDocumentTextDetectionErrorKind::UnsupportedDocumentException(_inner) => {
Some(_inner)
}
StartDocumentTextDetectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDocumentAnalysisError {
pub kind: StartDocumentAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDocumentAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDocumentAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
IdempotentParameterMismatchException(crate::error::IdempotentParameterMismatchException),
InternalServerError(crate::error::InternalServerError),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
LimitExceededException(crate::error::LimitExceededException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDocumentAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDocumentAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
_inner.fmt(f)
}
StartDocumentAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
StartDocumentAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
StartDocumentAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDocumentAnalysisError {
fn code(&self) -> Option<&str> {
StartDocumentAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartDocumentAnalysisError {
pub fn new(kind: StartDocumentAnalysisErrorKind, 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: StartDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
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,
StartDocumentAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::IdempotentParameterMismatchException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::LimitExceededException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
StartDocumentAnalysisErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for StartDocumentAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDocumentAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::BadDocumentException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::IdempotentParameterMismatchException(_inner) => {
Some(_inner)
}
StartDocumentAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::LimitExceededException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
StartDocumentAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
StartDocumentAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLendingAnalysisSummaryError {
pub kind: GetLendingAnalysisSummaryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLendingAnalysisSummaryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLendingAnalysisSummaryErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLendingAnalysisSummaryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerError(crate::error::InternalServerError),
InvalidJobIdException(crate::error::InvalidJobIdException),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLendingAnalysisSummaryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLendingAnalysisSummaryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::InternalServerError(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::InvalidJobIdException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
GetLendingAnalysisSummaryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLendingAnalysisSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLendingAnalysisSummaryError {
fn code(&self) -> Option<&str> {
GetLendingAnalysisSummaryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLendingAnalysisSummaryError {
pub fn new(kind: GetLendingAnalysisSummaryErrorKind, 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: GetLendingAnalysisSummaryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLendingAnalysisSummaryErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetLendingAnalysisSummaryErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_job_id_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::InvalidJobIdException(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisSummaryErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetLendingAnalysisSummaryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLendingAnalysisSummaryErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::InternalServerError(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::InvalidJobIdException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
GetLendingAnalysisSummaryErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLendingAnalysisSummaryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidJobIdException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InvalidJobIdException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InvalidJobIdException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidJobIdException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidJobIdException")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidJobIdException {}
pub mod invalid_job_id_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: 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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InvalidJobIdException {
crate::error::InvalidJobIdException {
message: self.message,
code: self.code,
}
}
}
}
impl InvalidJobIdException {
pub fn builder() -> crate::error::invalid_job_id_exception::Builder {
crate::error::invalid_job_id_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLendingAnalysisError {
pub kind: GetLendingAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLendingAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLendingAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerError(crate::error::InternalServerError),
InvalidJobIdException(crate::error::InvalidJobIdException),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLendingAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLendingAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::InvalidJobIdException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
GetLendingAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLendingAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLendingAnalysisError {
fn code(&self) -> Option<&str> {
GetLendingAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLendingAnalysisError {
pub fn new(kind: GetLendingAnalysisErrorKind, 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: GetLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLendingAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetLendingAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_job_id_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::InvalidJobIdException(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetLendingAnalysisErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetLendingAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLendingAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::InvalidJobIdException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
GetLendingAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLendingAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetExpenseAnalysisError {
pub kind: GetExpenseAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetExpenseAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetExpenseAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerError(crate::error::InternalServerError),
InvalidJobIdException(crate::error::InvalidJobIdException),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetExpenseAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetExpenseAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::InvalidJobIdException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
GetExpenseAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetExpenseAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetExpenseAnalysisError {
fn code(&self) -> Option<&str> {
GetExpenseAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetExpenseAnalysisError {
pub fn new(kind: GetExpenseAnalysisErrorKind, 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: GetExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetExpenseAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetExpenseAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_job_id_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::InvalidJobIdException(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetExpenseAnalysisErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetExpenseAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetExpenseAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::InvalidJobIdException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
GetExpenseAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
GetExpenseAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDocumentTextDetectionError {
pub kind: GetDocumentTextDetectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDocumentTextDetectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDocumentTextDetectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerError(crate::error::InternalServerError),
InvalidJobIdException(crate::error::InvalidJobIdException),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDocumentTextDetectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDocumentTextDetectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::InternalServerError(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::InvalidJobIdException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
GetDocumentTextDetectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDocumentTextDetectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDocumentTextDetectionError {
fn code(&self) -> Option<&str> {
GetDocumentTextDetectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDocumentTextDetectionError {
pub fn new(kind: GetDocumentTextDetectionErrorKind, 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: GetDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDocumentTextDetectionErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetDocumentTextDetectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_job_id_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::InvalidJobIdException(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentTextDetectionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetDocumentTextDetectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDocumentTextDetectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::InternalServerError(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::InvalidJobIdException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
GetDocumentTextDetectionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDocumentTextDetectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDocumentAnalysisError {
pub kind: GetDocumentAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDocumentAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDocumentAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerError(crate::error::InternalServerError),
InvalidJobIdException(crate::error::InvalidJobIdException),
InvalidKmsKeyException(crate::error::InvalidKmsKeyException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDocumentAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDocumentAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::InternalServerError(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::InvalidJobIdException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::InvalidKmsKeyException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
GetDocumentAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDocumentAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDocumentAnalysisError {
fn code(&self) -> Option<&str> {
GetDocumentAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDocumentAnalysisError {
pub fn new(kind: GetDocumentAnalysisErrorKind, 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: GetDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDocumentAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetDocumentAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_job_id_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::InvalidJobIdException(_)
)
}
pub fn is_invalid_kms_key_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::InvalidKmsKeyException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDocumentAnalysisErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetDocumentAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDocumentAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::InternalServerError(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::InvalidJobIdException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::InvalidKmsKeyException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
GetDocumentAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDocumentAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetectDocumentTextError {
pub kind: DetectDocumentTextErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetectDocumentTextError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetectDocumentTextErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetectDocumentTextErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
InternalServerError(crate::error::InternalServerError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetectDocumentTextError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetectDocumentTextErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
DetectDocumentTextErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
DetectDocumentTextErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetectDocumentTextError {
fn code(&self) -> Option<&str> {
DetectDocumentTextError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetectDocumentTextError {
pub fn new(kind: DetectDocumentTextErrorKind, 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: DetectDocumentTextErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetectDocumentTextErrorKind::Unhandled(crate::error::Unhandled::new(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,
DetectDocumentTextErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
DetectDocumentTextErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for DetectDocumentTextError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetectDocumentTextErrorKind::AccessDeniedException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::BadDocumentException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::InternalServerError(_inner) => Some(_inner),
DetectDocumentTextErrorKind::InvalidParameterException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
DetectDocumentTextErrorKind::ThrottlingException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
DetectDocumentTextErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AnalyzeIDError {
pub kind: AnalyzeIDErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AnalyzeIDError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AnalyzeIDErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AnalyzeIDErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
InternalServerError(crate::error::InternalServerError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AnalyzeIDError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AnalyzeIDErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::ProvisionedThroughputExceededException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
AnalyzeIDErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AnalyzeIDError {
fn code(&self) -> Option<&str> {
AnalyzeIDError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AnalyzeIDError {
pub fn new(kind: AnalyzeIDErrorKind, 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: AnalyzeIDErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AnalyzeIDErrorKind::Unhandled(crate::error::Unhandled::new(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, AnalyzeIDErrorKind::AccessDeniedException(_))
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::BadDocumentException(_))
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::DocumentTooLargeException(_))
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::InternalServerError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::InvalidParameterException(_))
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::InvalidS3ObjectException(_))
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeIDErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, AnalyzeIDErrorKind::ThrottlingException(_))
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeIDErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for AnalyzeIDError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AnalyzeIDErrorKind::AccessDeniedException(_inner) => Some(_inner),
AnalyzeIDErrorKind::BadDocumentException(_inner) => Some(_inner),
AnalyzeIDErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
AnalyzeIDErrorKind::InternalServerError(_inner) => Some(_inner),
AnalyzeIDErrorKind::InvalidParameterException(_inner) => Some(_inner),
AnalyzeIDErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
AnalyzeIDErrorKind::ProvisionedThroughputExceededException(_inner) => Some(_inner),
AnalyzeIDErrorKind::ThrottlingException(_inner) => Some(_inner),
AnalyzeIDErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
AnalyzeIDErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AnalyzeExpenseError {
pub kind: AnalyzeExpenseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AnalyzeExpenseError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AnalyzeExpenseErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AnalyzeExpenseErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
InternalServerError(crate::error::InternalServerError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AnalyzeExpenseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AnalyzeExpenseErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
AnalyzeExpenseErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
AnalyzeExpenseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AnalyzeExpenseError {
fn code(&self) -> Option<&str> {
AnalyzeExpenseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AnalyzeExpenseError {
pub fn new(kind: AnalyzeExpenseErrorKind, 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: AnalyzeExpenseErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AnalyzeExpenseErrorKind::Unhandled(crate::error::Unhandled::new(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,
AnalyzeExpenseErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(&self.kind, AnalyzeExpenseErrorKind::BadDocumentException(_))
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeExpenseErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, AnalyzeExpenseErrorKind::InternalServerError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeExpenseErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeExpenseErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeExpenseErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, AnalyzeExpenseErrorKind::ThrottlingException(_))
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeExpenseErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for AnalyzeExpenseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AnalyzeExpenseErrorKind::AccessDeniedException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::BadDocumentException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::InternalServerError(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::InvalidParameterException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::ProvisionedThroughputExceededException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::ThrottlingException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
AnalyzeExpenseErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AnalyzeDocumentError {
pub kind: AnalyzeDocumentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AnalyzeDocumentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AnalyzeDocumentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AnalyzeDocumentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
BadDocumentException(crate::error::BadDocumentException),
DocumentTooLargeException(crate::error::DocumentTooLargeException),
HumanLoopQuotaExceededException(crate::error::HumanLoopQuotaExceededException),
InternalServerError(crate::error::InternalServerError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidS3ObjectException(crate::error::InvalidS3ObjectException),
ProvisionedThroughputExceededException(crate::error::ProvisionedThroughputExceededException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedDocumentException(crate::error::UnsupportedDocumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AnalyzeDocumentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AnalyzeDocumentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::BadDocumentException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::DocumentTooLargeException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::HumanLoopQuotaExceededException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::InvalidS3ObjectException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::ProvisionedThroughputExceededException(_inner) => {
_inner.fmt(f)
}
AnalyzeDocumentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::UnsupportedDocumentException(_inner) => _inner.fmt(f),
AnalyzeDocumentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AnalyzeDocumentError {
fn code(&self) -> Option<&str> {
AnalyzeDocumentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AnalyzeDocumentError {
pub fn new(kind: AnalyzeDocumentErrorKind, 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: AnalyzeDocumentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AnalyzeDocumentErrorKind::Unhandled(crate::error::Unhandled::new(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,
AnalyzeDocumentErrorKind::AccessDeniedException(_)
)
}
pub fn is_bad_document_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::BadDocumentException(_)
)
}
pub fn is_document_too_large_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::DocumentTooLargeException(_)
)
}
pub fn is_human_loop_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::HumanLoopQuotaExceededException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, AnalyzeDocumentErrorKind::InternalServerError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_s3_object_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::InvalidS3ObjectException(_)
)
}
pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::ProvisionedThroughputExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, AnalyzeDocumentErrorKind::ThrottlingException(_))
}
pub fn is_unsupported_document_exception(&self) -> bool {
matches!(
&self.kind,
AnalyzeDocumentErrorKind::UnsupportedDocumentException(_)
)
}
}
impl std::error::Error for AnalyzeDocumentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AnalyzeDocumentErrorKind::AccessDeniedException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::BadDocumentException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::DocumentTooLargeException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::HumanLoopQuotaExceededException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::InternalServerError(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::InvalidParameterException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::InvalidS3ObjectException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::ProvisionedThroughputExceededException(_inner) => {
Some(_inner)
}
AnalyzeDocumentErrorKind::ThrottlingException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::UnsupportedDocumentException(_inner) => Some(_inner),
AnalyzeDocumentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HumanLoopQuotaExceededException {
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl HumanLoopQuotaExceededException {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl HumanLoopQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for HumanLoopQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "HumanLoopQuotaExceededException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for HumanLoopQuotaExceededException {}
pub mod human_loop_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) quota_code: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
#[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
}
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::HumanLoopQuotaExceededException {
crate::error::HumanLoopQuotaExceededException {
resource_type: self.resource_type,
quota_code: self.quota_code,
service_code: self.service_code,
message: self.message,
code: self.code,
}
}
}
}
impl HumanLoopQuotaExceededException {
pub fn builder() -> crate::error::human_loop_quota_exceeded_exception::Builder {
crate::error::human_loop_quota_exceeded_exception::Builder::default()
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}