#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateChannelReadMarkerError {
pub kind: UpdateChannelReadMarkerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateChannelReadMarkerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateChannelReadMarkerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateChannelReadMarkerErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateChannelReadMarkerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateChannelReadMarkerErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
UpdateChannelReadMarkerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateChannelReadMarkerError {
fn code(&self) -> Option<&str> {
UpdateChannelReadMarkerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateChannelReadMarkerError {
pub fn new(kind: UpdateChannelReadMarkerErrorKind, 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: UpdateChannelReadMarkerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateChannelReadMarkerErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelReadMarkerErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for UpdateChannelReadMarkerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateChannelReadMarkerErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::ConflictException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::ServiceFailureException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::ThrottledClientException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
UpdateChannelReadMarkerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnauthorizedClientException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnauthorizedClientException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl UnauthorizedClientException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedClientException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedClientException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for UnauthorizedClientException {}
pub mod unauthorized_client_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedClientException {
crate::error::UnauthorizedClientException {
code: self.code,
message: self.message,
}
}
}
}
impl UnauthorizedClientException {
pub fn builder() -> crate::error::unauthorized_client_exception::Builder {
crate::error::unauthorized_client_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottledClientException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottledClientException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl ThrottledClientException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottledClientException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottledClientException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottledClientException {}
pub mod throttled_client_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottledClientException {
crate::error::ThrottledClientException {
code: self.code,
message: self.message,
}
}
}
}
impl ThrottledClientException {
pub fn builder() -> crate::error::throttled_client_exception::Builder {
crate::error::throttled_client_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
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) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
code: self.code,
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 ServiceFailureException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceFailureException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl ServiceFailureException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceFailureException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceFailureException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceFailureException {}
pub mod service_failure_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceFailureException {
crate::error::ServiceFailureException {
code: self.code,
message: self.message,
}
}
}
}
impl ServiceFailureException {
pub fn builder() -> crate::error::service_failure_exception::Builder {
crate::error::service_failure_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ForbiddenException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ForbiddenException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl ForbiddenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ForbiddenException {}
pub mod forbidden_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ForbiddenException {
crate::error::ForbiddenException {
code: self.code,
message: self.message,
}
}
}
}
impl ForbiddenException {
pub fn builder() -> crate::error::forbidden_exception::Builder {
crate::error::forbidden_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
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_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
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) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
code: self.code,
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequestException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl BadRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::BadRequestException {
crate::error::BadRequestException {
code: self.code,
message: self.message,
}
}
}
}
impl BadRequestException {
pub fn builder() -> crate::error::bad_request_exception::Builder {
crate::error::bad_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateChannelMessageError {
pub kind: UpdateChannelMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateChannelMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateChannelMessageErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateChannelMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateChannelMessageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
UpdateChannelMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateChannelMessageError {
fn code(&self) -> Option<&str> {
UpdateChannelMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateChannelMessageError {
pub fn new(kind: UpdateChannelMessageErrorKind, 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: UpdateChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateChannelMessageErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelMessageErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for UpdateChannelMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateChannelMessageErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::ConflictException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::ServiceFailureException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::ThrottledClientException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
UpdateChannelMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateChannelFlowError {
pub kind: UpdateChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
UpdateChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateChannelFlowError {
fn code(&self) -> Option<&str> {
UpdateChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateChannelFlowError {
pub fn new(kind: UpdateChannelFlowErrorKind, 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: UpdateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateChannelFlowErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for UpdateChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::ConflictException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
UpdateChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateChannelError {
pub kind: UpdateChannelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateChannelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateChannelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateChannelErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateChannelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateChannelErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
UpdateChannelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateChannelError {
fn code(&self) -> Option<&str> {
UpdateChannelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateChannelError {
pub fn new(kind: UpdateChannelErrorKind, 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: UpdateChannelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateChannelErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, UpdateChannelErrorKind::BadRequestException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateChannelErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, UpdateChannelErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
UpdateChannelErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for UpdateChannelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateChannelErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateChannelErrorKind::ConflictException(_inner) => Some(_inner),
UpdateChannelErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateChannelErrorKind::ServiceFailureException(_inner) => Some(_inner),
UpdateChannelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateChannelErrorKind::ThrottledClientException(_inner) => Some(_inner),
UpdateChannelErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
UpdateChannelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, 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: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::BadRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ForbiddenException(_inner) => Some(_inner),
UntagResourceErrorKind::ServiceFailureException(_inner) => Some(_inner),
UntagResourceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottledClientException(_inner) => Some(_inner),
UntagResourceErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
TagResourceErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, 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: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ForbiddenException(_))
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ServiceFailureException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::BadRequestException(_inner) => Some(_inner),
TagResourceErrorKind::ForbiddenException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceFailureException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottledClientException(_inner) => Some(_inner),
TagResourceErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceLimitExceededException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl ResourceLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceLimitExceededException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceLimitExceededException {}
pub mod resource_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceLimitExceededException {
crate::error::ResourceLimitExceededException {
code: self.code,
message: self.message,
}
}
}
}
impl ResourceLimitExceededException {
pub fn builder() -> crate::error::resource_limit_exceeded_exception::Builder {
crate::error::resource_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendChannelMessageError {
pub kind: SendChannelMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendChannelMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendChannelMessageErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SendChannelMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendChannelMessageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::ConflictException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
SendChannelMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendChannelMessageError {
fn code(&self) -> Option<&str> {
SendChannelMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SendChannelMessageError {
pub fn new(kind: SendChannelMessageErrorKind, 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: SendChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendChannelMessageErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
SendChannelMessageErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for SendChannelMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendChannelMessageErrorKind::BadRequestException(_inner) => Some(_inner),
SendChannelMessageErrorKind::ConflictException(_inner) => Some(_inner),
SendChannelMessageErrorKind::ForbiddenException(_inner) => Some(_inner),
SendChannelMessageErrorKind::ServiceFailureException(_inner) => Some(_inner),
SendChannelMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
SendChannelMessageErrorKind::ThrottledClientException(_inner) => Some(_inner),
SendChannelMessageErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
SendChannelMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchChannelsError {
pub kind: SearchChannelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SearchChannelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SearchChannelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchChannelsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SearchChannelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchChannelsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
SearchChannelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchChannelsError {
fn code(&self) -> Option<&str> {
SearchChannelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SearchChannelsError {
pub fn new(kind: SearchChannelsErrorKind, 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: SearchChannelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchChannelsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, SearchChannelsErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, SearchChannelsErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
SearchChannelsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
SearchChannelsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
SearchChannelsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
SearchChannelsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for SearchChannelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchChannelsErrorKind::BadRequestException(_inner) => Some(_inner),
SearchChannelsErrorKind::ForbiddenException(_inner) => Some(_inner),
SearchChannelsErrorKind::ServiceFailureException(_inner) => Some(_inner),
SearchChannelsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
SearchChannelsErrorKind::ThrottledClientException(_inner) => Some(_inner),
SearchChannelsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
SearchChannelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RedactChannelMessageError {
pub kind: RedactChannelMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RedactChannelMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RedactChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RedactChannelMessageErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RedactChannelMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RedactChannelMessageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::ConflictException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
RedactChannelMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RedactChannelMessageError {
fn code(&self) -> Option<&str> {
RedactChannelMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RedactChannelMessageError {
pub fn new(kind: RedactChannelMessageErrorKind, 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: RedactChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RedactChannelMessageErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
RedactChannelMessageErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for RedactChannelMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RedactChannelMessageErrorKind::BadRequestException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::ConflictException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::ForbiddenException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::ServiceFailureException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::ThrottledClientException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
RedactChannelMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutChannelMembershipPreferencesError {
pub kind: PutChannelMembershipPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutChannelMembershipPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutChannelMembershipPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutChannelMembershipPreferencesErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutChannelMembershipPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutChannelMembershipPreferencesErrorKind::BadRequestException(_inner) => _inner.fmt(f),
PutChannelMembershipPreferencesErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutChannelMembershipPreferencesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PutChannelMembershipPreferencesErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
PutChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
PutChannelMembershipPreferencesErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
PutChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
PutChannelMembershipPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutChannelMembershipPreferencesError {
fn code(&self) -> Option<&str> {
PutChannelMembershipPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutChannelMembershipPreferencesError {
pub fn new(
kind: PutChannelMembershipPreferencesErrorKind,
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: PutChannelMembershipPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutChannelMembershipPreferencesErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
PutChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for PutChannelMembershipPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutChannelMembershipPreferencesErrorKind::BadRequestException(_inner) => Some(_inner),
PutChannelMembershipPreferencesErrorKind::ConflictException(_inner) => Some(_inner),
PutChannelMembershipPreferencesErrorKind::ForbiddenException(_inner) => Some(_inner),
PutChannelMembershipPreferencesErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
PutChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
PutChannelMembershipPreferencesErrorKind::ThrottledClientException(_inner) => {
Some(_inner)
}
PutChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_inner) => {
Some(_inner)
}
PutChannelMembershipPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, 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: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::BadRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ForbiddenException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSubChannelsError {
pub kind: ListSubChannelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSubChannelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSubChannelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSubChannelsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSubChannelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSubChannelsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListSubChannelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSubChannelsError {
fn code(&self) -> Option<&str> {
ListSubChannelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSubChannelsError {
pub fn new(kind: ListSubChannelsErrorKind, 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: ListSubChannelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSubChannelsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListSubChannelsErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListSubChannelsErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListSubChannelsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListSubChannelsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListSubChannelsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListSubChannelsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListSubChannelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSubChannelsErrorKind::BadRequestException(_inner) => Some(_inner),
ListSubChannelsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListSubChannelsErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListSubChannelsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListSubChannelsErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListSubChannelsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListSubChannelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelsModeratedByAppInstanceUserError {
pub kind: ListChannelsModeratedByAppInstanceUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelsModeratedByAppInstanceUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelsModeratedByAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelsModeratedByAppInstanceUserErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelsModeratedByAppInstanceUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelsModeratedByAppInstanceUserErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ForbiddenException(_inner) => {
_inner.fmt(f)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => _inner.fmt(f),
ListChannelsModeratedByAppInstanceUserErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
ListChannelsModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => _inner.fmt(f),
ListChannelsModeratedByAppInstanceUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelsModeratedByAppInstanceUserError {
fn code(&self) -> Option<&str> {
ListChannelsModeratedByAppInstanceUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelsModeratedByAppInstanceUserError {
pub fn new(
kind: ListChannelsModeratedByAppInstanceUserErrorKind,
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: ListChannelsModeratedByAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelsModeratedByAppInstanceUserErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelsModeratedByAppInstanceUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelsModeratedByAppInstanceUserErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ForbiddenException(_inner) => {
Some(_inner)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
ListChannelsModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => Some(_inner),
ListChannelsModeratedByAppInstanceUserErrorKind::ThrottledClientException(_inner) => {
Some(_inner)
}
ListChannelsModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => Some(_inner),
ListChannelsModeratedByAppInstanceUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelsAssociatedWithChannelFlowError {
pub kind: ListChannelsAssociatedWithChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelsAssociatedWithChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelsAssociatedWithChannelFlowErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelsAssociatedWithChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelsAssociatedWithChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelsAssociatedWithChannelFlowErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ForbiddenException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
ListChannelsAssociatedWithChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelsAssociatedWithChannelFlowError {
fn code(&self) -> Option<&str> {
ListChannelsAssociatedWithChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelsAssociatedWithChannelFlowError {
pub fn new(
kind: ListChannelsAssociatedWithChannelFlowErrorKind,
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: ListChannelsAssociatedWithChannelFlowErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelsAssociatedWithChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsAssociatedWithChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelsAssociatedWithChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelsAssociatedWithChannelFlowErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ForbiddenException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::ThrottledClientException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::UnauthorizedClientException(_inner) => {
Some(_inner)
}
ListChannelsAssociatedWithChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelsError {
pub kind: ListChannelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelsError {
fn code(&self) -> Option<&str> {
ListChannelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelsError {
pub fn new(kind: ListChannelsErrorKind, 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: ListChannelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListChannelsErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListChannelsErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelsErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelsErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelsErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelModeratorsError {
pub kind: ListChannelModeratorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelModeratorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelModeratorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelModeratorsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelModeratorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelModeratorsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelModeratorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelModeratorsError {
fn code(&self) -> Option<&str> {
ListChannelModeratorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelModeratorsError {
pub fn new(kind: ListChannelModeratorsErrorKind, 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: ListChannelModeratorsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelModeratorsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelModeratorsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelModeratorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelModeratorsErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelModeratorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelMessagesError {
pub kind: ListChannelMessagesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelMessagesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelMessagesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelMessagesErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelMessagesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelMessagesErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelMessagesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelMessagesError {
fn code(&self) -> Option<&str> {
ListChannelMessagesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelMessagesError {
pub fn new(kind: ListChannelMessagesErrorKind, 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: ListChannelMessagesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelMessagesErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMessagesErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelMessagesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelMessagesErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelMessagesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelMembershipsForAppInstanceUserError {
pub kind: ListChannelMembershipsForAppInstanceUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListChannelMembershipsForAppInstanceUserError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelMembershipsForAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelMembershipsForAppInstanceUserErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelMembershipsForAppInstanceUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelMembershipsForAppInstanceUserErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ForbiddenException(_inner) => {
_inner.fmt(f)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => _inner.fmt(f),
ListChannelMembershipsForAppInstanceUserErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
ListChannelMembershipsForAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => _inner.fmt(f),
ListChannelMembershipsForAppInstanceUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelMembershipsForAppInstanceUserError {
fn code(&self) -> Option<&str> {
ListChannelMembershipsForAppInstanceUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelMembershipsForAppInstanceUserError {
pub fn new(
kind: ListChannelMembershipsForAppInstanceUserErrorKind,
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: ListChannelMembershipsForAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelMembershipsForAppInstanceUserErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsForAppInstanceUserErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelMembershipsForAppInstanceUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelMembershipsForAppInstanceUserErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ForbiddenException(_inner) => {
Some(_inner)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
ListChannelMembershipsForAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => Some(_inner),
ListChannelMembershipsForAppInstanceUserErrorKind::ThrottledClientException(_inner) => {
Some(_inner)
}
ListChannelMembershipsForAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => Some(_inner),
ListChannelMembershipsForAppInstanceUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelMembershipsError {
pub kind: ListChannelMembershipsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelMembershipsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelMembershipsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelMembershipsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelMembershipsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelMembershipsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelMembershipsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelMembershipsError {
fn code(&self) -> Option<&str> {
ListChannelMembershipsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelMembershipsError {
pub fn new(kind: ListChannelMembershipsErrorKind, 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: ListChannelMembershipsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelMembershipsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelMembershipsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelMembershipsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelMembershipsErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelMembershipsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelFlowsError {
pub kind: ListChannelFlowsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelFlowsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelFlowsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelFlowsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelFlowsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelFlowsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelFlowsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelFlowsError {
fn code(&self) -> Option<&str> {
ListChannelFlowsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelFlowsError {
pub fn new(kind: ListChannelFlowsErrorKind, 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: ListChannelFlowsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelFlowsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelFlowsErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListChannelFlowsErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelFlowsErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelFlowsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelFlowsErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelFlowsErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelFlowsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelFlowsErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelFlowsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListChannelBansError {
pub kind: ListChannelBansErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListChannelBansError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListChannelBansErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListChannelBansErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListChannelBansError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListChannelBansErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ListChannelBansErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListChannelBansError {
fn code(&self) -> Option<&str> {
ListChannelBansError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListChannelBansError {
pub fn new(kind: ListChannelBansErrorKind, 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: ListChannelBansErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListChannelBansErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListChannelBansErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, ListChannelBansErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelBansErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelBansErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelBansErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ListChannelBansErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ListChannelBansError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListChannelBansErrorKind::BadRequestException(_inner) => Some(_inner),
ListChannelBansErrorKind::ForbiddenException(_inner) => Some(_inner),
ListChannelBansErrorKind::ServiceFailureException(_inner) => Some(_inner),
ListChannelBansErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListChannelBansErrorKind::ThrottledClientException(_inner) => Some(_inner),
ListChannelBansErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ListChannelBansErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMessagingSessionEndpointError {
pub kind: GetMessagingSessionEndpointErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMessagingSessionEndpointError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMessagingSessionEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMessagingSessionEndpointErrorKind {
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMessagingSessionEndpointError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMessagingSessionEndpointErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetMessagingSessionEndpointErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
GetMessagingSessionEndpointErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetMessagingSessionEndpointErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
GetMessagingSessionEndpointErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
GetMessagingSessionEndpointErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMessagingSessionEndpointError {
fn code(&self) -> Option<&str> {
GetMessagingSessionEndpointError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMessagingSessionEndpointError {
pub fn new(kind: GetMessagingSessionEndpointErrorKind, 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: GetMessagingSessionEndpointErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMessagingSessionEndpointErrorKind::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_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetMessagingSessionEndpointErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetMessagingSessionEndpointErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetMessagingSessionEndpointErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
GetMessagingSessionEndpointErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
GetMessagingSessionEndpointErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for GetMessagingSessionEndpointError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMessagingSessionEndpointErrorKind::ForbiddenException(_inner) => Some(_inner),
GetMessagingSessionEndpointErrorKind::ServiceFailureException(_inner) => Some(_inner),
GetMessagingSessionEndpointErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetMessagingSessionEndpointErrorKind::ThrottledClientException(_inner) => Some(_inner),
GetMessagingSessionEndpointErrorKind::UnauthorizedClientException(_inner) => {
Some(_inner)
}
GetMessagingSessionEndpointErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetChannelMessageStatusError {
pub kind: GetChannelMessageStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetChannelMessageStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetChannelMessageStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetChannelMessageStatusErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetChannelMessageStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetChannelMessageStatusErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
GetChannelMessageStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetChannelMessageStatusError {
fn code(&self) -> Option<&str> {
GetChannelMessageStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetChannelMessageStatusError {
pub fn new(kind: GetChannelMessageStatusErrorKind, 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: GetChannelMessageStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetChannelMessageStatusErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageStatusErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for GetChannelMessageStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetChannelMessageStatusErrorKind::BadRequestException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::ForbiddenException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::ServiceFailureException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::ThrottledClientException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
GetChannelMessageStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetChannelMessageError {
pub kind: GetChannelMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetChannelMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetChannelMessageErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetChannelMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetChannelMessageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
GetChannelMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetChannelMessageError {
fn code(&self) -> Option<&str> {
GetChannelMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetChannelMessageError {
pub fn new(kind: GetChannelMessageErrorKind, 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: GetChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetChannelMessageErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, GetChannelMessageErrorKind::NotFoundException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMessageErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for GetChannelMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetChannelMessageErrorKind::BadRequestException(_inner) => Some(_inner),
GetChannelMessageErrorKind::ForbiddenException(_inner) => Some(_inner),
GetChannelMessageErrorKind::NotFoundException(_inner) => Some(_inner),
GetChannelMessageErrorKind::ServiceFailureException(_inner) => Some(_inner),
GetChannelMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetChannelMessageErrorKind::ThrottledClientException(_inner) => Some(_inner),
GetChannelMessageErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
GetChannelMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<crate::model::ErrorCode>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NotFoundException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ErrorCode> {
self.code.as_ref()
}
}
impl NotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for NotFoundException {}
pub mod not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<crate::model::ErrorCode>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: crate::model::ErrorCode) -> Self {
self.code = Some(input);
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ErrorCode>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::NotFoundException {
crate::error::NotFoundException {
code: self.code,
message: self.message,
}
}
}
}
impl NotFoundException {
pub fn builder() -> crate::error::not_found_exception::Builder {
crate::error::not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetChannelMembershipPreferencesError {
pub kind: GetChannelMembershipPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetChannelMembershipPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetChannelMembershipPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetChannelMembershipPreferencesErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetChannelMembershipPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetChannelMembershipPreferencesErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GetChannelMembershipPreferencesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GetChannelMembershipPreferencesErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
GetChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetChannelMembershipPreferencesErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
GetChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
GetChannelMembershipPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetChannelMembershipPreferencesError {
fn code(&self) -> Option<&str> {
GetChannelMembershipPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetChannelMembershipPreferencesError {
pub fn new(
kind: GetChannelMembershipPreferencesErrorKind,
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: GetChannelMembershipPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetChannelMembershipPreferencesErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
GetChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for GetChannelMembershipPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetChannelMembershipPreferencesErrorKind::BadRequestException(_inner) => Some(_inner),
GetChannelMembershipPreferencesErrorKind::ForbiddenException(_inner) => Some(_inner),
GetChannelMembershipPreferencesErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
GetChannelMembershipPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetChannelMembershipPreferencesErrorKind::ThrottledClientException(_inner) => {
Some(_inner)
}
GetChannelMembershipPreferencesErrorKind::UnauthorizedClientException(_inner) => {
Some(_inner)
}
GetChannelMembershipPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateChannelFlowError {
pub kind: DisassociateChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::ConflictException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DisassociateChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateChannelFlowError {
fn code(&self) -> Option<&str> {
DisassociateChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateChannelFlowError {
pub fn new(kind: DisassociateChannelFlowErrorKind, 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: DisassociateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::NotFoundException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DisassociateChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::ConflictException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::NotFoundException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DisassociateChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelModeratorError {
pub kind: DescribeChannelModeratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeChannelModeratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelModeratorErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelModeratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelModeratorErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DescribeChannelModeratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelModeratorError {
fn code(&self) -> Option<&str> {
DescribeChannelModeratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelModeratorError {
pub fn new(kind: DescribeChannelModeratorErrorKind, 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: DescribeChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelModeratorErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::NotFoundException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratorErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelModeratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelModeratorErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::ServiceFailureException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::ThrottledClientException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DescribeChannelModeratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelModeratedByAppInstanceUserError {
pub kind: DescribeChannelModeratedByAppInstanceUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeChannelModeratedByAppInstanceUserError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelModeratedByAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelModeratedByAppInstanceUserErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelModeratedByAppInstanceUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelModeratedByAppInstanceUserErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ForbiddenException(_inner) => {
_inner.fmt(f)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
_inner.fmt(f)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => _inner.fmt(f),
DescribeChannelModeratedByAppInstanceUserErrorKind::ThrottledClientException(
_inner,
) => _inner.fmt(f),
DescribeChannelModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => _inner.fmt(f),
DescribeChannelModeratedByAppInstanceUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelModeratedByAppInstanceUserError {
fn code(&self) -> Option<&str> {
DescribeChannelModeratedByAppInstanceUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelModeratedByAppInstanceUserError {
pub fn new(
kind: DescribeChannelModeratedByAppInstanceUserErrorKind,
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: DescribeChannelModeratedByAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelModeratedByAppInstanceUserErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelModeratedByAppInstanceUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelModeratedByAppInstanceUserErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ForbiddenException(_inner) => {
Some(_inner)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceFailureException(_inner) => {
Some(_inner)
}
DescribeChannelModeratedByAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => Some(_inner),
DescribeChannelModeratedByAppInstanceUserErrorKind::ThrottledClientException(
_inner,
) => Some(_inner),
DescribeChannelModeratedByAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => Some(_inner),
DescribeChannelModeratedByAppInstanceUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelMembershipForAppInstanceUserError {
pub kind: DescribeChannelMembershipForAppInstanceUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeChannelMembershipForAppInstanceUserError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelMembershipForAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelMembershipForAppInstanceUserErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelMembershipForAppInstanceUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelMembershipForAppInstanceUserErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
DescribeChannelMembershipForAppInstanceUserErrorKind::ForbiddenException(_inner) => {
_inner.fmt(f)
}
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceFailureException(
_inner,
) => _inner.fmt(f),
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => _inner.fmt(f),
DescribeChannelMembershipForAppInstanceUserErrorKind::ThrottledClientException(
_inner,
) => _inner.fmt(f),
DescribeChannelMembershipForAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => _inner.fmt(f),
DescribeChannelMembershipForAppInstanceUserErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for DescribeChannelMembershipForAppInstanceUserError
{
fn code(&self) -> Option<&str> {
DescribeChannelMembershipForAppInstanceUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelMembershipForAppInstanceUserError {
pub fn new(
kind: DescribeChannelMembershipForAppInstanceUserErrorKind,
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: DescribeChannelMembershipForAppInstanceUserErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelMembershipForAppInstanceUserErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipForAppInstanceUserErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelMembershipForAppInstanceUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelMembershipForAppInstanceUserErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
DescribeChannelMembershipForAppInstanceUserErrorKind::ForbiddenException(_inner) => {
Some(_inner)
}
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceFailureException(
_inner,
) => Some(_inner),
DescribeChannelMembershipForAppInstanceUserErrorKind::ServiceUnavailableException(
_inner,
) => Some(_inner),
DescribeChannelMembershipForAppInstanceUserErrorKind::ThrottledClientException(
_inner,
) => Some(_inner),
DescribeChannelMembershipForAppInstanceUserErrorKind::UnauthorizedClientException(
_inner,
) => Some(_inner),
DescribeChannelMembershipForAppInstanceUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelMembershipError {
pub kind: DescribeChannelMembershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeChannelMembershipError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelMembershipErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelMembershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelMembershipErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeChannelMembershipErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeChannelMembershipErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeChannelMembershipErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DescribeChannelMembershipErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DescribeChannelMembershipErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DescribeChannelMembershipErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
DescribeChannelMembershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelMembershipError {
fn code(&self) -> Option<&str> {
DescribeChannelMembershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelMembershipError {
pub fn new(kind: DescribeChannelMembershipErrorKind, 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: DescribeChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelMembershipErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::NotFoundException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelMembershipErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelMembershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelMembershipErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::ServiceFailureException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::ThrottledClientException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DescribeChannelMembershipErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelFlowError {
pub kind: DescribeChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DescribeChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelFlowError {
fn code(&self) -> Option<&str> {
DescribeChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelFlowError {
pub fn new(kind: DescribeChannelFlowErrorKind, 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: DescribeChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DescribeChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelBanError {
pub kind: DescribeChannelBanErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeChannelBanError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelBanErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelBanError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelBanErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DescribeChannelBanErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelBanError {
fn code(&self) -> Option<&str> {
DescribeChannelBanError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelBanError {
pub fn new(kind: DescribeChannelBanErrorKind, 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: DescribeChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelBanErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::NotFoundException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelBanErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelBanError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelBanErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::ServiceFailureException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::ThrottledClientException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DescribeChannelBanErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeChannelError {
pub kind: DescribeChannelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeChannelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeChannelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeChannelErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeChannelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeChannelErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DescribeChannelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeChannelError {
fn code(&self) -> Option<&str> {
DescribeChannelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeChannelError {
pub fn new(kind: DescribeChannelErrorKind, 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: DescribeChannelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeChannelErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, DescribeChannelErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DescribeChannelErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DescribeChannelErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DescribeChannelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeChannelErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeChannelErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeChannelErrorKind::ServiceFailureException(_inner) => Some(_inner),
DescribeChannelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeChannelErrorKind::ThrottledClientException(_inner) => Some(_inner),
DescribeChannelErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DescribeChannelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelModeratorError {
pub kind: DeleteChannelModeratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelModeratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelModeratorErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelModeratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelModeratorErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelModeratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelModeratorError {
fn code(&self) -> Option<&str> {
DeleteChannelModeratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelModeratorError {
pub fn new(kind: DeleteChannelModeratorErrorKind, 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: DeleteChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelModeratorErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelModeratorErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelModeratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelModeratorErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelModeratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelMessageError {
pub kind: DeleteChannelMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelMessageErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelMessageErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelMessageError {
fn code(&self) -> Option<&str> {
DeleteChannelMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelMessageError {
pub fn new(kind: DeleteChannelMessageErrorKind, 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: DeleteChannelMessageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelMessageErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMessageErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelMessageErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelMembershipError {
pub kind: DeleteChannelMembershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelMembershipError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelMembershipErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelMembershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelMembershipErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelMembershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelMembershipError {
fn code(&self) -> Option<&str> {
DeleteChannelMembershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelMembershipError {
pub fn new(kind: DeleteChannelMembershipErrorKind, 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: DeleteChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelMembershipErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelMembershipErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelMembershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelMembershipErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::ConflictException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelMembershipErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelFlowError {
pub kind: DeleteChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelFlowError {
fn code(&self) -> Option<&str> {
DeleteChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelFlowError {
pub fn new(kind: DeleteChannelFlowErrorKind, 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: DeleteChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteChannelFlowErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::ConflictException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelBanError {
pub kind: DeleteChannelBanErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelBanError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelBanErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelBanError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelBanErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelBanErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelBanError {
fn code(&self) -> Option<&str> {
DeleteChannelBanError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelBanError {
pub fn new(kind: DeleteChannelBanErrorKind, 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: DeleteChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelBanErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelBanErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DeleteChannelBanErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelBanErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelBanErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelBanErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelBanErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelBanError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelBanErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelBanErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteChannelError {
pub kind: DeleteChannelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteChannelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteChannelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteChannelErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteChannelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteChannelErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
DeleteChannelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteChannelError {
fn code(&self) -> Option<&str> {
DeleteChannelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteChannelError {
pub fn new(kind: DeleteChannelErrorKind, 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: DeleteChannelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteChannelErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, DeleteChannelErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DeleteChannelErrorKind::ForbiddenException(_))
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
DeleteChannelErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for DeleteChannelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteChannelErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteChannelErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteChannelErrorKind::ServiceFailureException(_inner) => Some(_inner),
DeleteChannelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteChannelErrorKind::ThrottledClientException(_inner) => Some(_inner),
DeleteChannelErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
DeleteChannelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateChannelModeratorError {
pub kind: CreateChannelModeratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateChannelModeratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateChannelModeratorErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateChannelModeratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateChannelModeratorErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateChannelModeratorErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
CreateChannelModeratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateChannelModeratorError {
fn code(&self) -> Option<&str> {
CreateChannelModeratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateChannelModeratorError {
pub fn new(kind: CreateChannelModeratorErrorKind, 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: CreateChannelModeratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateChannelModeratorErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ForbiddenException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelModeratorErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for CreateChannelModeratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateChannelModeratorErrorKind::BadRequestException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ConflictException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ServiceFailureException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::ThrottledClientException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
CreateChannelModeratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateChannelMembershipError {
pub kind: CreateChannelMembershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateChannelMembershipError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateChannelMembershipErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateChannelMembershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateChannelMembershipErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateChannelMembershipErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
CreateChannelMembershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateChannelMembershipError {
fn code(&self) -> Option<&str> {
CreateChannelMembershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateChannelMembershipError {
pub fn new(kind: CreateChannelMembershipErrorKind, 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: CreateChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateChannelMembershipErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::NotFoundException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelMembershipErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for CreateChannelMembershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateChannelMembershipErrorKind::BadRequestException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::ConflictException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::NotFoundException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
CreateChannelMembershipErrorKind::ServiceFailureException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::ThrottledClientException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
CreateChannelMembershipErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateChannelFlowError {
pub kind: CreateChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
CreateChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateChannelFlowError {
fn code(&self) -> Option<&str> {
CreateChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateChannelFlowError {
pub fn new(kind: CreateChannelFlowErrorKind, 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: CreateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateChannelFlowErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for CreateChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ConflictException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
CreateChannelFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateChannelBanError {
pub kind: CreateChannelBanErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateChannelBanError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateChannelBanErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateChannelBanError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateChannelBanErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
CreateChannelBanErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateChannelBanError {
fn code(&self) -> Option<&str> {
CreateChannelBanError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateChannelBanError {
pub fn new(kind: CreateChannelBanErrorKind, 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: CreateChannelBanErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateChannelBanErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateChannelBanErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, CreateChannelBanErrorKind::ForbiddenException(_))
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelBanErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for CreateChannelBanError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateChannelBanErrorKind::BadRequestException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ConflictException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ServiceFailureException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateChannelBanErrorKind::ThrottledClientException(_inner) => Some(_inner),
CreateChannelBanErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
CreateChannelBanErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateChannelError {
pub kind: CreateChannelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateChannelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateChannelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateChannelErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateChannelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateChannelErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ResourceLimitExceededException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
CreateChannelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateChannelError {
fn code(&self) -> Option<&str> {
CreateChannelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateChannelError {
pub fn new(kind: CreateChannelErrorKind, 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: CreateChannelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateChannelErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, CreateChannelErrorKind::BadRequestException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateChannelErrorKind::ConflictException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, CreateChannelErrorKind::ForbiddenException(_))
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
CreateChannelErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for CreateChannelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateChannelErrorKind::BadRequestException(_inner) => Some(_inner),
CreateChannelErrorKind::ConflictException(_inner) => Some(_inner),
CreateChannelErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateChannelErrorKind::ResourceLimitExceededException(_inner) => Some(_inner),
CreateChannelErrorKind::ServiceFailureException(_inner) => Some(_inner),
CreateChannelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateChannelErrorKind::ThrottledClientException(_inner) => Some(_inner),
CreateChannelErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
CreateChannelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ChannelFlowCallbackError {
pub kind: ChannelFlowCallbackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ChannelFlowCallbackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ChannelFlowCallbackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ChannelFlowCallbackErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ChannelFlowCallbackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ChannelFlowCallbackErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::ConflictException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
ChannelFlowCallbackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ChannelFlowCallbackError {
fn code(&self) -> Option<&str> {
ChannelFlowCallbackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ChannelFlowCallbackError {
pub fn new(kind: ChannelFlowCallbackErrorKind, 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: ChannelFlowCallbackErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ChannelFlowCallbackErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::ForbiddenException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
ChannelFlowCallbackErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for ChannelFlowCallbackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ChannelFlowCallbackErrorKind::BadRequestException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::ConflictException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::ForbiddenException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::ServiceFailureException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::ThrottledClientException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
ChannelFlowCallbackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchCreateChannelMembershipError {
pub kind: BatchCreateChannelMembershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchCreateChannelMembershipError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchCreateChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchCreateChannelMembershipErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ResourceLimitExceededException(crate::error::ResourceLimitExceededException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchCreateChannelMembershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchCreateChannelMembershipErrorKind::BadRequestException(_inner) => _inner.fmt(f),
BatchCreateChannelMembershipErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
BatchCreateChannelMembershipErrorKind::NotFoundException(_inner) => _inner.fmt(f),
BatchCreateChannelMembershipErrorKind::ResourceLimitExceededException(_inner) => {
_inner.fmt(f)
}
BatchCreateChannelMembershipErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
BatchCreateChannelMembershipErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
BatchCreateChannelMembershipErrorKind::ThrottledClientException(_inner) => {
_inner.fmt(f)
}
BatchCreateChannelMembershipErrorKind::UnauthorizedClientException(_inner) => {
_inner.fmt(f)
}
BatchCreateChannelMembershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchCreateChannelMembershipError {
fn code(&self) -> Option<&str> {
BatchCreateChannelMembershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchCreateChannelMembershipError {
pub fn new(kind: BatchCreateChannelMembershipErrorKind, 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: BatchCreateChannelMembershipErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchCreateChannelMembershipErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::NotFoundException(_)
)
}
pub fn is_resource_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::ResourceLimitExceededException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateChannelMembershipErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for BatchCreateChannelMembershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchCreateChannelMembershipErrorKind::BadRequestException(_inner) => Some(_inner),
BatchCreateChannelMembershipErrorKind::ForbiddenException(_inner) => Some(_inner),
BatchCreateChannelMembershipErrorKind::NotFoundException(_inner) => Some(_inner),
BatchCreateChannelMembershipErrorKind::ResourceLimitExceededException(_inner) => {
Some(_inner)
}
BatchCreateChannelMembershipErrorKind::ServiceFailureException(_inner) => Some(_inner),
BatchCreateChannelMembershipErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
BatchCreateChannelMembershipErrorKind::ThrottledClientException(_inner) => Some(_inner),
BatchCreateChannelMembershipErrorKind::UnauthorizedClientException(_inner) => {
Some(_inner)
}
BatchCreateChannelMembershipErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateChannelFlowError {
pub kind: AssociateChannelFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateChannelFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateChannelFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ConflictException(crate::error::ConflictException),
ForbiddenException(crate::error::ForbiddenException),
NotFoundException(crate::error::NotFoundException),
ServiceFailureException(crate::error::ServiceFailureException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottledClientException(crate::error::ThrottledClientException),
UnauthorizedClientException(crate::error::UnauthorizedClientException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateChannelFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateChannelFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::ServiceFailureException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::ThrottledClientException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::UnauthorizedClientException(_inner) => _inner.fmt(f),
AssociateChannelFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateChannelFlowError {
fn code(&self) -> Option<&str> {
AssociateChannelFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateChannelFlowError {
pub fn new(kind: AssociateChannelFlowErrorKind, 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: AssociateChannelFlowErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateChannelFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::BadRequestException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::ConflictException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::ForbiddenException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::NotFoundException(_)
)
}
pub fn is_service_failure_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::ServiceFailureException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttled_client_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::ThrottledClientException(_)
)
}
pub fn is_unauthorized_client_exception(&self) -> bool {
matches!(
&self.kind,
AssociateChannelFlowErrorKind::UnauthorizedClientException(_)
)
}
}
impl std::error::Error for AssociateChannelFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateChannelFlowErrorKind::BadRequestException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::ConflictException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::NotFoundException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::ServiceFailureException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::ThrottledClientException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::UnauthorizedClientException(_inner) => Some(_inner),
AssociateChannelFlowErrorKind::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 _)
}
}