#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartObjectError {
pub kind: StartObjectErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartObjectError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartObjectErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartObjectErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
DataAlreadyExistsException(crate::error::DataAlreadyExistsException),
IllegalArgumentException(crate::error::IllegalArgumentException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartObjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartObjectErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartObjectErrorKind::DataAlreadyExistsException(_inner) => _inner.fmt(f),
StartObjectErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
StartObjectErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartObjectErrorKind::RetryableException(_inner) => _inner.fmt(f),
StartObjectErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
StartObjectErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
StartObjectErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartObjectErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartObjectError {
fn code(&self) -> Option<&str> {
StartObjectError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartObjectError {
pub fn new(kind: StartObjectErrorKind, 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: StartObjectErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartObjectErrorKind::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, StartObjectErrorKind::AccessDeniedException(_))
}
pub fn is_data_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
StartObjectErrorKind::DataAlreadyExistsException(_)
)
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(
&self.kind,
StartObjectErrorKind::IllegalArgumentException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartObjectErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, StartObjectErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(
&self.kind,
StartObjectErrorKind::ServiceInternalException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartObjectErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StartObjectErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for StartObjectError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartObjectErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartObjectErrorKind::DataAlreadyExistsException(_inner) => Some(_inner),
StartObjectErrorKind::IllegalArgumentException(_inner) => Some(_inner),
StartObjectErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartObjectErrorKind::RetryableException(_inner) => Some(_inner),
StartObjectErrorKind::ServiceInternalException(_inner) => Some(_inner),
StartObjectErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
StartObjectErrorKind::ThrottlingException(_inner) => Some(_inner),
StartObjectErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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>,
}
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_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
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>,
}
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::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
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 ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_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>,
}
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, std::fmt::Debug)]
pub struct ServiceInternalException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceInternalException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceInternalException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceInternalException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceInternalException {}
pub mod service_internal_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>,
}
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::ServiceInternalException {
crate::error::ServiceInternalException {
message: self.message,
}
}
}
}
impl ServiceInternalException {
pub fn builder() -> crate::error::service_internal_exception::Builder {
crate::error::service_internal_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RetryableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RetryableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RetryableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RetryableException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for RetryableException {}
pub mod retryable_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>,
}
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::RetryableException {
crate::error::RetryableException {
message: self.message,
}
}
}
}
impl RetryableException {
pub fn builder() -> crate::error::retryable_exception::Builder {
crate::error::retryable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_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>,
}
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, std::fmt::Debug)]
pub struct IllegalArgumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IllegalArgumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IllegalArgumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IllegalArgumentException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for IllegalArgumentException {}
pub mod illegal_argument_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>,
}
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::IllegalArgumentException {
crate::error::IllegalArgumentException {
message: self.message,
}
}
}
}
impl IllegalArgumentException {
pub fn builder() -> crate::error::illegal_argument_exception::Builder {
crate::error::illegal_argument_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub checksum: std::option::Option<std::string::String>,
#[doc(hidden)]
pub checksum_algorithm: std::option::Option<std::string::String>,
}
impl DataAlreadyExistsException {
pub fn checksum(&self) -> std::option::Option<&str> {
self.checksum.as_deref()
}
pub fn checksum_algorithm(&self) -> std::option::Option<&str> {
self.checksum_algorithm.as_deref()
}
}
impl DataAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataAlreadyExistsException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for DataAlreadyExistsException {}
pub mod data_already_exists_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) checksum: std::option::Option<std::string::String>,
pub(crate) checksum_algorithm: 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 checksum(mut self, input: impl Into<std::string::String>) -> Self {
self.checksum = Some(input.into());
self
}
pub fn set_checksum(mut self, input: std::option::Option<std::string::String>) -> Self {
self.checksum = input;
self
}
pub fn checksum_algorithm(mut self, input: impl Into<std::string::String>) -> Self {
self.checksum_algorithm = Some(input.into());
self
}
pub fn set_checksum_algorithm(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.checksum_algorithm = input;
self
}
pub fn build(self) -> crate::error::DataAlreadyExistsException {
crate::error::DataAlreadyExistsException {
message: self.message,
checksum: self.checksum,
checksum_algorithm: self.checksum_algorithm,
}
}
}
}
impl DataAlreadyExistsException {
pub fn builder() -> crate::error::data_already_exists_exception::Builder {
crate::error::data_already_exists_exception::Builder::default()
}
}
#[allow(missing_docs)] #[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>,
}
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_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
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>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutObjectError {
pub kind: PutObjectErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutObjectError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutObjectErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutObjectErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
NotReadableInputStreamException(crate::error::NotReadableInputStreamException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutObjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutObjectErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutObjectErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
PutObjectErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
PutObjectErrorKind::NotReadableInputStreamException(_inner) => _inner.fmt(f),
PutObjectErrorKind::RetryableException(_inner) => _inner.fmt(f),
PutObjectErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
PutObjectErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutObjectErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutObjectErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutObjectError {
fn code(&self) -> Option<&str> {
PutObjectError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutObjectError {
pub fn new(kind: PutObjectErrorKind, 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: PutObjectErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutObjectErrorKind::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, PutObjectErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(&self.kind, PutObjectErrorKind::IllegalArgumentException(_))
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
PutObjectErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_not_readable_input_stream_exception(&self) -> bool {
matches!(
&self.kind,
PutObjectErrorKind::NotReadableInputStreamException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, PutObjectErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(&self.kind, PutObjectErrorKind::ServiceInternalException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutObjectErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutObjectErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for PutObjectError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutObjectErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutObjectErrorKind::IllegalArgumentException(_inner) => Some(_inner),
PutObjectErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
PutObjectErrorKind::NotReadableInputStreamException(_inner) => Some(_inner),
PutObjectErrorKind::RetryableException(_inner) => Some(_inner),
PutObjectErrorKind::ServiceInternalException(_inner) => Some(_inner),
PutObjectErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutObjectErrorKind::ThrottlingException(_inner) => Some(_inner),
PutObjectErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotReadableInputStreamException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NotReadableInputStreamException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotReadableInputStreamException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotReadableInputStreamException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for NotReadableInputStreamException {}
pub mod not_readable_input_stream_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>,
}
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::NotReadableInputStreamException {
crate::error::NotReadableInputStreamException {
message: self.message,
}
}
}
}
impl NotReadableInputStreamException {
pub fn builder() -> crate::error::not_readable_input_stream_exception::Builder {
crate::error::not_readable_input_stream_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct KmsInvalidKeyUsageException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl KmsInvalidKeyUsageException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for KmsInvalidKeyUsageException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"KmsInvalidKeyUsageException [KMSInvalidKeyUsageException]"
)?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for KmsInvalidKeyUsageException {}
pub mod kms_invalid_key_usage_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>,
}
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::KmsInvalidKeyUsageException {
crate::error::KmsInvalidKeyUsageException {
message: self.message,
}
}
}
}
impl KmsInvalidKeyUsageException {
pub fn builder() -> crate::error::kms_invalid_key_usage_exception::Builder {
crate::error::kms_invalid_key_usage_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutChunkError {
pub kind: PutChunkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutChunkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutChunkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutChunkErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
NotReadableInputStreamException(crate::error::NotReadableInputStreamException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutChunkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutChunkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutChunkErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
PutChunkErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
PutChunkErrorKind::NotReadableInputStreamException(_inner) => _inner.fmt(f),
PutChunkErrorKind::RetryableException(_inner) => _inner.fmt(f),
PutChunkErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
PutChunkErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutChunkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutChunkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutChunkError {
fn code(&self) -> Option<&str> {
PutChunkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutChunkError {
pub fn new(kind: PutChunkErrorKind, 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: PutChunkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutChunkErrorKind::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, PutChunkErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(&self.kind, PutChunkErrorKind::IllegalArgumentException(_))
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
PutChunkErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_not_readable_input_stream_exception(&self) -> bool {
matches!(
&self.kind,
PutChunkErrorKind::NotReadableInputStreamException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, PutChunkErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(&self.kind, PutChunkErrorKind::ServiceInternalException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutChunkErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutChunkErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for PutChunkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutChunkErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutChunkErrorKind::IllegalArgumentException(_inner) => Some(_inner),
PutChunkErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
PutChunkErrorKind::NotReadableInputStreamException(_inner) => Some(_inner),
PutChunkErrorKind::RetryableException(_inner) => Some(_inner),
PutChunkErrorKind::ServiceInternalException(_inner) => Some(_inner),
PutChunkErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutChunkErrorKind::ThrottlingException(_inner) => Some(_inner),
PutChunkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct NotifyObjectCompleteError {
pub kind: NotifyObjectCompleteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for NotifyObjectCompleteError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: NotifyObjectCompleteErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum NotifyObjectCompleteErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
NotReadableInputStreamException(crate::error::NotReadableInputStreamException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for NotifyObjectCompleteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
NotifyObjectCompleteErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::NotReadableInputStreamException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::RetryableException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
NotifyObjectCompleteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for NotifyObjectCompleteError {
fn code(&self) -> Option<&str> {
NotifyObjectCompleteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl NotifyObjectCompleteError {
pub fn new(kind: NotifyObjectCompleteErrorKind, 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: NotifyObjectCompleteErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: NotifyObjectCompleteErrorKind::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,
NotifyObjectCompleteErrorKind::AccessDeniedException(_)
)
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::IllegalArgumentException(_)
)
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_not_readable_input_stream_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::NotReadableInputStreamException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::RetryableException(_)
)
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::ServiceInternalException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
NotifyObjectCompleteErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for NotifyObjectCompleteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
NotifyObjectCompleteErrorKind::AccessDeniedException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::IllegalArgumentException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::NotReadableInputStreamException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::RetryableException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::ServiceInternalException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::ThrottlingException(_inner) => Some(_inner),
NotifyObjectCompleteErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListObjectsError {
pub kind: ListObjectsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListObjectsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListObjectsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListObjectsErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListObjectsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListObjectsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::RetryableException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListObjectsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListObjectsError {
fn code(&self) -> Option<&str> {
ListObjectsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListObjectsError {
pub fn new(kind: ListObjectsErrorKind, 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: ListObjectsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListObjectsErrorKind::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, ListObjectsErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListObjectsErrorKind::IllegalArgumentException(_)
)
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
ListObjectsErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListObjectsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, ListObjectsErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(
&self.kind,
ListObjectsErrorKind::ServiceInternalException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListObjectsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListObjectsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListObjectsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListObjectsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListObjectsErrorKind::IllegalArgumentException(_inner) => Some(_inner),
ListObjectsErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
ListObjectsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListObjectsErrorKind::RetryableException(_inner) => Some(_inner),
ListObjectsErrorKind::ServiceInternalException(_inner) => Some(_inner),
ListObjectsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListObjectsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListObjectsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChunksError {
pub kind: ListChunksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChunksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChunksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChunksErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChunksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChunksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListChunksErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
ListChunksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListChunksErrorKind::RetryableException(_inner) => _inner.fmt(f),
ListChunksErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
ListChunksErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChunksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChunksError {
fn code(&self) -> Option<&str> {
ListChunksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChunksError {
pub fn new(kind: ListChunksErrorKind, 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: ListChunksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChunksErrorKind::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, ListChunksErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(&self.kind, ListChunksErrorKind::IllegalArgumentException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListChunksErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, ListChunksErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(&self.kind, ListChunksErrorKind::ServiceInternalException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChunksErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for ListChunksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChunksErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListChunksErrorKind::IllegalArgumentException(_inner) => Some(_inner),
ListChunksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListChunksErrorKind::RetryableException(_inner) => Some(_inner),
ListChunksErrorKind::ServiceInternalException(_inner) => Some(_inner),
ListChunksErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChunksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetObjectMetadataError {
pub kind: GetObjectMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetObjectMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetObjectMetadataErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetObjectMetadataErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetObjectMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetObjectMetadataErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::RetryableException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetObjectMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetObjectMetadataError {
fn code(&self) -> Option<&str> {
GetObjectMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetObjectMetadataError {
pub fn new(kind: GetObjectMetadataErrorKind, 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: GetObjectMetadataErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetObjectMetadataErrorKind::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,
GetObjectMetadataErrorKind::AccessDeniedException(_)
)
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::IllegalArgumentException(_)
)
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::RetryableException(_)
)
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::ServiceInternalException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetObjectMetadataErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetObjectMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetObjectMetadataErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::IllegalArgumentException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::RetryableException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::ServiceInternalException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
GetObjectMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetChunkError {
pub kind: GetChunkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetChunkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetChunkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetChunkErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
KmsInvalidKeyUsageException(crate::error::KmsInvalidKeyUsageException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetChunkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetChunkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetChunkErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
GetChunkErrorKind::KmsInvalidKeyUsageException(_inner) => _inner.fmt(f),
GetChunkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetChunkErrorKind::RetryableException(_inner) => _inner.fmt(f),
GetChunkErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
GetChunkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetChunkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetChunkError {
fn code(&self) -> Option<&str> {
GetChunkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetChunkError {
pub fn new(kind: GetChunkErrorKind, 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: GetChunkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetChunkErrorKind::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, GetChunkErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(&self.kind, GetChunkErrorKind::IllegalArgumentException(_))
}
pub fn is_kms_invalid_key_usage_exception(&self) -> bool {
matches!(
&self.kind,
GetChunkErrorKind::KmsInvalidKeyUsageException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetChunkErrorKind::ResourceNotFoundException(_))
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, GetChunkErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(&self.kind, GetChunkErrorKind::ServiceInternalException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetChunkErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for GetChunkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetChunkErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetChunkErrorKind::IllegalArgumentException(_inner) => Some(_inner),
GetChunkErrorKind::KmsInvalidKeyUsageException(_inner) => Some(_inner),
GetChunkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetChunkErrorKind::RetryableException(_inner) => Some(_inner),
GetChunkErrorKind::ServiceInternalException(_inner) => Some(_inner),
GetChunkErrorKind::ThrottlingException(_inner) => Some(_inner),
GetChunkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteObjectError {
pub kind: DeleteObjectErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteObjectError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteObjectErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteObjectErrorKind {
#[allow(missing_docs)] AccessDeniedException(crate::error::AccessDeniedException),
IllegalArgumentException(crate::error::IllegalArgumentException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
RetryableException(crate::error::RetryableException),
ServiceInternalException(crate::error::ServiceInternalException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteObjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteObjectErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::IllegalArgumentException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::RetryableException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::ServiceInternalException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteObjectErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteObjectError {
fn code(&self) -> Option<&str> {
DeleteObjectError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteObjectError {
pub fn new(kind: DeleteObjectErrorKind, 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: DeleteObjectErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteObjectErrorKind::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, DeleteObjectErrorKind::AccessDeniedException(_))
}
pub fn is_illegal_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteObjectErrorKind::IllegalArgumentException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteObjectErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_retryable_exception(&self) -> bool {
matches!(&self.kind, DeleteObjectErrorKind::RetryableException(_))
}
pub fn is_service_internal_exception(&self) -> bool {
matches!(
&self.kind,
DeleteObjectErrorKind::ServiceInternalException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteObjectErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteObjectErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DeleteObjectError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteObjectErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteObjectErrorKind::IllegalArgumentException(_inner) => Some(_inner),
DeleteObjectErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteObjectErrorKind::RetryableException(_inner) => Some(_inner),
DeleteObjectErrorKind::ServiceInternalException(_inner) => Some(_inner),
DeleteObjectErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteObjectErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteObjectErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 _)
}
}