#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSubscriberError {
pub kind: UpdateSubscriberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSubscriberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSubscriberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSubscriberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSubscriberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateSubscriberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSubscriberError {
fn code(&self) -> Option<&str> {
UpdateSubscriberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSubscriberError {
pub fn new(kind: UpdateSubscriberErrorKind, 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: UpdateSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSubscriberErrorKind::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,
UpdateSubscriberErrorKind::AccessDeniedException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriberErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriberErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriberErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateSubscriberErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriberErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateSubscriberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSubscriberErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::DuplicateRecordException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateSubscriberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotFoundException {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::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 InvalidParameterException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalErrorException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalErrorException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalErrorException {}
pub mod internal_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalErrorException {
crate::error::InternalErrorException {
message: self.message,
}
}
}
}
impl InternalErrorException {
pub fn builder() -> crate::error::internal_error_exception::Builder {
crate::error::internal_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateRecordException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateRecordException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateRecordException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateRecordException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateRecordException {}
pub mod duplicate_record_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::DuplicateRecordException {
crate::error::DuplicateRecordException {
message: self.message,
}
}
}
}
impl DuplicateRecordException {
pub fn builder() -> crate::error::duplicate_record_exception::Builder {
crate::error::duplicate_record_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
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>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
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 UpdateNotificationError {
pub kind: UpdateNotificationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNotificationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNotificationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNotificationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateNotificationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNotificationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateNotificationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNotificationError {
fn code(&self) -> Option<&str> {
UpdateNotificationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNotificationError {
pub fn new(kind: UpdateNotificationErrorKind, 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: UpdateNotificationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNotificationErrorKind::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,
UpdateNotificationErrorKind::AccessDeniedException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotificationErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotificationErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotificationErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotificationErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNotificationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateNotificationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNotificationErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateNotificationErrorKind::DuplicateRecordException(_inner) => Some(_inner),
UpdateNotificationErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateNotificationErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateNotificationErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateNotificationErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateNotificationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBudgetActionError {
pub kind: UpdateBudgetActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBudgetActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBudgetActionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ResourceLockedException(crate::error::ResourceLockedException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBudgetActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBudgetActionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::ResourceLockedException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateBudgetActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBudgetActionError {
fn code(&self) -> Option<&str> {
UpdateBudgetActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBudgetActionError {
pub fn new(kind: UpdateBudgetActionErrorKind, 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: UpdateBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBudgetActionErrorKind::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,
UpdateBudgetActionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetActionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetActionErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetActionErrorKind::NotFoundException(_)
)
}
pub fn is_resource_locked_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetActionErrorKind::ResourceLockedException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetActionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateBudgetActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBudgetActionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::ResourceLockedException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateBudgetActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceLockedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceLockedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceLockedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceLockedException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceLockedException {}
pub mod resource_locked_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceLockedException {
crate::error::ResourceLockedException {
message: self.message,
}
}
}
}
impl ResourceLockedException {
pub fn builder() -> crate::error::resource_locked_exception::Builder {
crate::error::resource_locked_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBudgetError {
pub kind: UpdateBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateBudgetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateBudgetErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateBudgetErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateBudgetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBudgetError {
fn code(&self) -> Option<&str> {
UpdateBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateBudgetError {
pub fn new(kind: UpdateBudgetErrorKind, 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: UpdateBudgetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateBudgetErrorKind::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, UpdateBudgetErrorKind::AccessDeniedException(_))
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(&self.kind, UpdateBudgetErrorKind::InternalErrorException(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateBudgetErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateBudgetErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for UpdateBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateBudgetErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateBudgetErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateBudgetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExecuteBudgetActionError {
pub kind: ExecuteBudgetActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExecuteBudgetActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExecuteBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExecuteBudgetActionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ResourceLockedException(crate::error::ResourceLockedException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExecuteBudgetActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExecuteBudgetActionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::ResourceLockedException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ExecuteBudgetActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExecuteBudgetActionError {
fn code(&self) -> Option<&str> {
ExecuteBudgetActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExecuteBudgetActionError {
pub fn new(kind: ExecuteBudgetActionErrorKind, 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: ExecuteBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExecuteBudgetActionErrorKind::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,
ExecuteBudgetActionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteBudgetActionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteBudgetActionErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteBudgetActionErrorKind::NotFoundException(_)
)
}
pub fn is_resource_locked_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteBudgetActionErrorKind::ResourceLockedException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteBudgetActionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExecuteBudgetActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecuteBudgetActionErrorKind::AccessDeniedException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::InternalErrorException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::InvalidParameterException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::NotFoundException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::ResourceLockedException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::ThrottlingException(_inner) => Some(_inner),
ExecuteBudgetActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSubscribersForNotificationError {
pub kind: DescribeSubscribersForNotificationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSubscribersForNotificationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSubscribersForNotificationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSubscribersForNotificationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ExpiredNextTokenException(crate::error::ExpiredNextTokenException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSubscribersForNotificationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSubscribersForNotificationErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::ExpiredNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeSubscribersForNotificationErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DescribeSubscribersForNotificationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSubscribersForNotificationError {
fn code(&self) -> Option<&str> {
DescribeSubscribersForNotificationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSubscribersForNotificationError {
pub fn new(
kind: DescribeSubscribersForNotificationErrorKind,
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: DescribeSubscribersForNotificationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSubscribersForNotificationErrorKind::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,
DescribeSubscribersForNotificationErrorKind::AccessDeniedException(_)
)
}
pub fn is_expired_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::ExpiredNextTokenException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscribersForNotificationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeSubscribersForNotificationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSubscribersForNotificationErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::ExpiredNextTokenException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeSubscribersForNotificationErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DescribeSubscribersForNotificationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_token_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExpiredNextTokenException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ExpiredNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ExpiredNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ExpiredNextTokenException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ExpiredNextTokenException {}
pub mod expired_next_token_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ExpiredNextTokenException {
crate::error::ExpiredNextTokenException {
message: self.message,
}
}
}
}
impl ExpiredNextTokenException {
pub fn builder() -> crate::error::expired_next_token_exception::Builder {
crate::error::expired_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeNotificationsForBudgetError {
pub kind: DescribeNotificationsForBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeNotificationsForBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeNotificationsForBudgetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeNotificationsForBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ExpiredNextTokenException(crate::error::ExpiredNextTokenException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeNotificationsForBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeNotificationsForBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeNotificationsForBudgetErrorKind::ExpiredNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeNotificationsForBudgetErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeNotificationsForBudgetErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeNotificationsForBudgetErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeNotificationsForBudgetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeNotificationsForBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeNotificationsForBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeNotificationsForBudgetError {
fn code(&self) -> Option<&str> {
DescribeNotificationsForBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeNotificationsForBudgetError {
pub fn new(
kind: DescribeNotificationsForBudgetErrorKind,
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: DescribeNotificationsForBudgetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeNotificationsForBudgetErrorKind::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,
DescribeNotificationsForBudgetErrorKind::AccessDeniedException(_)
)
}
pub fn is_expired_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::ExpiredNextTokenException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationsForBudgetErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeNotificationsForBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeNotificationsForBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeNotificationsForBudgetErrorKind::ExpiredNextTokenException(_inner) => {
Some(_inner)
}
DescribeNotificationsForBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeNotificationsForBudgetErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeNotificationsForBudgetErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeNotificationsForBudgetErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeNotificationsForBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeNotificationsForBudgetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetsError {
pub kind: DescribeBudgetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ExpiredNextTokenException(crate::error::ExpiredNextTokenException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::ExpiredNextTokenException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetsError {
fn code(&self) -> Option<&str> {
DescribeBudgetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetsError {
pub fn new(kind: DescribeBudgetsErrorKind, 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: DescribeBudgetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetsErrorKind::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,
DescribeBudgetsErrorKind::AccessDeniedException(_)
)
}
pub fn is_expired_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetsErrorKind::ExpiredNextTokenException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetsErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetsErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DescribeBudgetsErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribeBudgetsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DescribeBudgetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetsErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::ExpiredNextTokenException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetPerformanceHistoryError {
pub kind: DescribeBudgetPerformanceHistoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetPerformanceHistoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetPerformanceHistoryErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetPerformanceHistoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ExpiredNextTokenException(crate::error::ExpiredNextTokenException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetPerformanceHistoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetPerformanceHistoryErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetPerformanceHistoryErrorKind::ExpiredNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetPerformanceHistoryErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetPerformanceHistoryErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetPerformanceHistoryErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetPerformanceHistoryErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetPerformanceHistoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetPerformanceHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetPerformanceHistoryError {
fn code(&self) -> Option<&str> {
DescribeBudgetPerformanceHistoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetPerformanceHistoryError {
pub fn new(
kind: DescribeBudgetPerformanceHistoryErrorKind,
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: DescribeBudgetPerformanceHistoryErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetPerformanceHistoryErrorKind::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,
DescribeBudgetPerformanceHistoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_expired_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::ExpiredNextTokenException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetPerformanceHistoryErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetPerformanceHistoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetPerformanceHistoryErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeBudgetPerformanceHistoryErrorKind::ExpiredNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetPerformanceHistoryErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DescribeBudgetPerformanceHistoryErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetPerformanceHistoryErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeBudgetPerformanceHistoryErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetPerformanceHistoryErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetPerformanceHistoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetNotificationsForAccountError {
pub kind: DescribeBudgetNotificationsForAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetNotificationsForAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetNotificationsForAccountErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetNotificationsForAccountErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ExpiredNextTokenException(crate::error::ExpiredNextTokenException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetNotificationsForAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetNotificationsForAccountErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::ExpiredNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::NotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetNotificationsForAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetNotificationsForAccountError {
fn code(&self) -> Option<&str> {
DescribeBudgetNotificationsForAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetNotificationsForAccountError {
pub fn new(
kind: DescribeBudgetNotificationsForAccountErrorKind,
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: DescribeBudgetNotificationsForAccountErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetNotificationsForAccountErrorKind::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,
DescribeBudgetNotificationsForAccountErrorKind::AccessDeniedException(_)
)
}
pub fn is_expired_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::ExpiredNextTokenException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetNotificationsForAccountErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetNotificationsForAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetNotificationsForAccountErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::ExpiredNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::NotFoundException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DescribeBudgetNotificationsForAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetActionsForBudgetError {
pub kind: DescribeBudgetActionsForBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetActionsForBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetActionsForBudgetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetActionsForBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetActionsForBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetActionsForBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeBudgetActionsForBudgetErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForBudgetErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForBudgetErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForBudgetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetActionsForBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetActionsForBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetActionsForBudgetError {
fn code(&self) -> Option<&str> {
DescribeBudgetActionsForBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetActionsForBudgetError {
pub fn new(
kind: DescribeBudgetActionsForBudgetErrorKind,
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: DescribeBudgetActionsForBudgetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetActionsForBudgetErrorKind::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,
DescribeBudgetActionsForBudgetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForBudgetErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForBudgetErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForBudgetErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForBudgetErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetActionsForBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetActionsForBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetActionsForBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeBudgetActionsForBudgetErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetActionsForBudgetErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeBudgetActionsForBudgetErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetActionsForBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetActionsForBudgetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetActionsForAccountError {
pub kind: DescribeBudgetActionsForAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetActionsForAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetActionsForAccountErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetActionsForAccountErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetActionsForAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetActionsForAccountErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForAccountErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForAccountErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForAccountErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionsForAccountErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetActionsForAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetActionsForAccountError {
fn code(&self) -> Option<&str> {
DescribeBudgetActionsForAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetActionsForAccountError {
pub fn new(
kind: DescribeBudgetActionsForAccountErrorKind,
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: DescribeBudgetActionsForAccountErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetActionsForAccountErrorKind::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,
DescribeBudgetActionsForAccountErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForAccountErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForAccountErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForAccountErrorKind::InvalidParameterException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionsForAccountErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetActionsForAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetActionsForAccountErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetActionsForAccountErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DescribeBudgetActionsForAccountErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetActionsForAccountErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeBudgetActionsForAccountErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetActionsForAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetActionHistoriesError {
pub kind: DescribeBudgetActionHistoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetActionHistoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetActionHistoriesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetActionHistoriesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetActionHistoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetActionHistoriesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeBudgetActionHistoriesErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeBudgetActionHistoriesErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionHistoriesErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
DescribeBudgetActionHistoriesErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetActionHistoriesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetActionHistoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetActionHistoriesError {
fn code(&self) -> Option<&str> {
DescribeBudgetActionHistoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetActionHistoriesError {
pub fn new(
kind: DescribeBudgetActionHistoriesErrorKind,
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: DescribeBudgetActionHistoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetActionHistoriesErrorKind::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,
DescribeBudgetActionHistoriesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionHistoriesErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionHistoriesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionHistoriesErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionHistoriesErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionHistoriesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetActionHistoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetActionHistoriesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetActionHistoriesErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeBudgetActionHistoriesErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
DescribeBudgetActionHistoriesErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
DescribeBudgetActionHistoriesErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetActionHistoriesErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetActionHistoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetActionError {
pub kind: DescribeBudgetActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetActionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetActionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeBudgetActionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeBudgetActionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeBudgetActionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetActionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetActionError {
fn code(&self) -> Option<&str> {
DescribeBudgetActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetActionError {
pub fn new(kind: DescribeBudgetActionErrorKind, 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: DescribeBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetActionErrorKind::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,
DescribeBudgetActionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetActionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeBudgetActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetActionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetActionErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeBudgetActionErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeBudgetActionErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetActionErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeBudgetError {
pub kind: DescribeBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeBudgetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeBudgetErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeBudgetErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeBudgetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeBudgetError {
fn code(&self) -> Option<&str> {
DescribeBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeBudgetError {
pub fn new(kind: DescribeBudgetErrorKind, 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: DescribeBudgetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeBudgetErrorKind::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,
DescribeBudgetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DescribeBudgetErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribeBudgetErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DescribeBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeBudgetErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeBudgetErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeBudgetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSubscriberError {
pub kind: DeleteSubscriberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSubscriberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSubscriberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSubscriberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSubscriberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteSubscriberErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteSubscriberErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteSubscriberErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteSubscriberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteSubscriberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSubscriberError {
fn code(&self) -> Option<&str> {
DeleteSubscriberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSubscriberError {
pub fn new(kind: DeleteSubscriberErrorKind, 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: DeleteSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSubscriberErrorKind::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,
DeleteSubscriberErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriberErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriberErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteSubscriberErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriberErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteSubscriberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSubscriberErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteSubscriberErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteSubscriberErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteSubscriberErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteSubscriberErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteSubscriberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteNotificationError {
pub kind: DeleteNotificationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteNotificationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteNotificationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteNotificationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteNotificationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteNotificationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteNotificationErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteNotificationErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteNotificationErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteNotificationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteNotificationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteNotificationError {
fn code(&self) -> Option<&str> {
DeleteNotificationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteNotificationError {
pub fn new(kind: DeleteNotificationErrorKind, 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: DeleteNotificationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteNotificationErrorKind::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,
DeleteNotificationErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotificationErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotificationErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotificationErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteNotificationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteNotificationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteNotificationErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteNotificationErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteNotificationErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteNotificationErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteNotificationErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteNotificationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBudgetActionError {
pub kind: DeleteBudgetActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBudgetActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBudgetActionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ResourceLockedException(crate::error::ResourceLockedException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBudgetActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBudgetActionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::ResourceLockedException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteBudgetActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBudgetActionError {
fn code(&self) -> Option<&str> {
DeleteBudgetActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBudgetActionError {
pub fn new(kind: DeleteBudgetActionErrorKind, 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: DeleteBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBudgetActionErrorKind::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,
DeleteBudgetActionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetActionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetActionErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetActionErrorKind::NotFoundException(_)
)
}
pub fn is_resource_locked_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetActionErrorKind::ResourceLockedException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetActionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteBudgetActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBudgetActionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::ResourceLockedException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteBudgetActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBudgetError {
pub kind: DeleteBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteBudgetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteBudgetErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteBudgetErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteBudgetErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBudgetError {
fn code(&self) -> Option<&str> {
DeleteBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteBudgetError {
pub fn new(kind: DeleteBudgetErrorKind, 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: DeleteBudgetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteBudgetErrorKind::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, DeleteBudgetErrorKind::AccessDeniedException(_))
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(&self.kind, DeleteBudgetErrorKind::InternalErrorException(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteBudgetErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteBudgetErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DeleteBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteBudgetErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteBudgetErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteBudgetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSubscriberError {
pub kind: CreateSubscriberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSubscriberError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSubscriberErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
CreationLimitExceededException(crate::error::CreationLimitExceededException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSubscriberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSubscriberErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::CreationLimitExceededException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateSubscriberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSubscriberError {
fn code(&self) -> Option<&str> {
CreateSubscriberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSubscriberError {
pub fn new(kind: CreateSubscriberErrorKind, 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: CreateSubscriberErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSubscriberErrorKind::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,
CreateSubscriberErrorKind::AccessDeniedException(_)
)
}
pub fn is_creation_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriberErrorKind::CreationLimitExceededException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriberErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriberErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriberErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, CreateSubscriberErrorKind::NotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriberErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateSubscriberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSubscriberErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateSubscriberErrorKind::CreationLimitExceededException(_inner) => Some(_inner),
CreateSubscriberErrorKind::DuplicateRecordException(_inner) => Some(_inner),
CreateSubscriberErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateSubscriberErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateSubscriberErrorKind::NotFoundException(_inner) => Some(_inner),
CreateSubscriberErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateSubscriberErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreationLimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CreationLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CreationLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CreationLimitExceededException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for CreationLimitExceededException {}
pub mod creation_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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::CreationLimitExceededException {
crate::error::CreationLimitExceededException {
message: self.message,
}
}
}
}
impl CreationLimitExceededException {
pub fn builder() -> crate::error::creation_limit_exceeded_exception::Builder {
crate::error::creation_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateNotificationError {
pub kind: CreateNotificationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateNotificationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateNotificationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateNotificationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
CreationLimitExceededException(crate::error::CreationLimitExceededException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateNotificationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateNotificationErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::CreationLimitExceededException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateNotificationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateNotificationError {
fn code(&self) -> Option<&str> {
CreateNotificationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateNotificationError {
pub fn new(kind: CreateNotificationErrorKind, 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: CreateNotificationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateNotificationErrorKind::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,
CreateNotificationErrorKind::AccessDeniedException(_)
)
}
pub fn is_creation_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::CreationLimitExceededException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateNotificationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateNotificationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateNotificationErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateNotificationErrorKind::CreationLimitExceededException(_inner) => Some(_inner),
CreateNotificationErrorKind::DuplicateRecordException(_inner) => Some(_inner),
CreateNotificationErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateNotificationErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateNotificationErrorKind::NotFoundException(_inner) => Some(_inner),
CreateNotificationErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateNotificationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBudgetActionError {
pub kind: CreateBudgetActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBudgetActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBudgetActionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
CreationLimitExceededException(crate::error::CreationLimitExceededException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
NotFoundException(crate::error::NotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBudgetActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBudgetActionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::CreationLimitExceededException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::NotFoundException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateBudgetActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBudgetActionError {
fn code(&self) -> Option<&str> {
CreateBudgetActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBudgetActionError {
pub fn new(kind: CreateBudgetActionErrorKind, 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: CreateBudgetActionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBudgetActionErrorKind::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,
CreateBudgetActionErrorKind::AccessDeniedException(_)
)
}
pub fn is_creation_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::CreationLimitExceededException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::InvalidParameterException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::NotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetActionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateBudgetActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBudgetActionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::CreationLimitExceededException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::DuplicateRecordException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::NotFoundException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateBudgetActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBudgetError {
pub kind: CreateBudgetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBudgetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateBudgetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBudgetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
CreationLimitExceededException(crate::error::CreationLimitExceededException),
DuplicateRecordException(crate::error::DuplicateRecordException),
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBudgetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateBudgetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::CreationLimitExceededException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::DuplicateRecordException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateBudgetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBudgetError {
fn code(&self) -> Option<&str> {
CreateBudgetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateBudgetError {
pub fn new(kind: CreateBudgetErrorKind, 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: CreateBudgetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateBudgetErrorKind::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, CreateBudgetErrorKind::AccessDeniedException(_))
}
pub fn is_creation_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetErrorKind::CreationLimitExceededException(_)
)
}
pub fn is_duplicate_record_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetErrorKind::DuplicateRecordException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(&self.kind, CreateBudgetErrorKind::InternalErrorException(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateBudgetErrorKind::InvalidParameterException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateBudgetErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for CreateBudgetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateBudgetErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateBudgetErrorKind::CreationLimitExceededException(_inner) => Some(_inner),
CreateBudgetErrorKind::DuplicateRecordException(_inner) => Some(_inner),
CreateBudgetErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateBudgetErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateBudgetErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateBudgetErrorKind::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 _)
}
}