#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateParallelDataError {
pub kind: CreateParallelDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateParallelDataErrorKind {
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateParallelDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateParallelDataErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateParallelDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateParallelDataError {
fn code(&self) -> Option<&str> {
CreateParallelDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateParallelDataError {
pub fn new(kind: CreateParallelDataErrorKind, 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: CreateParallelDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateParallelDataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::LimitExceededException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateParallelDataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateParallelDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateParallelDataErrorKind::ConflictException(_inner) => Some(_inner),
CreateParallelDataErrorKind::InternalServerException(_inner) => Some(_inner),
CreateParallelDataErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateParallelDataErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateParallelDataErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateParallelDataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateParallelDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteParallelDataError {
pub kind: DeleteParallelDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteParallelDataErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteParallelDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteParallelDataErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
DeleteParallelDataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteParallelDataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteParallelDataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteParallelDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteParallelDataError {
fn code(&self) -> Option<&str> {
DeleteParallelDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteParallelDataError {
pub fn new(kind: DeleteParallelDataErrorKind, 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: DeleteParallelDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteParallelDataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
DeleteParallelDataErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteParallelDataErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteParallelDataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteParallelDataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteParallelDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteParallelDataErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
DeleteParallelDataErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteParallelDataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteParallelDataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteParallelDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTerminologyError {
pub kind: DeleteTerminologyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTerminologyErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteTerminologyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTerminologyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteTerminologyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteTerminologyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteTerminologyErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteTerminologyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTerminologyError {
fn code(&self) -> Option<&str> {
DeleteTerminologyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTerminologyError {
pub fn new(kind: DeleteTerminologyErrorKind, 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: DeleteTerminologyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTerminologyErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTerminologyErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTerminologyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTerminologyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTerminologyErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteTerminologyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTerminologyErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteTerminologyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteTerminologyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteTerminologyErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteTerminologyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTextTranslationJobError {
pub kind: DescribeTextTranslationJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTextTranslationJobErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeTextTranslationJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTextTranslationJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeTextTranslationJobErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DescribeTextTranslationJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTextTranslationJobError {
fn code(&self) -> Option<&str> {
DescribeTextTranslationJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTextTranslationJobError {
pub fn new(kind: DescribeTextTranslationJobErrorKind, 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: DescribeTextTranslationJobErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTextTranslationJobErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTextTranslationJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTextTranslationJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTextTranslationJobErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DescribeTextTranslationJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTextTranslationJobErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeTextTranslationJobErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DescribeTextTranslationJobErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetParallelDataError {
pub kind: GetParallelDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetParallelDataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetParallelDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetParallelDataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetParallelDataErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetParallelDataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetParallelDataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetParallelDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetParallelDataError {
fn code(&self) -> Option<&str> {
GetParallelDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetParallelDataError {
pub fn new(kind: GetParallelDataErrorKind, 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: GetParallelDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetParallelDataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetParallelDataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetParallelDataErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetParallelDataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetParallelDataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetParallelDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetParallelDataErrorKind::InternalServerException(_inner) => Some(_inner),
GetParallelDataErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetParallelDataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetParallelDataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetParallelDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTerminologyError {
pub kind: GetTerminologyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTerminologyErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetTerminologyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTerminologyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTerminologyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetTerminologyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTerminologyErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GetTerminologyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTerminologyError {
fn code(&self) -> Option<&str> {
GetTerminologyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTerminologyError {
pub fn new(kind: GetTerminologyErrorKind, 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: GetTerminologyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTerminologyErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTerminologyErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetTerminologyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTerminologyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetTerminologyErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetTerminologyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTerminologyErrorKind::InternalServerException(_inner) => Some(_inner),
GetTerminologyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetTerminologyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTerminologyErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GetTerminologyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportTerminologyError {
pub kind: ImportTerminologyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportTerminologyErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ImportTerminologyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportTerminologyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ImportTerminologyErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ImportTerminologyErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ImportTerminologyErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ImportTerminologyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportTerminologyError {
fn code(&self) -> Option<&str> {
ImportTerminologyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportTerminologyError {
pub fn new(kind: ImportTerminologyErrorKind, 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: ImportTerminologyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportTerminologyErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ImportTerminologyErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ImportTerminologyErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ImportTerminologyErrorKind::LimitExceededException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ImportTerminologyErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ImportTerminologyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportTerminologyErrorKind::InternalServerException(_inner) => Some(_inner),
ImportTerminologyErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ImportTerminologyErrorKind::LimitExceededException(_inner) => Some(_inner),
ImportTerminologyErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ImportTerminologyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListParallelDataError {
pub kind: ListParallelDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListParallelDataErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListParallelDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListParallelDataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListParallelDataErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ListParallelDataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListParallelDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListParallelDataError {
fn code(&self) -> Option<&str> {
ListParallelDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListParallelDataError {
pub fn new(kind: ListParallelDataErrorKind, 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: ListParallelDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListParallelDataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListParallelDataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListParallelDataErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListParallelDataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListParallelDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListParallelDataErrorKind::InternalServerException(_inner) => Some(_inner),
ListParallelDataErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListParallelDataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListParallelDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTerminologiesError {
pub kind: ListTerminologiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTerminologiesErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTerminologiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTerminologiesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTerminologiesErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ListTerminologiesErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListTerminologiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTerminologiesError {
fn code(&self) -> Option<&str> {
ListTerminologiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTerminologiesError {
pub fn new(kind: ListTerminologiesErrorKind, 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: ListTerminologiesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTerminologiesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTerminologiesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListTerminologiesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListTerminologiesErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListTerminologiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTerminologiesErrorKind::InternalServerException(_inner) => Some(_inner),
ListTerminologiesErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListTerminologiesErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListTerminologiesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTextTranslationJobsError {
pub kind: ListTextTranslationJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTextTranslationJobsErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidFilterException(crate::error::InvalidFilterException),
InvalidRequestException(crate::error::InvalidRequestException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTextTranslationJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTextTranslationJobsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTextTranslationJobsErrorKind::InvalidFilterException(_inner) => _inner.fmt(f),
ListTextTranslationJobsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTextTranslationJobsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListTextTranslationJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTextTranslationJobsError {
fn code(&self) -> Option<&str> {
ListTextTranslationJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTextTranslationJobsError {
pub fn new(kind: ListTextTranslationJobsErrorKind, 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: ListTextTranslationJobsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTextTranslationJobsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTextTranslationJobsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_filter_exception(&self) -> bool {
matches!(
&self.kind,
ListTextTranslationJobsErrorKind::InvalidFilterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTextTranslationJobsErrorKind::InvalidRequestException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListTextTranslationJobsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListTextTranslationJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTextTranslationJobsErrorKind::InternalServerException(_inner) => Some(_inner),
ListTextTranslationJobsErrorKind::InvalidFilterException(_inner) => Some(_inner),
ListTextTranslationJobsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTextTranslationJobsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListTextTranslationJobsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartTextTranslationJobError {
pub kind: StartTextTranslationJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartTextTranslationJobErrorKind {
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
UnsupportedLanguagePairException(crate::error::UnsupportedLanguagePairException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartTextTranslationJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartTextTranslationJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartTextTranslationJobErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
StartTextTranslationJobErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartTextTranslationJobErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StartTextTranslationJobErrorKind::UnsupportedLanguagePairException(_inner) => {
_inner.fmt(f)
}
StartTextTranslationJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartTextTranslationJobError {
fn code(&self) -> Option<&str> {
StartTextTranslationJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartTextTranslationJobError {
pub fn new(kind: StartTextTranslationJobErrorKind, 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: StartTextTranslationJobErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartTextTranslationJobErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::TooManyRequestsException(_)
)
}
pub fn is_unsupported_language_pair_exception(&self) -> bool {
matches!(
&self.kind,
StartTextTranslationJobErrorKind::UnsupportedLanguagePairException(_)
)
}
}
impl std::error::Error for StartTextTranslationJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartTextTranslationJobErrorKind::InternalServerException(_inner) => Some(_inner),
StartTextTranslationJobErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
StartTextTranslationJobErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartTextTranslationJobErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StartTextTranslationJobErrorKind::UnsupportedLanguagePairException(_inner) => {
Some(_inner)
}
StartTextTranslationJobErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopTextTranslationJobError {
pub kind: StopTextTranslationJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopTextTranslationJobErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StopTextTranslationJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopTextTranslationJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopTextTranslationJobErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StopTextTranslationJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopTextTranslationJobError {
fn code(&self) -> Option<&str> {
StopTextTranslationJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopTextTranslationJobError {
pub fn new(kind: StopTextTranslationJobErrorKind, 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: StopTextTranslationJobErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopTextTranslationJobErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopTextTranslationJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopTextTranslationJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
StopTextTranslationJobErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for StopTextTranslationJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopTextTranslationJobErrorKind::InternalServerException(_inner) => Some(_inner),
StopTextTranslationJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopTextTranslationJobErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StopTextTranslationJobErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TranslateTextError {
pub kind: TranslateTextErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TranslateTextErrorKind {
DetectedLanguageLowConfidenceException(crate::error::DetectedLanguageLowConfidenceException),
InternalServerException(crate::error::InternalServerException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TextSizeLimitExceededException(crate::error::TextSizeLimitExceededException),
TooManyRequestsException(crate::error::TooManyRequestsException),
UnsupportedLanguagePairException(crate::error::UnsupportedLanguagePairException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TranslateTextError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TranslateTextErrorKind::DetectedLanguageLowConfidenceException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::TextSizeLimitExceededException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::UnsupportedLanguagePairException(_inner) => _inner.fmt(f),
TranslateTextErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TranslateTextError {
fn code(&self) -> Option<&str> {
TranslateTextError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TranslateTextError {
pub fn new(kind: TranslateTextErrorKind, 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: TranslateTextErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TranslateTextErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_detected_language_low_confidence_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::DetectedLanguageLowConfidenceException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_text_size_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::TextSizeLimitExceededException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::TooManyRequestsException(_)
)
}
pub fn is_unsupported_language_pair_exception(&self) -> bool {
matches!(
&self.kind,
TranslateTextErrorKind::UnsupportedLanguagePairException(_)
)
}
}
impl std::error::Error for TranslateTextError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TranslateTextErrorKind::DetectedLanguageLowConfidenceException(_inner) => Some(_inner),
TranslateTextErrorKind::InternalServerException(_inner) => Some(_inner),
TranslateTextErrorKind::InvalidRequestException(_inner) => Some(_inner),
TranslateTextErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TranslateTextErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
TranslateTextErrorKind::TextSizeLimitExceededException(_inner) => Some(_inner),
TranslateTextErrorKind::TooManyRequestsException(_inner) => Some(_inner),
TranslateTextErrorKind::UnsupportedLanguagePairException(_inner) => Some(_inner),
TranslateTextErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateParallelDataError {
pub kind: UpdateParallelDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateParallelDataErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateParallelDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateParallelDataErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateParallelDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateParallelDataError {
fn code(&self) -> Option<&str> {
UpdateParallelDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateParallelDataError {
pub fn new(kind: UpdateParallelDataErrorKind, 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: UpdateParallelDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateParallelDataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateParallelDataErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateParallelDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateParallelDataErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::ConflictException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateParallelDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TooManyRequestsException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TooManyRequestsException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl TooManyRequestsException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyRequestsException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for TooManyRequestsException {}
pub mod too_many_requests_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::TooManyRequestsException {
crate::error::TooManyRequestsException {
message: self.message,
}
}
}
}
impl TooManyRequestsException {
pub fn builder() -> crate::error::too_many_requests_exception::Builder {
crate::error::too_many_requests_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LimitExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LimitExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl LimitExceededException {
pub fn message(&self) -> 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_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
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)]
pub struct InvalidRequestException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidRequestException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidRequestException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidParameterValueException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidParameterValueException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidParameterValueException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValueException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValueException {}
pub mod invalid_parameter_value_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterValueException {
crate::error::InvalidParameterValueException {
message: self.message,
}
}
}
}
impl InvalidParameterValueException {
pub fn builder() -> crate::error::invalid_parameter_value_exception::Builder {
crate::error::invalid_parameter_value_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServerException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServerException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InternalServerException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConflictException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConflictException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ConflictException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_7) = &self.message {
write!(f, ": {}", inner_7)?;
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConcurrentModificationException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConcurrentModificationException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ConcurrentModificationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentModificationException")?;
if let Some(inner_8) = &self.message {
write!(f, ": {}", inner_8)?;
}
Ok(())
}
}
impl std::error::Error for ConcurrentModificationException {}
pub mod concurrent_modification_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConcurrentModificationException {
crate::error::ConcurrentModificationException {
message: self.message,
}
}
}
}
impl ConcurrentModificationException {
pub fn builder() -> crate::error::concurrent_modification_exception::Builder {
crate::error::concurrent_modification_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UnsupportedLanguagePairException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub source_language_code: std::option::Option<std::string::String>,
pub target_language_code: std::option::Option<std::string::String>,
}
impl UnsupportedLanguagePairException {
pub fn source_language_code(&self) -> std::option::Option<&str> {
self.source_language_code.as_deref()
}
pub fn target_language_code(&self) -> std::option::Option<&str> {
self.target_language_code.as_deref()
}
}
impl std::fmt::Debug for UnsupportedLanguagePairException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UnsupportedLanguagePairException");
formatter.field("message", &self.message);
formatter.field("source_language_code", &self.source_language_code);
formatter.field("target_language_code", &self.target_language_code);
formatter.finish()
}
}
impl UnsupportedLanguagePairException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedLanguagePairException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedLanguagePairException")?;
if let Some(inner_9) = &self.message {
write!(f, ": {}", inner_9)?;
}
Ok(())
}
}
impl std::error::Error for UnsupportedLanguagePairException {}
pub mod unsupported_language_pair_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) source_language_code: std::option::Option<std::string::String>,
pub(crate) target_language_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
}
pub fn source_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.source_language_code = Some(input.into());
self
}
pub fn set_source_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_language_code = input;
self
}
pub fn target_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.target_language_code = Some(input.into());
self
}
pub fn set_target_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.target_language_code = input;
self
}
pub fn build(self) -> crate::error::UnsupportedLanguagePairException {
crate::error::UnsupportedLanguagePairException {
message: self.message,
source_language_code: self.source_language_code,
target_language_code: self.target_language_code,
}
}
}
}
impl UnsupportedLanguagePairException {
pub fn builder() -> crate::error::unsupported_language_pair_exception::Builder {
crate::error::unsupported_language_pair_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TextSizeLimitExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for TextSizeLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TextSizeLimitExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl TextSizeLimitExceededException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TextSizeLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TextSizeLimitExceededException")?;
if let Some(inner_10) = &self.message {
write!(f, ": {}", inner_10)?;
}
Ok(())
}
}
impl std::error::Error for TextSizeLimitExceededException {}
pub mod text_size_limit_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::TextSizeLimitExceededException {
crate::error::TextSizeLimitExceededException {
message: self.message,
}
}
}
}
impl TextSizeLimitExceededException {
pub fn builder() -> crate::error::text_size_limit_exceeded_exception::Builder {
crate::error::text_size_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceUnavailableException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ServiceUnavailableException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_11) = &self.message {
write!(f, ": {}", inner_11)?;
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectedLanguageLowConfidenceException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub detected_language_code: std::option::Option<std::string::String>,
}
impl DetectedLanguageLowConfidenceException {
pub fn detected_language_code(&self) -> std::option::Option<&str> {
self.detected_language_code.as_deref()
}
}
impl std::fmt::Debug for DetectedLanguageLowConfidenceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectedLanguageLowConfidenceException");
formatter.field("message", &self.message);
formatter.field("detected_language_code", &self.detected_language_code);
formatter.finish()
}
}
impl DetectedLanguageLowConfidenceException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DetectedLanguageLowConfidenceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DetectedLanguageLowConfidenceException")?;
if let Some(inner_12) = &self.message {
write!(f, ": {}", inner_12)?;
}
Ok(())
}
}
impl std::error::Error for DetectedLanguageLowConfidenceException {}
pub mod detected_language_low_confidence_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) detected_language_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
}
pub fn detected_language_code(mut self, input: impl Into<std::string::String>) -> Self {
self.detected_language_code = Some(input.into());
self
}
pub fn set_detected_language_code(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.detected_language_code = input;
self
}
pub fn build(self) -> crate::error::DetectedLanguageLowConfidenceException {
crate::error::DetectedLanguageLowConfidenceException {
message: self.message,
detected_language_code: self.detected_language_code,
}
}
}
}
impl DetectedLanguageLowConfidenceException {
pub fn builder() -> crate::error::detected_language_low_confidence_exception::Builder {
crate::error::detected_language_low_confidence_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidFilterException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidFilterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidFilterException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidFilterException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidFilterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidFilterException")?;
if let Some(inner_13) = &self.message {
write!(f, ": {}", inner_13)?;
}
Ok(())
}
}
impl std::error::Error for InvalidFilterException {}
pub mod invalid_filter_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidFilterException {
crate::error::InvalidFilterException {
message: self.message,
}
}
}
}
impl InvalidFilterException {
pub fn builder() -> crate::error::invalid_filter_exception::Builder {
crate::error::invalid_filter_exception::Builder::default()
}
}