#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateThingShadowError {
pub kind: UpdateThingShadowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateThingShadowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateThingShadowErrorKind {
ConflictException(crate::error::ConflictException),
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
RequestEntityTooLargeException(crate::error::RequestEntityTooLargeException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
UnsupportedDocumentEncodingException(crate::error::UnsupportedDocumentEncodingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateThingShadowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateThingShadowErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::RequestEntityTooLargeException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
UpdateThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => {
_inner.fmt(f)
}
UpdateThingShadowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateThingShadowError {
fn code(&self) -> Option<&str> {
UpdateThingShadowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateThingShadowError {
pub fn new(kind: UpdateThingShadowErrorKind, 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: UpdateThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateThingShadowErrorKind::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_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateThingShadowErrorKind::ConflictException(_))
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_request_entity_too_large_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::RequestEntityTooLargeException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::UnauthorizedException(_)
)
}
pub fn is_unsupported_document_encoding_exception(&self) -> bool {
matches!(
&self.kind,
UpdateThingShadowErrorKind::UnsupportedDocumentEncodingException(_)
)
}
}
impl std::error::Error for UpdateThingShadowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateThingShadowErrorKind::ConflictException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::InternalFailureException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::RequestEntityTooLargeException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::UnauthorizedException(_inner) => Some(_inner),
UpdateThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => {
Some(_inner)
}
UpdateThingShadowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedDocumentEncodingException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedDocumentEncodingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedDocumentEncodingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedDocumentEncodingException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedDocumentEncodingException {}
pub mod unsupported_document_encoding_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnsupportedDocumentEncodingException {
crate::error::UnsupportedDocumentEncodingException {
message: self.message,
}
}
}
}
impl UnsupportedDocumentEncodingException {
pub fn builder() -> crate::error::unsupported_document_encoding_exception::Builder {
crate::error::unsupported_document_encoding_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnauthorizedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnauthorizedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for UnauthorizedException {}
pub mod unauthorized_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedException {
crate::error::UnauthorizedException {
message: self.message,
}
}
}
}
impl UnauthorizedException {
pub fn builder() -> crate::error::unauthorized_exception::Builder {
crate::error::unauthorized_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
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 {
#[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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
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 RequestEntityTooLargeException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RequestEntityTooLargeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestEntityTooLargeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestEntityTooLargeException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestEntityTooLargeException {}
pub mod request_entity_too_large_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RequestEntityTooLargeException {
crate::error::RequestEntityTooLargeException {
message: self.message,
}
}
}
}
impl RequestEntityTooLargeException {
pub fn builder() -> crate::error::request_entity_too_large_exception::Builder {
crate::error::request_entity_too_large_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MethodNotAllowedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MethodNotAllowedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MethodNotAllowedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MethodNotAllowedException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for MethodNotAllowedException {}
pub mod method_not_allowed_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::MethodNotAllowedException {
crate::error::MethodNotAllowedException {
message: self.message,
}
}
}
}
impl MethodNotAllowedException {
pub fn builder() -> crate::error::method_not_allowed_exception::Builder {
crate::error::method_not_allowed_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalFailureException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalFailureException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalFailureException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalFailureException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalFailureException {}
pub mod internal_failure_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalFailureException {
crate::error::InternalFailureException {
message: self.message,
}
}
}
}
impl InternalFailureException {
pub fn builder() -> crate::error::internal_failure_exception::Builder {
crate::error::internal_failure_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PublishError {
pub kind: PublishErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PublishError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PublishErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PublishErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PublishError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PublishErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
PublishErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PublishErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
PublishErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PublishErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
PublishErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PublishError {
fn code(&self) -> Option<&str> {
PublishError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PublishError {
pub fn new(kind: PublishErrorKind, 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: PublishErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PublishErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(&self.kind, PublishErrorKind::InternalFailureException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, PublishErrorKind::InvalidRequestException(_))
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(&self.kind, PublishErrorKind::MethodNotAllowedException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PublishErrorKind::ThrottlingException(_))
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(&self.kind, PublishErrorKind::UnauthorizedException(_))
}
}
impl std::error::Error for PublishError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PublishErrorKind::InternalFailureException(_inner) => Some(_inner),
PublishErrorKind::InvalidRequestException(_inner) => Some(_inner),
PublishErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
PublishErrorKind::ThrottlingException(_inner) => Some(_inner),
PublishErrorKind::UnauthorizedException(_inner) => Some(_inner),
PublishErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListRetainedMessagesError {
pub kind: ListRetainedMessagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListRetainedMessagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListRetainedMessagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListRetainedMessagesErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListRetainedMessagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListRetainedMessagesErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
ListRetainedMessagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListRetainedMessagesError {
fn code(&self) -> Option<&str> {
ListRetainedMessagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListRetainedMessagesError {
pub fn new(kind: ListRetainedMessagesErrorKind, 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: ListRetainedMessagesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListRetainedMessagesErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
ListRetainedMessagesErrorKind::UnauthorizedException(_)
)
}
}
impl std::error::Error for ListRetainedMessagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListRetainedMessagesErrorKind::InternalFailureException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::UnauthorizedException(_inner) => Some(_inner),
ListRetainedMessagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListNamedShadowsForThingError {
pub kind: ListNamedShadowsForThingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListNamedShadowsForThingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListNamedShadowsForThingErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListNamedShadowsForThingErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListNamedShadowsForThingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListNamedShadowsForThingErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
ListNamedShadowsForThingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListNamedShadowsForThingError {
fn code(&self) -> Option<&str> {
ListNamedShadowsForThingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListNamedShadowsForThingError {
pub fn new(kind: ListNamedShadowsForThingErrorKind, 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: ListNamedShadowsForThingErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListNamedShadowsForThingErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
ListNamedShadowsForThingErrorKind::UnauthorizedException(_)
)
}
}
impl std::error::Error for ListNamedShadowsForThingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListNamedShadowsForThingErrorKind::InternalFailureException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::ThrottlingException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::UnauthorizedException(_inner) => Some(_inner),
ListNamedShadowsForThingErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[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_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
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::fmt::Debug)]
pub struct GetThingShadowError {
pub kind: GetThingShadowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetThingShadowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetThingShadowErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
UnsupportedDocumentEncodingException(crate::error::UnsupportedDocumentEncodingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetThingShadowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetThingShadowErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => _inner.fmt(f),
GetThingShadowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetThingShadowError {
fn code(&self) -> Option<&str> {
GetThingShadowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetThingShadowError {
pub fn new(kind: GetThingShadowErrorKind, 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: GetThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetThingShadowErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetThingShadowErrorKind::ThrottlingException(_))
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::UnauthorizedException(_)
)
}
pub fn is_unsupported_document_encoding_exception(&self) -> bool {
matches!(
&self.kind,
GetThingShadowErrorKind::UnsupportedDocumentEncodingException(_)
)
}
}
impl std::error::Error for GetThingShadowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetThingShadowErrorKind::InternalFailureException(_inner) => Some(_inner),
GetThingShadowErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetThingShadowErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
GetThingShadowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetThingShadowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetThingShadowErrorKind::ThrottlingException(_inner) => Some(_inner),
GetThingShadowErrorKind::UnauthorizedException(_inner) => Some(_inner),
GetThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => Some(_inner),
GetThingShadowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRetainedMessageError {
pub kind: GetRetainedMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRetainedMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRetainedMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRetainedMessageErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRetainedMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRetainedMessageErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
GetRetainedMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRetainedMessageError {
fn code(&self) -> Option<&str> {
GetRetainedMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRetainedMessageError {
pub fn new(kind: GetRetainedMessageErrorKind, 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: GetRetainedMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRetainedMessageErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
GetRetainedMessageErrorKind::UnauthorizedException(_)
)
}
}
impl std::error::Error for GetRetainedMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRetainedMessageErrorKind::InternalFailureException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::UnauthorizedException(_inner) => Some(_inner),
GetRetainedMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteThingShadowError {
pub kind: DeleteThingShadowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteThingShadowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteThingShadowErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
MethodNotAllowedException(crate::error::MethodNotAllowedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnauthorizedException(crate::error::UnauthorizedException),
UnsupportedDocumentEncodingException(crate::error::UnsupportedDocumentEncodingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteThingShadowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteThingShadowErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::MethodNotAllowedException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::UnauthorizedException(_inner) => _inner.fmt(f),
DeleteThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => {
_inner.fmt(f)
}
DeleteThingShadowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteThingShadowError {
fn code(&self) -> Option<&str> {
DeleteThingShadowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteThingShadowError {
pub fn new(kind: DeleteThingShadowErrorKind, 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: DeleteThingShadowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteThingShadowErrorKind::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_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::InvalidRequestException(_)
)
}
pub fn is_method_not_allowed_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::MethodNotAllowedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::ThrottlingException(_)
)
}
pub fn is_unauthorized_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::UnauthorizedException(_)
)
}
pub fn is_unsupported_document_encoding_exception(&self) -> bool {
matches!(
&self.kind,
DeleteThingShadowErrorKind::UnsupportedDocumentEncodingException(_)
)
}
}
impl std::error::Error for DeleteThingShadowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteThingShadowErrorKind::InternalFailureException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::MethodNotAllowedException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::UnauthorizedException(_inner) => Some(_inner),
DeleteThingShadowErrorKind::UnsupportedDocumentEncodingException(_inner) => {
Some(_inner)
}
DeleteThingShadowErrorKind::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 _)
}
}