#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdatePoolError {
pub kind: UpdatePoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdatePoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdatePoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdatePoolErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdatePoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdatePoolErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdatePoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdatePoolError {
fn code(&self) -> Option<&str> {
UpdatePoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdatePoolErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdatePoolErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl UpdatePoolError {
pub fn new(kind: UpdatePoolErrorKind, 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: UpdatePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdatePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdatePoolErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdatePoolErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdatePoolErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePoolErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdatePoolErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdatePoolErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdatePoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdatePoolErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdatePoolErrorKind::ConflictException(_inner) => Some(_inner),
UpdatePoolErrorKind::InternalServerException(_inner) => Some(_inner),
UpdatePoolErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdatePoolErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdatePoolErrorKind::ValidationException(_inner) => Some(_inner),
UpdatePoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
pub fields: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn fields(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.fields.as_deref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) fields:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn fields(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.fields.unwrap_or_default();
v.push(input);
self.fields = Some(v);
self
}
pub fn set_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.fields = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
fields: self.fields,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ThrottlingError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::ResourceType>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
self.resource_type.as_ref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::ResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_type: self.resource_type,
resource_id: self.resource_id,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl InternalServerException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) request_id: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
request_id: self.request_id,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ConflictExceptionReason>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::ResourceType>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn reason(&self) -> std::option::Option<&crate::model::ConflictExceptionReason> {
self.reason.as_ref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
self.resource_type.as_ref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ConflictExceptionReason>,
pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ConflictExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ConflictExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::ResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
reason: self.reason,
resource_type: self.resource_type,
resource_id: self.resource_id,
}
}
}
}
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 AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::AccessDeniedExceptionReason>,
}
impl AccessDeniedException {
pub fn reason(&self) -> std::option::Option<&crate::model::AccessDeniedExceptionReason> {
self.reason.as_ref()
}
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::AccessDeniedExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::AccessDeniedExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::AccessDeniedExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
reason: self.reason,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdatePhoneNumberError {
pub kind: UpdatePhoneNumberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdatePhoneNumberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdatePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdatePhoneNumberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdatePhoneNumberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdatePhoneNumberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdatePhoneNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdatePhoneNumberError {
fn code(&self) -> Option<&str> {
UpdatePhoneNumberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdatePhoneNumberErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdatePhoneNumberErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdatePhoneNumberError {
pub fn new(kind: UpdatePhoneNumberErrorKind, 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: UpdatePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdatePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePhoneNumberErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdatePhoneNumberErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePhoneNumberErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePhoneNumberErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePhoneNumberErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePhoneNumberErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdatePhoneNumberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdatePhoneNumberErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::ConflictException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::InternalServerException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::ValidationException(_inner) => Some(_inner),
UpdatePhoneNumberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEventDestinationError {
pub kind: UpdateEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEventDestinationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEventDestinationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEventDestinationError {
fn code(&self) -> Option<&str> {
UpdateEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateEventDestinationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateEventDestinationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateEventDestinationError {
pub fn new(kind: UpdateEventDestinationErrorKind, 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: UpdateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEventDestinationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEventDestinationErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::ConflictException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::ValidationException(_inner) => Some(_inner),
UpdateEventDestinationErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_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> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UntagResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_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> {
match &self.kind {
TagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
TagResourceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => 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_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
}
impl ServiceQuotaExceededException {
pub fn reason(
&self,
) -> std::option::Option<&crate::model::ServiceQuotaExceededExceptionReason> {
self.reason.as_ref()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ServiceQuotaExceededExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ServiceQuotaExceededExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
reason: self.reason,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetVoiceMessageSpendLimitOverrideError {
pub kind: SetVoiceMessageSpendLimitOverrideErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetVoiceMessageSpendLimitOverrideError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetVoiceMessageSpendLimitOverrideErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetVoiceMessageSpendLimitOverrideError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
SetVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
SetVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
SetVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
SetVoiceMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetVoiceMessageSpendLimitOverrideError {
fn code(&self) -> Option<&str> {
SetVoiceMessageSpendLimitOverrideError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SetVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SetVoiceMessageSpendLimitOverrideError {
pub fn new(
kind: SetVoiceMessageSpendLimitOverrideErrorKind,
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: SetVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SetVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SetVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SetVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SetVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SetVoiceMessageSpendLimitOverrideError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
SetVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
SetVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => Some(_inner),
SetVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => Some(_inner),
SetVoiceMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetTextMessageSpendLimitOverrideError {
pub kind: SetTextMessageSpendLimitOverrideErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetTextMessageSpendLimitOverrideError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetTextMessageSpendLimitOverrideErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetTextMessageSpendLimitOverrideError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
SetTextMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
SetTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SetTextMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => _inner.fmt(f),
SetTextMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetTextMessageSpendLimitOverrideError {
fn code(&self) -> Option<&str> {
SetTextMessageSpendLimitOverrideError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetTextMessageSpendLimitOverrideErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SetTextMessageSpendLimitOverrideErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SetTextMessageSpendLimitOverrideError {
pub fn new(
kind: SetTextMessageSpendLimitOverrideErrorKind,
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: SetTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SetTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SetTextMessageSpendLimitOverrideErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SetTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SetTextMessageSpendLimitOverrideErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SetTextMessageSpendLimitOverrideError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
SetTextMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
SetTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => Some(_inner),
SetTextMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => Some(_inner),
SetTextMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetDefaultSenderIdError {
pub kind: SetDefaultSenderIdErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetDefaultSenderIdError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetDefaultSenderIdErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetDefaultSenderIdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetDefaultSenderIdErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SetDefaultSenderIdErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SetDefaultSenderIdErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SetDefaultSenderIdErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SetDefaultSenderIdErrorKind::ValidationException(_inner) => _inner.fmt(f),
SetDefaultSenderIdErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetDefaultSenderIdError {
fn code(&self) -> Option<&str> {
SetDefaultSenderIdError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetDefaultSenderIdErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SetDefaultSenderIdErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SetDefaultSenderIdError {
pub fn new(kind: SetDefaultSenderIdErrorKind, 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: SetDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultSenderIdErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultSenderIdErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultSenderIdErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultSenderIdErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultSenderIdErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SetDefaultSenderIdError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetDefaultSenderIdErrorKind::AccessDeniedException(_inner) => Some(_inner),
SetDefaultSenderIdErrorKind::InternalServerException(_inner) => Some(_inner),
SetDefaultSenderIdErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SetDefaultSenderIdErrorKind::ThrottlingException(_inner) => Some(_inner),
SetDefaultSenderIdErrorKind::ValidationException(_inner) => Some(_inner),
SetDefaultSenderIdErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetDefaultMessageTypeError {
pub kind: SetDefaultMessageTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetDefaultMessageTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetDefaultMessageTypeErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetDefaultMessageTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetDefaultMessageTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SetDefaultMessageTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SetDefaultMessageTypeErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SetDefaultMessageTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SetDefaultMessageTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
SetDefaultMessageTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetDefaultMessageTypeError {
fn code(&self) -> Option<&str> {
SetDefaultMessageTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetDefaultMessageTypeErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SetDefaultMessageTypeErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SetDefaultMessageTypeError {
pub fn new(kind: SetDefaultMessageTypeErrorKind, 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: SetDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultMessageTypeErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultMessageTypeErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultMessageTypeErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultMessageTypeErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SetDefaultMessageTypeErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SetDefaultMessageTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetDefaultMessageTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
SetDefaultMessageTypeErrorKind::InternalServerException(_inner) => Some(_inner),
SetDefaultMessageTypeErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SetDefaultMessageTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
SetDefaultMessageTypeErrorKind::ValidationException(_inner) => Some(_inner),
SetDefaultMessageTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendVoiceMessageError {
pub kind: SendVoiceMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendVoiceMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendVoiceMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendVoiceMessageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SendVoiceMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendVoiceMessageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::ConflictException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::ValidationException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendVoiceMessageError {
fn code(&self) -> Option<&str> {
SendVoiceMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SendVoiceMessageErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SendVoiceMessageErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SendVoiceMessageError {
pub fn new(kind: SendVoiceMessageErrorKind, 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: SendVoiceMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendVoiceMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, SendVoiceMessageErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SendVoiceMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendVoiceMessageErrorKind::AccessDeniedException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::ConflictException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::InternalServerException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::ThrottlingException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::ValidationException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendTextMessageError {
pub kind: SendTextMessageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SendTextMessageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SendTextMessageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendTextMessageErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SendTextMessageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendTextMessageErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::ConflictException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::ValidationException(_inner) => _inner.fmt(f),
SendTextMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendTextMessageError {
fn code(&self) -> Option<&str> {
SendTextMessageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SendTextMessageErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SendTextMessageErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SendTextMessageError {
pub fn new(kind: SendTextMessageErrorKind, 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: SendTextMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendTextMessageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SendTextMessageErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, SendTextMessageErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SendTextMessageErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SendTextMessageErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
SendTextMessageErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, SendTextMessageErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, SendTextMessageErrorKind::ValidationException(_))
}
}
impl std::error::Error for SendTextMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendTextMessageErrorKind::AccessDeniedException(_inner) => Some(_inner),
SendTextMessageErrorKind::ConflictException(_inner) => Some(_inner),
SendTextMessageErrorKind::InternalServerException(_inner) => Some(_inner),
SendTextMessageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SendTextMessageErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
SendTextMessageErrorKind::ThrottlingException(_inner) => Some(_inner),
SendTextMessageErrorKind::ValidationException(_inner) => Some(_inner),
SendTextMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RequestPhoneNumberError {
pub kind: RequestPhoneNumberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RequestPhoneNumberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RequestPhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RequestPhoneNumberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RequestPhoneNumberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RequestPhoneNumberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::ConflictException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::InternalServerException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::ValidationException(_inner) => _inner.fmt(f),
RequestPhoneNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RequestPhoneNumberError {
fn code(&self) -> Option<&str> {
RequestPhoneNumberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
RequestPhoneNumberErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
RequestPhoneNumberErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl RequestPhoneNumberError {
pub fn new(kind: RequestPhoneNumberErrorKind, 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: RequestPhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RequestPhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RequestPhoneNumberErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RequestPhoneNumberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RequestPhoneNumberErrorKind::AccessDeniedException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::ConflictException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::InternalServerException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::ThrottlingException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::ValidationException(_inner) => Some(_inner),
RequestPhoneNumberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ReleasePhoneNumberError {
pub kind: ReleasePhoneNumberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ReleasePhoneNumberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ReleasePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ReleasePhoneNumberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ReleasePhoneNumberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ReleasePhoneNumberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::ConflictException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::ValidationException(_inner) => _inner.fmt(f),
ReleasePhoneNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ReleasePhoneNumberError {
fn code(&self) -> Option<&str> {
ReleasePhoneNumberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ReleasePhoneNumberErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ReleasePhoneNumberErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ReleasePhoneNumberError {
pub fn new(kind: ReleasePhoneNumberErrorKind, 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: ReleasePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ReleasePhoneNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ReleasePhoneNumberErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ReleasePhoneNumberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ReleasePhoneNumberErrorKind::AccessDeniedException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::ConflictException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::InternalServerException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::ThrottlingException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::ValidationException(_inner) => Some(_inner),
ReleasePhoneNumberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutOptedOutNumberError {
pub kind: PutOptedOutNumberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutOptedOutNumberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutOptedOutNumberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutOptedOutNumberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutOptedOutNumberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutOptedOutNumberErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutOptedOutNumberErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutOptedOutNumberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutOptedOutNumberErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutOptedOutNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutOptedOutNumberError {
fn code(&self) -> Option<&str> {
PutOptedOutNumberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutOptedOutNumberErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
PutOptedOutNumberErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl PutOptedOutNumberError {
pub fn new(kind: PutOptedOutNumberErrorKind, 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: PutOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
PutOptedOutNumberErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutOptedOutNumberErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutOptedOutNumberErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutOptedOutNumberErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutOptedOutNumberErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutOptedOutNumberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutOptedOutNumberErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutOptedOutNumberErrorKind::InternalServerException(_inner) => Some(_inner),
PutOptedOutNumberErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutOptedOutNumberErrorKind::ThrottlingException(_inner) => Some(_inner),
PutOptedOutNumberErrorKind::ValidationException(_inner) => Some(_inner),
PutOptedOutNumberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutKeywordError {
pub kind: PutKeywordErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutKeywordError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutKeywordErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutKeywordErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutKeywordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutKeywordErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutKeywordErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutKeywordError {
fn code(&self) -> Option<&str> {
PutKeywordError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutKeywordErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
PutKeywordErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl PutKeywordError {
pub fn new(kind: PutKeywordErrorKind, 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: PutKeywordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutKeywordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, PutKeywordErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutKeywordErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PutKeywordErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutKeywordErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutKeywordErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutKeywordErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutKeywordErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutKeywordError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutKeywordErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutKeywordErrorKind::ConflictException(_inner) => Some(_inner),
PutKeywordErrorKind::InternalServerException(_inner) => Some(_inner),
PutKeywordErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutKeywordErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
PutKeywordErrorKind::ThrottlingException(_inner) => Some(_inner),
PutKeywordErrorKind::ValidationException(_inner) => Some(_inner),
PutKeywordErrorKind::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 {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
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::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_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> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPoolOriginationIdentitiesError {
pub kind: ListPoolOriginationIdentitiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPoolOriginationIdentitiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPoolOriginationIdentitiesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPoolOriginationIdentitiesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPoolOriginationIdentitiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPoolOriginationIdentitiesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListPoolOriginationIdentitiesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListPoolOriginationIdentitiesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListPoolOriginationIdentitiesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListPoolOriginationIdentitiesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListPoolOriginationIdentitiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPoolOriginationIdentitiesError {
fn code(&self) -> Option<&str> {
ListPoolOriginationIdentitiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListPoolOriginationIdentitiesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListPoolOriginationIdentitiesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListPoolOriginationIdentitiesError {
pub fn new(
kind: ListPoolOriginationIdentitiesErrorKind,
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: ListPoolOriginationIdentitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPoolOriginationIdentitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListPoolOriginationIdentitiesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPoolOriginationIdentitiesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListPoolOriginationIdentitiesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListPoolOriginationIdentitiesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListPoolOriginationIdentitiesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListPoolOriginationIdentitiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPoolOriginationIdentitiesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListPoolOriginationIdentitiesErrorKind::InternalServerException(_inner) => Some(_inner),
ListPoolOriginationIdentitiesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListPoolOriginationIdentitiesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListPoolOriginationIdentitiesErrorKind::ValidationException(_inner) => Some(_inner),
ListPoolOriginationIdentitiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateOriginationIdentityError {
pub kind: DisassociateOriginationIdentityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateOriginationIdentityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateOriginationIdentityErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateOriginationIdentityErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateOriginationIdentityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateOriginationIdentityErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DisassociateOriginationIdentityErrorKind::ConflictException(_inner) => _inner.fmt(f),
DisassociateOriginationIdentityErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DisassociateOriginationIdentityErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateOriginationIdentityErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateOriginationIdentityErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateOriginationIdentityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateOriginationIdentityError {
fn code(&self) -> Option<&str> {
DisassociateOriginationIdentityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DisassociateOriginationIdentityErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DisassociateOriginationIdentityErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DisassociateOriginationIdentityError {
pub fn new(
kind: DisassociateOriginationIdentityErrorKind,
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: DisassociateOriginationIdentityErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateOriginationIdentityErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateOriginationIdentityErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateOriginationIdentityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateOriginationIdentityErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateOriginationIdentityErrorKind::ConflictException(_inner) => Some(_inner),
DisassociateOriginationIdentityErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DisassociateOriginationIdentityErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DisassociateOriginationIdentityErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateOriginationIdentityErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateOriginationIdentityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSpendLimitsError {
pub kind: DescribeSpendLimitsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSpendLimitsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSpendLimitsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSpendLimitsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSpendLimitsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSpendLimitsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeSpendLimitsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeSpendLimitsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeSpendLimitsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeSpendLimitsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSpendLimitsError {
fn code(&self) -> Option<&str> {
DescribeSpendLimitsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeSpendLimitsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeSpendLimitsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeSpendLimitsError {
pub fn new(kind: DescribeSpendLimitsErrorKind, 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: DescribeSpendLimitsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSpendLimitsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSpendLimitsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSpendLimitsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSpendLimitsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSpendLimitsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeSpendLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSpendLimitsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeSpendLimitsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeSpendLimitsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeSpendLimitsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeSpendLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSenderIdsError {
pub kind: DescribeSenderIdsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSenderIdsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSenderIdsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSenderIdsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSenderIdsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSenderIdsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeSenderIdsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeSenderIdsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeSenderIdsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeSenderIdsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeSenderIdsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSenderIdsError {
fn code(&self) -> Option<&str> {
DescribeSenderIdsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeSenderIdsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeSenderIdsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeSenderIdsError {
pub fn new(kind: DescribeSenderIdsErrorKind, 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: DescribeSenderIdsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSenderIdsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSenderIdsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSenderIdsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSenderIdsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSenderIdsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSenderIdsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeSenderIdsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSenderIdsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeSenderIdsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeSenderIdsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeSenderIdsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeSenderIdsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeSenderIdsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePoolsError {
pub kind: DescribePoolsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePoolsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePoolsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePoolsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePoolsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePoolsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribePoolsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribePoolsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribePoolsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribePoolsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribePoolsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePoolsError {
fn code(&self) -> Option<&str> {
DescribePoolsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribePoolsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribePoolsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribePoolsError {
pub fn new(kind: DescribePoolsErrorKind, 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: DescribePoolsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePoolsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DescribePoolsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePoolsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePoolsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribePoolsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DescribePoolsErrorKind::ValidationException(_))
}
}
impl std::error::Error for DescribePoolsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePoolsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribePoolsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribePoolsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribePoolsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribePoolsErrorKind::ValidationException(_inner) => Some(_inner),
DescribePoolsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePhoneNumbersError {
pub kind: DescribePhoneNumbersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePhoneNumbersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePhoneNumbersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePhoneNumbersErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePhoneNumbersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePhoneNumbersErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribePhoneNumbersErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribePhoneNumbersErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribePhoneNumbersErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribePhoneNumbersErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribePhoneNumbersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePhoneNumbersError {
fn code(&self) -> Option<&str> {
DescribePhoneNumbersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribePhoneNumbersErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribePhoneNumbersErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribePhoneNumbersError {
pub fn new(kind: DescribePhoneNumbersErrorKind, 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: DescribePhoneNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePhoneNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribePhoneNumbersErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePhoneNumbersErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePhoneNumbersErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribePhoneNumbersErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribePhoneNumbersErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribePhoneNumbersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePhoneNumbersErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribePhoneNumbersErrorKind::InternalServerException(_inner) => Some(_inner),
DescribePhoneNumbersErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribePhoneNumbersErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribePhoneNumbersErrorKind::ValidationException(_inner) => Some(_inner),
DescribePhoneNumbersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeOptOutListsError {
pub kind: DescribeOptOutListsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeOptOutListsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeOptOutListsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeOptOutListsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeOptOutListsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeOptOutListsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeOptOutListsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeOptOutListsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeOptOutListsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeOptOutListsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeOptOutListsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeOptOutListsError {
fn code(&self) -> Option<&str> {
DescribeOptOutListsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeOptOutListsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeOptOutListsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeOptOutListsError {
pub fn new(kind: DescribeOptOutListsErrorKind, 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: DescribeOptOutListsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeOptOutListsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptOutListsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptOutListsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptOutListsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptOutListsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptOutListsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeOptOutListsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeOptOutListsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeOptOutListsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeOptOutListsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeOptOutListsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeOptOutListsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeOptOutListsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeOptedOutNumbersError {
pub kind: DescribeOptedOutNumbersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeOptedOutNumbersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeOptedOutNumbersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeOptedOutNumbersErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeOptedOutNumbersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeOptedOutNumbersErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeOptedOutNumbersErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeOptedOutNumbersErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeOptedOutNumbersErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeOptedOutNumbersErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeOptedOutNumbersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeOptedOutNumbersError {
fn code(&self) -> Option<&str> {
DescribeOptedOutNumbersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeOptedOutNumbersErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeOptedOutNumbersErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeOptedOutNumbersError {
pub fn new(kind: DescribeOptedOutNumbersErrorKind, 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: DescribeOptedOutNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeOptedOutNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptedOutNumbersErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptedOutNumbersErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptedOutNumbersErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptedOutNumbersErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOptedOutNumbersErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeOptedOutNumbersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeOptedOutNumbersErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeOptedOutNumbersErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeOptedOutNumbersErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeOptedOutNumbersErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeOptedOutNumbersErrorKind::ValidationException(_inner) => Some(_inner),
DescribeOptedOutNumbersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeKeywordsError {
pub kind: DescribeKeywordsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeKeywordsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeKeywordsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeKeywordsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeKeywordsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeKeywordsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeKeywordsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeKeywordsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeKeywordsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeKeywordsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeKeywordsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeKeywordsError {
fn code(&self) -> Option<&str> {
DescribeKeywordsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeKeywordsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeKeywordsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeKeywordsError {
pub fn new(kind: DescribeKeywordsErrorKind, 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: DescribeKeywordsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeKeywordsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeKeywordsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeKeywordsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeKeywordsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeKeywordsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeKeywordsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeKeywordsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeKeywordsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeKeywordsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeKeywordsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeKeywordsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeKeywordsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeKeywordsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeConfigurationSetsError {
pub kind: DescribeConfigurationSetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeConfigurationSetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeConfigurationSetsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeConfigurationSetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeConfigurationSetsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeConfigurationSetsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeConfigurationSetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeConfigurationSetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeConfigurationSetsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeConfigurationSetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeConfigurationSetsError {
fn code(&self) -> Option<&str> {
DescribeConfigurationSetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeConfigurationSetsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeConfigurationSetsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeConfigurationSetsError {
pub fn new(kind: DescribeConfigurationSetsErrorKind, 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: DescribeConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConfigurationSetsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConfigurationSetsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConfigurationSetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConfigurationSetsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeConfigurationSetsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeConfigurationSetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeConfigurationSetsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeConfigurationSetsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeConfigurationSetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeConfigurationSetsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeConfigurationSetsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeConfigurationSetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountLimitsError {
pub kind: DescribeAccountLimitsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAccountLimitsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountLimitsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountLimitsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountLimitsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeAccountLimitsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeAccountLimitsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeAccountLimitsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeAccountLimitsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountLimitsError {
fn code(&self) -> Option<&str> {
DescribeAccountLimitsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeAccountLimitsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeAccountLimitsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeAccountLimitsError {
pub fn new(kind: DescribeAccountLimitsErrorKind, 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: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountLimitsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountLimitsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountLimitsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountLimitsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeAccountLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountLimitsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeAccountLimitsErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeAccountLimitsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeAccountLimitsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeAccountLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountAttributesError {
pub kind: DescribeAccountAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAccountAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountAttributesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountAttributesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeAccountAttributesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeAccountAttributesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeAccountAttributesErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeAccountAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountAttributesError {
fn code(&self) -> Option<&str> {
DescribeAccountAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeAccountAttributesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeAccountAttributesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeAccountAttributesError {
pub fn new(kind: DescribeAccountAttributesErrorKind, 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: DescribeAccountAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAttributesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAttributesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAttributesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAttributesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeAccountAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountAttributesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeAccountAttributesErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeAccountAttributesErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeAccountAttributesErrorKind::ValidationException(_inner) => Some(_inner),
DescribeAccountAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteVoiceMessageSpendLimitOverrideError {
pub kind: DeleteVoiceMessageSpendLimitOverrideErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteVoiceMessageSpendLimitOverrideError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteVoiceMessageSpendLimitOverrideErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteVoiceMessageSpendLimitOverrideError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteVoiceMessageSpendLimitOverrideError {
fn code(&self) -> Option<&str> {
DeleteVoiceMessageSpendLimitOverrideError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteVoiceMessageSpendLimitOverrideError {
pub fn new(
kind: DeleteVoiceMessageSpendLimitOverrideErrorKind,
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: DeleteVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteVoiceMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteVoiceMessageSpendLimitOverrideError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteVoiceMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DeleteVoiceMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTextMessageSpendLimitOverrideError {
pub kind: DeleteTextMessageSpendLimitOverrideErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTextMessageSpendLimitOverrideError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTextMessageSpendLimitOverrideErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTextMessageSpendLimitOverrideError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteTextMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DeleteTextMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DeleteTextMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTextMessageSpendLimitOverrideError {
fn code(&self) -> Option<&str> {
DeleteTextMessageSpendLimitOverrideError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteTextMessageSpendLimitOverrideErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteTextMessageSpendLimitOverrideErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteTextMessageSpendLimitOverrideError {
pub fn new(
kind: DeleteTextMessageSpendLimitOverrideErrorKind,
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: DeleteTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTextMessageSpendLimitOverrideErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTextMessageSpendLimitOverrideErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTextMessageSpendLimitOverrideErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteTextMessageSpendLimitOverrideError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTextMessageSpendLimitOverrideErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteTextMessageSpendLimitOverrideErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteTextMessageSpendLimitOverrideErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DeleteTextMessageSpendLimitOverrideErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DeleteTextMessageSpendLimitOverrideErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePoolError {
pub kind: DeletePoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePoolErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePoolErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeletePoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePoolError {
fn code(&self) -> Option<&str> {
DeletePoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeletePoolErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeletePoolErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl DeletePoolError {
pub fn new(kind: DeletePoolErrorKind, 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: DeletePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeletePoolErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeletePoolErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeletePoolErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePoolErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeletePoolErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeletePoolErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeletePoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePoolErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeletePoolErrorKind::ConflictException(_inner) => Some(_inner),
DeletePoolErrorKind::InternalServerException(_inner) => Some(_inner),
DeletePoolErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePoolErrorKind::ThrottlingException(_inner) => Some(_inner),
DeletePoolErrorKind::ValidationException(_inner) => Some(_inner),
DeletePoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteOptOutListError {
pub kind: DeleteOptOutListErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteOptOutListError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteOptOutListErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteOptOutListError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteOptOutListErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteOptOutListErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteOptOutListError {
fn code(&self) -> Option<&str> {
DeleteOptOutListError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteOptOutListErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteOptOutListErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteOptOutListError {
pub fn new(kind: DeleteOptOutListErrorKind, 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: DeleteOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptOutListErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteOptOutListErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptOutListErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptOutListErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptOutListErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptOutListErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteOptOutListError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteOptOutListErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::ConflictException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::ValidationException(_inner) => Some(_inner),
DeleteOptOutListErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteOptedOutNumberError {
pub kind: DeleteOptedOutNumberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteOptedOutNumberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteOptedOutNumberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteOptedOutNumberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteOptedOutNumberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteOptedOutNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteOptedOutNumberError {
fn code(&self) -> Option<&str> {
DeleteOptedOutNumberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteOptedOutNumberErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteOptedOutNumberErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteOptedOutNumberError {
pub fn new(kind: DeleteOptedOutNumberErrorKind, 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: DeleteOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteOptedOutNumberErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteOptedOutNumberErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteOptedOutNumberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteOptedOutNumberErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::ConflictException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::ValidationException(_inner) => Some(_inner),
DeleteOptedOutNumberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteKeywordError {
pub kind: DeleteKeywordErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteKeywordError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteKeywordErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteKeywordErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteKeywordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteKeywordErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteKeywordErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteKeywordError {
fn code(&self) -> Option<&str> {
DeleteKeywordError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteKeywordErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteKeywordErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteKeywordError {
pub fn new(kind: DeleteKeywordErrorKind, 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: DeleteKeywordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteKeywordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteKeywordErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteKeywordErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteKeywordErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteKeywordErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteKeywordErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteKeywordErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteKeywordError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteKeywordErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteKeywordErrorKind::ConflictException(_inner) => Some(_inner),
DeleteKeywordErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteKeywordErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteKeywordErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteKeywordErrorKind::ValidationException(_inner) => Some(_inner),
DeleteKeywordErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEventDestinationError {
pub kind: DeleteEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEventDestinationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEventDestinationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteEventDestinationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteEventDestinationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteEventDestinationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteEventDestinationErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEventDestinationError {
fn code(&self) -> Option<&str> {
DeleteEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteEventDestinationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteEventDestinationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteEventDestinationError {
pub fn new(kind: DeleteEventDestinationErrorKind, 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: DeleteEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventDestinationErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventDestinationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventDestinationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventDestinationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEventDestinationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEventDestinationErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteEventDestinationErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteEventDestinationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteEventDestinationErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteEventDestinationErrorKind::ValidationException(_inner) => Some(_inner),
DeleteEventDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDefaultSenderIdError {
pub kind: DeleteDefaultSenderIdErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDefaultSenderIdError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDefaultSenderIdErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDefaultSenderIdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDefaultSenderIdErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDefaultSenderIdErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDefaultSenderIdErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDefaultSenderIdErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDefaultSenderIdErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDefaultSenderIdErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDefaultSenderIdError {
fn code(&self) -> Option<&str> {
DeleteDefaultSenderIdError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteDefaultSenderIdErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteDefaultSenderIdErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteDefaultSenderIdError {
pub fn new(kind: DeleteDefaultSenderIdErrorKind, 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: DeleteDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDefaultSenderIdErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultSenderIdErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultSenderIdErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultSenderIdErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultSenderIdErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultSenderIdErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDefaultSenderIdError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDefaultSenderIdErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDefaultSenderIdErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDefaultSenderIdErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDefaultSenderIdErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDefaultSenderIdErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDefaultSenderIdErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDefaultMessageTypeError {
pub kind: DeleteDefaultMessageTypeErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDefaultMessageTypeError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDefaultMessageTypeErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDefaultMessageTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDefaultMessageTypeErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDefaultMessageTypeErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDefaultMessageTypeErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDefaultMessageTypeErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDefaultMessageTypeErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDefaultMessageTypeErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDefaultMessageTypeError {
fn code(&self) -> Option<&str> {
DeleteDefaultMessageTypeError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteDefaultMessageTypeErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteDefaultMessageTypeErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteDefaultMessageTypeError {
pub fn new(kind: DeleteDefaultMessageTypeErrorKind, 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: DeleteDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDefaultMessageTypeErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultMessageTypeErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultMessageTypeErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultMessageTypeErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultMessageTypeErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDefaultMessageTypeErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDefaultMessageTypeError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDefaultMessageTypeErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDefaultMessageTypeErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDefaultMessageTypeErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDefaultMessageTypeErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDefaultMessageTypeErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDefaultMessageTypeErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConfigurationSetError {
pub kind: DeleteConfigurationSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConfigurationSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConfigurationSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConfigurationSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConfigurationSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConfigurationSetError {
fn code(&self) -> Option<&str> {
DeleteConfigurationSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteConfigurationSetErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteConfigurationSetErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteConfigurationSetError {
pub fn new(kind: DeleteConfigurationSetErrorKind, 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: DeleteConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteConfigurationSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConfigurationSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::ValidationException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePoolError {
pub kind: CreatePoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePoolErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePoolErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreatePoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePoolError {
fn code(&self) -> Option<&str> {
CreatePoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreatePoolErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreatePoolErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl CreatePoolError {
pub fn new(kind: CreatePoolErrorKind, 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: CreatePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreatePoolErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreatePoolErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreatePoolErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreatePoolErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePoolErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreatePoolErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreatePoolErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreatePoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePoolErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreatePoolErrorKind::ConflictException(_inner) => Some(_inner),
CreatePoolErrorKind::InternalServerException(_inner) => Some(_inner),
CreatePoolErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreatePoolErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreatePoolErrorKind::ThrottlingException(_inner) => Some(_inner),
CreatePoolErrorKind::ValidationException(_inner) => Some(_inner),
CreatePoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateOptOutListError {
pub kind: CreateOptOutListErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateOptOutListError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateOptOutListErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateOptOutListError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateOptOutListErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateOptOutListErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateOptOutListError {
fn code(&self) -> Option<&str> {
CreateOptOutListError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateOptOutListErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateOptOutListErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateOptOutListError {
pub fn new(kind: CreateOptOutListErrorKind, 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: CreateOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateOptOutListErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateOptOutListErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateOptOutListErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateOptOutListErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateOptOutListErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateOptOutListErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateOptOutListErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateOptOutListError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateOptOutListErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateOptOutListErrorKind::ConflictException(_inner) => Some(_inner),
CreateOptOutListErrorKind::InternalServerException(_inner) => Some(_inner),
CreateOptOutListErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateOptOutListErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateOptOutListErrorKind::ValidationException(_inner) => Some(_inner),
CreateOptOutListErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEventDestinationError {
pub kind: CreateEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEventDestinationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEventDestinationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEventDestinationError {
fn code(&self) -> Option<&str> {
CreateEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateEventDestinationErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateEventDestinationErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateEventDestinationError {
pub fn new(kind: CreateEventDestinationErrorKind, 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: CreateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEventDestinationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateEventDestinationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEventDestinationErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::ConflictException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::InternalServerException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::ValidationException(_inner) => Some(_inner),
CreateEventDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConfigurationSetError {
pub kind: CreateConfigurationSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConfigurationSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConfigurationSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConfigurationSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConfigurationSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConfigurationSetError {
fn code(&self) -> Option<&str> {
CreateConfigurationSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateConfigurationSetErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateConfigurationSetErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateConfigurationSetError {
pub fn new(kind: CreateConfigurationSetErrorKind, 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: CreateConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConfigurationSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateConfigurationSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConfigurationSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::ConflictException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::InternalServerException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::ValidationException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateOriginationIdentityError {
pub kind: AssociateOriginationIdentityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateOriginationIdentityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateOriginationIdentityErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateOriginationIdentityErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateOriginationIdentityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateOriginationIdentityErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateOriginationIdentityErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateOriginationIdentityErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateOriginationIdentityErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateOriginationIdentityErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
AssociateOriginationIdentityErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateOriginationIdentityErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateOriginationIdentityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateOriginationIdentityError {
fn code(&self) -> Option<&str> {
AssociateOriginationIdentityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
AssociateOriginationIdentityErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
AssociateOriginationIdentityErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl AssociateOriginationIdentityError {
pub fn new(kind: AssociateOriginationIdentityErrorKind, 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: AssociateOriginationIdentityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateOriginationIdentityErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateOriginationIdentityErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateOriginationIdentityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateOriginationIdentityErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateOriginationIdentityErrorKind::ConflictException(_inner) => Some(_inner),
AssociateOriginationIdentityErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateOriginationIdentityErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AssociateOriginationIdentityErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
AssociateOriginationIdentityErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateOriginationIdentityErrorKind::ValidationException(_inner) => Some(_inner),
AssociateOriginationIdentityErrorKind::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 _)
}
}