#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConfigurationSetEventDestinationError {
pub kind: UpdateConfigurationSetEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConfigurationSetEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConfigurationSetEventDestinationErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
UpdateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
UpdateConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
_inner.fmt(f)
}
UpdateConfigurationSetEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConfigurationSetEventDestinationError {
fn code(&self) -> Option<&str> {
UpdateConfigurationSetEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConfigurationSetEventDestinationError {
pub fn new(
kind: UpdateConfigurationSetEventDestinationErrorKind,
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: UpdateConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConfigurationSetEventDestinationErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConfigurationSetEventDestinationErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateConfigurationSetEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
UpdateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
UpdateConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
Some(_inner)
}
UpdateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
Some(_inner)
}
UpdateConfigurationSetEventDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyRequestsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyRequestsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyRequestsException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyRequestsException {}
pub mod too_many_requests_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::TooManyRequestsException {
crate::error::TooManyRequestsException {
message: self.message,
}
}
}
}
impl TooManyRequestsException {
pub fn builder() -> crate::error::too_many_requests_exception::Builder {
crate::error::too_many_requests_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for NotFoundException {}
pub mod not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) 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::NotFoundException {
crate::error::NotFoundException {
message: self.message,
}
}
}
}
impl NotFoundException {
pub fn builder() -> crate::error::not_found_exception::Builder {
crate::error::not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServiceErrorException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServiceErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceErrorException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServiceErrorException {}
pub mod internal_service_error_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::InternalServiceErrorException {
crate::error::InternalServiceErrorException {
message: self.message,
}
}
}
}
impl InternalServiceErrorException {
pub fn builder() -> crate::error::internal_service_error_exception::Builder {
crate::error::internal_service_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) 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::BadRequestException {
crate::error::BadRequestException {
message: self.message,
}
}
}
}
impl BadRequestException {
pub fn builder() -> crate::error::bad_request_exception::Builder {
crate::error::bad_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct 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 {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
TooManyRequestsException(crate::error::TooManyRequestsException),
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::BadRequestException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
SendVoiceMessageErrorKind::TooManyRequestsException(_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> {
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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
SendVoiceMessageErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for SendVoiceMessageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendVoiceMessageErrorKind::BadRequestException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::TooManyRequestsException(_inner) => Some(_inner),
SendVoiceMessageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListConfigurationSetsError {
pub kind: ListConfigurationSetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListConfigurationSetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListConfigurationSetsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListConfigurationSetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListConfigurationSetsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListConfigurationSetsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListConfigurationSetsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListConfigurationSetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListConfigurationSetsError {
fn code(&self) -> Option<&str> {
ListConfigurationSetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListConfigurationSetsError {
pub fn new(kind: ListConfigurationSetsErrorKind, 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: ListConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListConfigurationSetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListConfigurationSetsErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListConfigurationSetsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListConfigurationSetsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListConfigurationSetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListConfigurationSetsErrorKind::BadRequestException(_inner) => Some(_inner),
ListConfigurationSetsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListConfigurationSetsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListConfigurationSetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConfigurationSetEventDestinationsError {
pub kind: GetConfigurationSetEventDestinationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConfigurationSetEventDestinationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConfigurationSetEventDestinationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConfigurationSetEventDestinationsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConfigurationSetEventDestinationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConfigurationSetEventDestinationsErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
GetConfigurationSetEventDestinationsErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
GetConfigurationSetEventDestinationsErrorKind::NotFoundException(_inner) => {
_inner.fmt(f)
}
GetConfigurationSetEventDestinationsErrorKind::TooManyRequestsException(_inner) => {
_inner.fmt(f)
}
GetConfigurationSetEventDestinationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConfigurationSetEventDestinationsError {
fn code(&self) -> Option<&str> {
GetConfigurationSetEventDestinationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConfigurationSetEventDestinationsError {
pub fn new(
kind: GetConfigurationSetEventDestinationsErrorKind,
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: GetConfigurationSetEventDestinationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConfigurationSetEventDestinationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GetConfigurationSetEventDestinationsErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
GetConfigurationSetEventDestinationsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConfigurationSetEventDestinationsErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GetConfigurationSetEventDestinationsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GetConfigurationSetEventDestinationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConfigurationSetEventDestinationsErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
GetConfigurationSetEventDestinationsErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
GetConfigurationSetEventDestinationsErrorKind::NotFoundException(_inner) => {
Some(_inner)
}
GetConfigurationSetEventDestinationsErrorKind::TooManyRequestsException(_inner) => {
Some(_inner)
}
GetConfigurationSetEventDestinationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConfigurationSetEventDestinationError {
pub kind: DeleteConfigurationSetEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConfigurationSetEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConfigurationSetEventDestinationErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
DeleteConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
DeleteConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
_inner.fmt(f)
}
DeleteConfigurationSetEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConfigurationSetEventDestinationError {
fn code(&self) -> Option<&str> {
DeleteConfigurationSetEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConfigurationSetEventDestinationError {
pub fn new(
kind: DeleteConfigurationSetEventDestinationErrorKind,
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: DeleteConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetEventDestinationErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetEventDestinationErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteConfigurationSetEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
DeleteConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
DeleteConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
Some(_inner)
}
DeleteConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
Some(_inner)
}
DeleteConfigurationSetEventDestinationErrorKind::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 {
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
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::BadRequestException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteConfigurationSetErrorKind::TooManyRequestsException(_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> {
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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConfigurationSetErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DeleteConfigurationSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConfigurationSetErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteConfigurationSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConfigurationSetEventDestinationError {
pub kind: CreateConfigurationSetEventDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConfigurationSetEventDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConfigurationSetEventDestinationErrorKind {
AlreadyExistsException(crate::error::AlreadyExistsException),
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
LimitExceededException(crate::error::LimitExceededException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConfigurationSetEventDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConfigurationSetEventDestinationErrorKind::AlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
_inner.fmt(f)
}
CreateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
CreateConfigurationSetEventDestinationErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
_inner.fmt(f)
}
CreateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
_inner.fmt(f)
}
CreateConfigurationSetEventDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConfigurationSetEventDestinationError {
fn code(&self) -> Option<&str> {
CreateConfigurationSetEventDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConfigurationSetEventDestinationError {
pub fn new(
kind: CreateConfigurationSetEventDestinationErrorKind,
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: CreateConfigurationSetEventDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConfigurationSetEventDestinationErrorKind::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_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::AlreadyExistsException(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::LimitExceededException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::NotFoundException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateConfigurationSetEventDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConfigurationSetEventDestinationErrorKind::AlreadyExistsException(_inner) => {
Some(_inner)
}
CreateConfigurationSetEventDestinationErrorKind::BadRequestException(_inner) => {
Some(_inner)
}
CreateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
CreateConfigurationSetEventDestinationErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
CreateConfigurationSetEventDestinationErrorKind::NotFoundException(_inner) => {
Some(_inner)
}
CreateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(_inner) => {
Some(_inner)
}
CreateConfigurationSetEventDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_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>,
}
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::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AlreadyExistsException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for AlreadyExistsException {}
pub mod already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::AlreadyExistsException {
crate::error::AlreadyExistsException {
message: self.message,
}
}
}
}
impl AlreadyExistsException {
pub fn builder() -> crate::error::already_exists_exception::Builder {
crate::error::already_exists_exception::Builder::default()
}
}
#[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 {
AlreadyExistsException(crate::error::AlreadyExistsException),
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
LimitExceededException(crate::error::LimitExceededException),
TooManyRequestsException(crate::error::TooManyRequestsException),
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::AlreadyExistsException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateConfigurationSetErrorKind::TooManyRequestsException(_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> {
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_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::AlreadyExistsException(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::BadRequestException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::LimitExceededException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
CreateConfigurationSetErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for CreateConfigurationSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConfigurationSetErrorKind::AlreadyExistsException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::BadRequestException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateConfigurationSetErrorKind::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 _)
}
}