#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagQueueError {
pub kind: UntagQueueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagQueueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagQueueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagQueueErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagQueueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagQueueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagQueueError {
fn code(&self) -> Option<&str> {
UntagQueueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagQueueError {
pub fn new(kind: UntagQueueErrorKind, 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: UntagQueueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagQueueErrorKind::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()
}
}
impl std::error::Error for UntagQueueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagQueueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagQueueError {
pub kind: TagQueueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagQueueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagQueueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagQueueErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagQueueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagQueueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagQueueError {
fn code(&self) -> Option<&str> {
TagQueueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagQueueError {
pub fn new(kind: TagQueueErrorKind, 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: TagQueueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagQueueErrorKind::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()
}
}
impl std::error::Error for TagQueueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagQueueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetQueueAttributesError {
pub kind: SetQueueAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetQueueAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetQueueAttributesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetQueueAttributesErrorKind {
InvalidAttributeName(crate::error::InvalidAttributeName),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetQueueAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetQueueAttributesErrorKind::InvalidAttributeName(_inner) => _inner.fmt(f),
SetQueueAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetQueueAttributesError {
fn code(&self) -> Option<&str> {
SetQueueAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetQueueAttributesError {
pub fn new(kind: SetQueueAttributesErrorKind, 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: SetQueueAttributesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetQueueAttributesErrorKind::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_invalid_attribute_name(&self) -> bool {
matches!(
&self.kind,
SetQueueAttributesErrorKind::InvalidAttributeName(_)
)
}
}
impl std::error::Error for SetQueueAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetQueueAttributesErrorKind::InvalidAttributeName(_inner) => Some(_inner),
SetQueueAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidAttributeName {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidAttributeName {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidAttributeName {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidAttributeName")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidAttributeName {}
pub mod invalid_attribute_name {
#[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::InvalidAttributeName {
crate::error::InvalidAttributeName {
message: self.message,
}
}
}
}
impl InvalidAttributeName {
pub fn builder() -> crate::error::invalid_attribute_name::Builder {
crate::error::invalid_attribute_name::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendMessageBatchError {
pub kind: SendMessageBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendMessageBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendMessageBatchErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendMessageBatchErrorKind {
BatchEntryIdsNotDistinct(crate::error::BatchEntryIdsNotDistinct),
BatchRequestTooLong(crate::error::BatchRequestTooLong),
EmptyBatchRequest(crate::error::EmptyBatchRequest),
InvalidBatchEntryId(crate::error::InvalidBatchEntryId),
TooManyEntriesInBatchRequest(crate::error::TooManyEntriesInBatchRequest),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SendMessageBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendMessageBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::BatchRequestTooLong(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::EmptyBatchRequest(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::InvalidBatchEntryId(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
SendMessageBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendMessageBatchError {
fn code(&self) -> Option<&str> {
SendMessageBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SendMessageBatchError {
pub fn new(kind: SendMessageBatchErrorKind, 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: SendMessageBatchErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendMessageBatchErrorKind::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_batch_entry_ids_not_distinct(&self) -> bool {
matches!(
&self.kind,
SendMessageBatchErrorKind::BatchEntryIdsNotDistinct(_)
)
}
pub fn is_batch_request_too_long(&self) -> bool {
matches!(
&self.kind,
SendMessageBatchErrorKind::BatchRequestTooLong(_)
)
}
pub fn is_empty_batch_request(&self) -> bool {
matches!(&self.kind, SendMessageBatchErrorKind::EmptyBatchRequest(_))
}
pub fn is_invalid_batch_entry_id(&self) -> bool {
matches!(
&self.kind,
SendMessageBatchErrorKind::InvalidBatchEntryId(_)
)
}
pub fn is_too_many_entries_in_batch_request(&self) -> bool {
matches!(
&self.kind,
SendMessageBatchErrorKind::TooManyEntriesInBatchRequest(_)
)
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(
&self.kind,
SendMessageBatchErrorKind::UnsupportedOperation(_)
)
}
}
impl std::error::Error for SendMessageBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendMessageBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => Some(_inner),
SendMessageBatchErrorKind::BatchRequestTooLong(_inner) => Some(_inner),
SendMessageBatchErrorKind::EmptyBatchRequest(_inner) => Some(_inner),
SendMessageBatchErrorKind::InvalidBatchEntryId(_inner) => Some(_inner),
SendMessageBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => Some(_inner),
SendMessageBatchErrorKind::UnsupportedOperation(_inner) => Some(_inner),
SendMessageBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedOperation {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedOperation {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedOperation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedOperation")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedOperation {}
pub mod unsupported_operation {
#[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::UnsupportedOperation {
crate::error::UnsupportedOperation {
message: self.message,
}
}
}
}
impl UnsupportedOperation {
pub fn builder() -> crate::error::unsupported_operation::Builder {
crate::error::unsupported_operation::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyEntriesInBatchRequest {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyEntriesInBatchRequest {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyEntriesInBatchRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyEntriesInBatchRequest")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyEntriesInBatchRequest {}
pub mod too_many_entries_in_batch_request {
#[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::TooManyEntriesInBatchRequest {
crate::error::TooManyEntriesInBatchRequest {
message: self.message,
}
}
}
}
impl TooManyEntriesInBatchRequest {
pub fn builder() -> crate::error::too_many_entries_in_batch_request::Builder {
crate::error::too_many_entries_in_batch_request::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidBatchEntryId {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidBatchEntryId {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidBatchEntryId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidBatchEntryId")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidBatchEntryId {}
pub mod invalid_batch_entry_id {
#[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::InvalidBatchEntryId {
crate::error::InvalidBatchEntryId {
message: self.message,
}
}
}
}
impl InvalidBatchEntryId {
pub fn builder() -> crate::error::invalid_batch_entry_id::Builder {
crate::error::invalid_batch_entry_id::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmptyBatchRequest {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EmptyBatchRequest {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EmptyBatchRequest {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EmptyBatchRequest")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for EmptyBatchRequest {}
pub mod empty_batch_request {
#[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::EmptyBatchRequest {
crate::error::EmptyBatchRequest {
message: self.message,
}
}
}
}
impl EmptyBatchRequest {
pub fn builder() -> crate::error::empty_batch_request::Builder {
crate::error::empty_batch_request::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchRequestTooLong {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BatchRequestTooLong {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BatchRequestTooLong {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BatchRequestTooLong")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for BatchRequestTooLong {}
pub mod batch_request_too_long {
#[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::BatchRequestTooLong {
crate::error::BatchRequestTooLong {
message: self.message,
}
}
}
}
impl BatchRequestTooLong {
pub fn builder() -> crate::error::batch_request_too_long::Builder {
crate::error::batch_request_too_long::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchEntryIdsNotDistinct {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BatchEntryIdsNotDistinct {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BatchEntryIdsNotDistinct {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BatchEntryIdsNotDistinct")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for BatchEntryIdsNotDistinct {}
pub mod batch_entry_ids_not_distinct {
#[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::BatchEntryIdsNotDistinct {
crate::error::BatchEntryIdsNotDistinct {
message: self.message,
}
}
}
}
impl BatchEntryIdsNotDistinct {
pub fn builder() -> crate::error::batch_entry_ids_not_distinct::Builder {
crate::error::batch_entry_ids_not_distinct::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendMessageError {
pub kind: SendMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendMessageErrorKind {
InvalidMessageContents(crate::error::InvalidMessageContents),
UnsupportedOperation(crate::error::UnsupportedOperation),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SendMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendMessageErrorKind::InvalidMessageContents(_inner) => _inner.fmt(f),
SendMessageErrorKind::UnsupportedOperation(_inner) => _inner.fmt(f),
SendMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendMessageError {
fn code(&self) -> Option<&str> {
SendMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SendMessageError {
pub fn new(kind: SendMessageErrorKind, 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: SendMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendMessageErrorKind::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_invalid_message_contents(&self) -> bool {
matches!(&self.kind, SendMessageErrorKind::InvalidMessageContents(_))
}
pub fn is_unsupported_operation(&self) -> bool {
matches!(&self.kind, SendMessageErrorKind::UnsupportedOperation(_))
}
}
impl std::error::Error for SendMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendMessageErrorKind::InvalidMessageContents(_inner) => Some(_inner),
SendMessageErrorKind::UnsupportedOperation(_inner) => Some(_inner),
SendMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidMessageContents {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidMessageContents {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidMessageContents {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidMessageContents")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidMessageContents {}
pub mod invalid_message_contents {
#[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::InvalidMessageContents {
crate::error::InvalidMessageContents {
message: self.message,
}
}
}
}
impl InvalidMessageContents {
pub fn builder() -> crate::error::invalid_message_contents::Builder {
crate::error::invalid_message_contents::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemovePermissionError {
pub kind: RemovePermissionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemovePermissionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemovePermissionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemovePermissionErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemovePermissionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemovePermissionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemovePermissionError {
fn code(&self) -> Option<&str> {
RemovePermissionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemovePermissionError {
pub fn new(kind: RemovePermissionErrorKind, 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: RemovePermissionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemovePermissionErrorKind::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()
}
}
impl std::error::Error for RemovePermissionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemovePermissionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ReceiveMessageError {
pub kind: ReceiveMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ReceiveMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ReceiveMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ReceiveMessageErrorKind {
OverLimit(crate::error::OverLimit),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ReceiveMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ReceiveMessageErrorKind::OverLimit(_inner) => _inner.fmt(f),
ReceiveMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ReceiveMessageError {
fn code(&self) -> Option<&str> {
ReceiveMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ReceiveMessageError {
pub fn new(kind: ReceiveMessageErrorKind, 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: ReceiveMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ReceiveMessageErrorKind::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_over_limit(&self) -> bool {
matches!(&self.kind, ReceiveMessageErrorKind::OverLimit(_))
}
}
impl std::error::Error for ReceiveMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ReceiveMessageErrorKind::OverLimit(_inner) => Some(_inner),
ReceiveMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OverLimit {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OverLimit {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OverLimit {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OverLimit")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for OverLimit {}
pub mod over_limit {
#[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::OverLimit {
crate::error::OverLimit {
message: self.message,
}
}
}
}
impl OverLimit {
pub fn builder() -> crate::error::over_limit::Builder {
crate::error::over_limit::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PurgeQueueError {
pub kind: PurgeQueueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PurgeQueueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PurgeQueueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PurgeQueueErrorKind {
PurgeQueueInProgress(crate::error::PurgeQueueInProgress),
QueueDoesNotExist(crate::error::QueueDoesNotExist),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PurgeQueueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PurgeQueueErrorKind::PurgeQueueInProgress(_inner) => _inner.fmt(f),
PurgeQueueErrorKind::QueueDoesNotExist(_inner) => _inner.fmt(f),
PurgeQueueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PurgeQueueError {
fn code(&self) -> Option<&str> {
PurgeQueueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PurgeQueueError {
pub fn new(kind: PurgeQueueErrorKind, 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: PurgeQueueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PurgeQueueErrorKind::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_purge_queue_in_progress(&self) -> bool {
matches!(&self.kind, PurgeQueueErrorKind::PurgeQueueInProgress(_))
}
pub fn is_queue_does_not_exist(&self) -> bool {
matches!(&self.kind, PurgeQueueErrorKind::QueueDoesNotExist(_))
}
}
impl std::error::Error for PurgeQueueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PurgeQueueErrorKind::PurgeQueueInProgress(_inner) => Some(_inner),
PurgeQueueErrorKind::QueueDoesNotExist(_inner) => Some(_inner),
PurgeQueueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QueueDoesNotExist {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl QueueDoesNotExist {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for QueueDoesNotExist {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "QueueDoesNotExist")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for QueueDoesNotExist {}
pub mod queue_does_not_exist {
#[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::QueueDoesNotExist {
crate::error::QueueDoesNotExist {
message: self.message,
}
}
}
}
impl QueueDoesNotExist {
pub fn builder() -> crate::error::queue_does_not_exist::Builder {
crate::error::queue_does_not_exist::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PurgeQueueInProgress {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PurgeQueueInProgress {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PurgeQueueInProgress {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PurgeQueueInProgress")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for PurgeQueueInProgress {}
pub mod purge_queue_in_progress {
#[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::PurgeQueueInProgress {
crate::error::PurgeQueueInProgress {
message: self.message,
}
}
}
}
impl PurgeQueueInProgress {
pub fn builder() -> crate::error::purge_queue_in_progress::Builder {
crate::error::purge_queue_in_progress::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListQueueTagsError {
pub kind: ListQueueTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListQueueTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListQueueTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListQueueTagsErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListQueueTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListQueueTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListQueueTagsError {
fn code(&self) -> Option<&str> {
ListQueueTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListQueueTagsError {
pub fn new(kind: ListQueueTagsErrorKind, 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: ListQueueTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListQueueTagsErrorKind::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()
}
}
impl std::error::Error for ListQueueTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListQueueTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListQueuesError {
pub kind: ListQueuesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListQueuesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListQueuesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListQueuesErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListQueuesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListQueuesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListQueuesError {
fn code(&self) -> Option<&str> {
ListQueuesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListQueuesError {
pub fn new(kind: ListQueuesErrorKind, 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: ListQueuesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListQueuesErrorKind::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()
}
}
impl std::error::Error for ListQueuesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListQueuesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDeadLetterSourceQueuesError {
pub kind: ListDeadLetterSourceQueuesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDeadLetterSourceQueuesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDeadLetterSourceQueuesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDeadLetterSourceQueuesErrorKind {
QueueDoesNotExist(crate::error::QueueDoesNotExist),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDeadLetterSourceQueuesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDeadLetterSourceQueuesErrorKind::QueueDoesNotExist(_inner) => _inner.fmt(f),
ListDeadLetterSourceQueuesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDeadLetterSourceQueuesError {
fn code(&self) -> Option<&str> {
ListDeadLetterSourceQueuesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDeadLetterSourceQueuesError {
pub fn new(kind: ListDeadLetterSourceQueuesErrorKind, 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: ListDeadLetterSourceQueuesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDeadLetterSourceQueuesErrorKind::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_queue_does_not_exist(&self) -> bool {
matches!(
&self.kind,
ListDeadLetterSourceQueuesErrorKind::QueueDoesNotExist(_)
)
}
}
impl std::error::Error for ListDeadLetterSourceQueuesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDeadLetterSourceQueuesErrorKind::QueueDoesNotExist(_inner) => Some(_inner),
ListDeadLetterSourceQueuesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetQueueUrlError {
pub kind: GetQueueUrlErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetQueueUrlError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetQueueUrlErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetQueueUrlErrorKind {
QueueDoesNotExist(crate::error::QueueDoesNotExist),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetQueueUrlError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetQueueUrlErrorKind::QueueDoesNotExist(_inner) => _inner.fmt(f),
GetQueueUrlErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetQueueUrlError {
fn code(&self) -> Option<&str> {
GetQueueUrlError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetQueueUrlError {
pub fn new(kind: GetQueueUrlErrorKind, 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: GetQueueUrlErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetQueueUrlErrorKind::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_queue_does_not_exist(&self) -> bool {
matches!(&self.kind, GetQueueUrlErrorKind::QueueDoesNotExist(_))
}
}
impl std::error::Error for GetQueueUrlError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetQueueUrlErrorKind::QueueDoesNotExist(_inner) => Some(_inner),
GetQueueUrlErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetQueueAttributesError {
pub kind: GetQueueAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetQueueAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetQueueAttributesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetQueueAttributesErrorKind {
InvalidAttributeName(crate::error::InvalidAttributeName),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetQueueAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetQueueAttributesErrorKind::InvalidAttributeName(_inner) => _inner.fmt(f),
GetQueueAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetQueueAttributesError {
fn code(&self) -> Option<&str> {
GetQueueAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetQueueAttributesError {
pub fn new(kind: GetQueueAttributesErrorKind, 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: GetQueueAttributesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetQueueAttributesErrorKind::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_invalid_attribute_name(&self) -> bool {
matches!(
&self.kind,
GetQueueAttributesErrorKind::InvalidAttributeName(_)
)
}
}
impl std::error::Error for GetQueueAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetQueueAttributesErrorKind::InvalidAttributeName(_inner) => Some(_inner),
GetQueueAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteQueueError {
pub kind: DeleteQueueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteQueueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteQueueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteQueueErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteQueueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteQueueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteQueueError {
fn code(&self) -> Option<&str> {
DeleteQueueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteQueueError {
pub fn new(kind: DeleteQueueErrorKind, 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: DeleteQueueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteQueueErrorKind::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()
}
}
impl std::error::Error for DeleteQueueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteQueueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMessageBatchError {
pub kind: DeleteMessageBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteMessageBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteMessageBatchErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMessageBatchErrorKind {
BatchEntryIdsNotDistinct(crate::error::BatchEntryIdsNotDistinct),
EmptyBatchRequest(crate::error::EmptyBatchRequest),
InvalidBatchEntryId(crate::error::InvalidBatchEntryId),
TooManyEntriesInBatchRequest(crate::error::TooManyEntriesInBatchRequest),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteMessageBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMessageBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => _inner.fmt(f),
DeleteMessageBatchErrorKind::EmptyBatchRequest(_inner) => _inner.fmt(f),
DeleteMessageBatchErrorKind::InvalidBatchEntryId(_inner) => _inner.fmt(f),
DeleteMessageBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => _inner.fmt(f),
DeleteMessageBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMessageBatchError {
fn code(&self) -> Option<&str> {
DeleteMessageBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteMessageBatchError {
pub fn new(kind: DeleteMessageBatchErrorKind, 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: DeleteMessageBatchErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMessageBatchErrorKind::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_batch_entry_ids_not_distinct(&self) -> bool {
matches!(
&self.kind,
DeleteMessageBatchErrorKind::BatchEntryIdsNotDistinct(_)
)
}
pub fn is_empty_batch_request(&self) -> bool {
matches!(
&self.kind,
DeleteMessageBatchErrorKind::EmptyBatchRequest(_)
)
}
pub fn is_invalid_batch_entry_id(&self) -> bool {
matches!(
&self.kind,
DeleteMessageBatchErrorKind::InvalidBatchEntryId(_)
)
}
pub fn is_too_many_entries_in_batch_request(&self) -> bool {
matches!(
&self.kind,
DeleteMessageBatchErrorKind::TooManyEntriesInBatchRequest(_)
)
}
}
impl std::error::Error for DeleteMessageBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMessageBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => Some(_inner),
DeleteMessageBatchErrorKind::EmptyBatchRequest(_inner) => Some(_inner),
DeleteMessageBatchErrorKind::InvalidBatchEntryId(_inner) => Some(_inner),
DeleteMessageBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => Some(_inner),
DeleteMessageBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMessageError {
pub kind: DeleteMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMessageErrorKind {
InvalidIdFormat(crate::error::InvalidIdFormat),
ReceiptHandleIsInvalid(crate::error::ReceiptHandleIsInvalid),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMessageErrorKind::InvalidIdFormat(_inner) => _inner.fmt(f),
DeleteMessageErrorKind::ReceiptHandleIsInvalid(_inner) => _inner.fmt(f),
DeleteMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMessageError {
fn code(&self) -> Option<&str> {
DeleteMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteMessageError {
pub fn new(kind: DeleteMessageErrorKind, 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: DeleteMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMessageErrorKind::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_invalid_id_format(&self) -> bool {
matches!(&self.kind, DeleteMessageErrorKind::InvalidIdFormat(_))
}
pub fn is_receipt_handle_is_invalid(&self) -> bool {
matches!(
&self.kind,
DeleteMessageErrorKind::ReceiptHandleIsInvalid(_)
)
}
}
impl std::error::Error for DeleteMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMessageErrorKind::InvalidIdFormat(_inner) => Some(_inner),
DeleteMessageErrorKind::ReceiptHandleIsInvalid(_inner) => Some(_inner),
DeleteMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReceiptHandleIsInvalid {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReceiptHandleIsInvalid {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReceiptHandleIsInvalid {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReceiptHandleIsInvalid")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for ReceiptHandleIsInvalid {}
pub mod receipt_handle_is_invalid {
#[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::ReceiptHandleIsInvalid {
crate::error::ReceiptHandleIsInvalid {
message: self.message,
}
}
}
}
impl ReceiptHandleIsInvalid {
pub fn builder() -> crate::error::receipt_handle_is_invalid::Builder {
crate::error::receipt_handle_is_invalid::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidIdFormat {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidIdFormat {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidIdFormat {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidIdFormat")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidIdFormat {}
pub mod invalid_id_format {
#[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::InvalidIdFormat {
crate::error::InvalidIdFormat {
message: self.message,
}
}
}
}
impl InvalidIdFormat {
pub fn builder() -> crate::error::invalid_id_format::Builder {
crate::error::invalid_id_format::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateQueueError {
pub kind: CreateQueueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateQueueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateQueueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateQueueErrorKind {
QueueDeletedRecently(crate::error::QueueDeletedRecently),
QueueNameExists(crate::error::QueueNameExists),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateQueueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateQueueErrorKind::QueueDeletedRecently(_inner) => _inner.fmt(f),
CreateQueueErrorKind::QueueNameExists(_inner) => _inner.fmt(f),
CreateQueueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateQueueError {
fn code(&self) -> Option<&str> {
CreateQueueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateQueueError {
pub fn new(kind: CreateQueueErrorKind, 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: CreateQueueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateQueueErrorKind::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_queue_deleted_recently(&self) -> bool {
matches!(&self.kind, CreateQueueErrorKind::QueueDeletedRecently(_))
}
pub fn is_queue_name_exists(&self) -> bool {
matches!(&self.kind, CreateQueueErrorKind::QueueNameExists(_))
}
}
impl std::error::Error for CreateQueueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateQueueErrorKind::QueueDeletedRecently(_inner) => Some(_inner),
CreateQueueErrorKind::QueueNameExists(_inner) => Some(_inner),
CreateQueueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QueueNameExists {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl QueueNameExists {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for QueueNameExists {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "QueueNameExists")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for QueueNameExists {}
pub mod queue_name_exists {
#[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::QueueNameExists {
crate::error::QueueNameExists {
message: self.message,
}
}
}
}
impl QueueNameExists {
pub fn builder() -> crate::error::queue_name_exists::Builder {
crate::error::queue_name_exists::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QueueDeletedRecently {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl QueueDeletedRecently {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for QueueDeletedRecently {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "QueueDeletedRecently")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for QueueDeletedRecently {}
pub mod queue_deleted_recently {
#[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::QueueDeletedRecently {
crate::error::QueueDeletedRecently {
message: self.message,
}
}
}
}
impl QueueDeletedRecently {
pub fn builder() -> crate::error::queue_deleted_recently::Builder {
crate::error::queue_deleted_recently::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ChangeMessageVisibilityBatchError {
pub kind: ChangeMessageVisibilityBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ChangeMessageVisibilityBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ChangeMessageVisibilityBatchErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ChangeMessageVisibilityBatchErrorKind {
BatchEntryIdsNotDistinct(crate::error::BatchEntryIdsNotDistinct),
EmptyBatchRequest(crate::error::EmptyBatchRequest),
InvalidBatchEntryId(crate::error::InvalidBatchEntryId),
TooManyEntriesInBatchRequest(crate::error::TooManyEntriesInBatchRequest),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ChangeMessageVisibilityBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ChangeMessageVisibilityBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => {
_inner.fmt(f)
}
ChangeMessageVisibilityBatchErrorKind::EmptyBatchRequest(_inner) => _inner.fmt(f),
ChangeMessageVisibilityBatchErrorKind::InvalidBatchEntryId(_inner) => _inner.fmt(f),
ChangeMessageVisibilityBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => {
_inner.fmt(f)
}
ChangeMessageVisibilityBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ChangeMessageVisibilityBatchError {
fn code(&self) -> Option<&str> {
ChangeMessageVisibilityBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ChangeMessageVisibilityBatchError {
pub fn new(kind: ChangeMessageVisibilityBatchErrorKind, 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: ChangeMessageVisibilityBatchErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ChangeMessageVisibilityBatchErrorKind::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_batch_entry_ids_not_distinct(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityBatchErrorKind::BatchEntryIdsNotDistinct(_)
)
}
pub fn is_empty_batch_request(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityBatchErrorKind::EmptyBatchRequest(_)
)
}
pub fn is_invalid_batch_entry_id(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityBatchErrorKind::InvalidBatchEntryId(_)
)
}
pub fn is_too_many_entries_in_batch_request(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityBatchErrorKind::TooManyEntriesInBatchRequest(_)
)
}
}
impl std::error::Error for ChangeMessageVisibilityBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ChangeMessageVisibilityBatchErrorKind::BatchEntryIdsNotDistinct(_inner) => Some(_inner),
ChangeMessageVisibilityBatchErrorKind::EmptyBatchRequest(_inner) => Some(_inner),
ChangeMessageVisibilityBatchErrorKind::InvalidBatchEntryId(_inner) => Some(_inner),
ChangeMessageVisibilityBatchErrorKind::TooManyEntriesInBatchRequest(_inner) => {
Some(_inner)
}
ChangeMessageVisibilityBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ChangeMessageVisibilityError {
pub kind: ChangeMessageVisibilityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ChangeMessageVisibilityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ChangeMessageVisibilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ChangeMessageVisibilityErrorKind {
MessageNotInflight(crate::error::MessageNotInflight),
ReceiptHandleIsInvalid(crate::error::ReceiptHandleIsInvalid),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ChangeMessageVisibilityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ChangeMessageVisibilityErrorKind::MessageNotInflight(_inner) => _inner.fmt(f),
ChangeMessageVisibilityErrorKind::ReceiptHandleIsInvalid(_inner) => _inner.fmt(f),
ChangeMessageVisibilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ChangeMessageVisibilityError {
fn code(&self) -> Option<&str> {
ChangeMessageVisibilityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ChangeMessageVisibilityError {
pub fn new(kind: ChangeMessageVisibilityErrorKind, 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: ChangeMessageVisibilityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ChangeMessageVisibilityErrorKind::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_message_not_inflight(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityErrorKind::MessageNotInflight(_)
)
}
pub fn is_receipt_handle_is_invalid(&self) -> bool {
matches!(
&self.kind,
ChangeMessageVisibilityErrorKind::ReceiptHandleIsInvalid(_)
)
}
}
impl std::error::Error for ChangeMessageVisibilityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ChangeMessageVisibilityErrorKind::MessageNotInflight(_inner) => Some(_inner),
ChangeMessageVisibilityErrorKind::ReceiptHandleIsInvalid(_inner) => Some(_inner),
ChangeMessageVisibilityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageNotInflight {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MessageNotInflight {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MessageNotInflight {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MessageNotInflight")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for MessageNotInflight {}
pub mod message_not_inflight {
#[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::MessageNotInflight {
crate::error::MessageNotInflight {
message: self.message,
}
}
}
}
impl MessageNotInflight {
pub fn builder() -> crate::error::message_not_inflight::Builder {
crate::error::message_not_inflight::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddPermissionError {
pub kind: AddPermissionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddPermissionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddPermissionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddPermissionErrorKind {
OverLimit(crate::error::OverLimit),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddPermissionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddPermissionErrorKind::OverLimit(_inner) => _inner.fmt(f),
AddPermissionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddPermissionError {
fn code(&self) -> Option<&str> {
AddPermissionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddPermissionError {
pub fn new(kind: AddPermissionErrorKind, 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: AddPermissionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddPermissionErrorKind::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_over_limit(&self) -> bool {
matches!(&self.kind, AddPermissionErrorKind::OverLimit(_))
}
}
impl std::error::Error for AddPermissionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddPermissionErrorKind::OverLimit(_inner) => Some(_inner),
AddPermissionErrorKind::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 _)
}
}