#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCostCategoryDefinitionError {
pub kind: UpdateCostCategoryDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCostCategoryDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCostCategoryDefinitionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCostCategoryDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
UpdateCostCategoryDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCostCategoryDefinitionError {
fn code(&self) -> Option<&str> {
UpdateCostCategoryDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCostCategoryDefinitionError {
pub fn new(kind: UpdateCostCategoryDefinitionErrorKind, 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: UpdateCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCostCategoryDefinitionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCostCategoryDefinitionErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCostCategoryDefinitionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_)
)
}
}
impl std::error::Error for UpdateCostCategoryDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
UpdateCostCategoryDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
#[allow(missing_docs)] pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCostAllocationTagsStatusError {
pub kind: UpdateCostAllocationTagsStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCostAllocationTagsStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCostAllocationTagsStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCostAllocationTagsStatusErrorKind {
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCostAllocationTagsStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCostAllocationTagsStatusErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
UpdateCostAllocationTagsStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCostAllocationTagsStatusError {
fn code(&self) -> Option<&str> {
UpdateCostAllocationTagsStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCostAllocationTagsStatusError {
pub fn new(
kind: UpdateCostAllocationTagsStatusErrorKind,
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: UpdateCostAllocationTagsStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCostAllocationTagsStatusErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCostAllocationTagsStatusErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for UpdateCostAllocationTagsStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCostAllocationTagsStatusErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateCostAllocationTagsStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAnomalySubscriptionError {
pub kind: UpdateAnomalySubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAnomalySubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAnomalySubscriptionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
UnknownMonitorException(crate::error::UnknownMonitorException),
UnknownSubscriptionException(crate::error::UnknownSubscriptionException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAnomalySubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAnomalySubscriptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateAnomalySubscriptionErrorKind::UnknownMonitorException(_inner) => _inner.fmt(f),
UpdateAnomalySubscriptionErrorKind::UnknownSubscriptionException(_inner) => {
_inner.fmt(f)
}
UpdateAnomalySubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAnomalySubscriptionError {
fn code(&self) -> Option<&str> {
UpdateAnomalySubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAnomalySubscriptionError {
pub fn new(kind: UpdateAnomalySubscriptionErrorKind, 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: UpdateAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAnomalySubscriptionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAnomalySubscriptionErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_monitor_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAnomalySubscriptionErrorKind::UnknownMonitorException(_)
)
}
pub fn is_unknown_subscription_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAnomalySubscriptionErrorKind::UnknownSubscriptionException(_)
)
}
}
impl std::error::Error for UpdateAnomalySubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAnomalySubscriptionErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateAnomalySubscriptionErrorKind::UnknownMonitorException(_inner) => Some(_inner),
UpdateAnomalySubscriptionErrorKind::UnknownSubscriptionException(_inner) => {
Some(_inner)
}
UpdateAnomalySubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnknownSubscriptionException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnknownSubscriptionException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnknownSubscriptionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnknownSubscriptionException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for UnknownSubscriptionException {}
pub mod unknown_subscription_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnknownSubscriptionException {
crate::error::UnknownSubscriptionException {
message: self.message,
}
}
}
}
impl UnknownSubscriptionException {
pub fn builder() -> crate::error::unknown_subscription_exception::Builder {
crate::error::unknown_subscription_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnknownMonitorException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnknownMonitorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnknownMonitorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnknownMonitorException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for UnknownMonitorException {}
pub mod unknown_monitor_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnknownMonitorException {
crate::error::UnknownMonitorException {
message: self.message,
}
}
}
}
impl UnknownMonitorException {
pub fn builder() -> crate::error::unknown_monitor_exception::Builder {
crate::error::unknown_monitor_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAnomalyMonitorError {
pub kind: UpdateAnomalyMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAnomalyMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAnomalyMonitorErrorKind {
LimitExceededException(crate::error::LimitExceededException),
UnknownMonitorException(crate::error::UnknownMonitorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAnomalyMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAnomalyMonitorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateAnomalyMonitorErrorKind::UnknownMonitorException(_inner) => _inner.fmt(f),
UpdateAnomalyMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAnomalyMonitorError {
fn code(&self) -> Option<&str> {
UpdateAnomalyMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAnomalyMonitorError {
pub fn new(kind: UpdateAnomalyMonitorErrorKind, 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: UpdateAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAnomalyMonitorErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAnomalyMonitorErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_monitor_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAnomalyMonitorErrorKind::UnknownMonitorException(_)
)
}
}
impl std::error::Error for UpdateAnomalyMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAnomalyMonitorErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateAnomalyMonitorErrorKind::UnknownMonitorException(_inner) => Some(_inner),
UpdateAnomalyMonitorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::LimitExceededException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::TooManyTagsException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyTagsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
}
impl TooManyTagsException {
#[allow(missing_docs)] pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl TooManyTagsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyTagsException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyTagsException {}
pub mod too_many_tags_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::TooManyTagsException {
crate::error::TooManyTagsException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl TooManyTagsException {
pub fn builder() -> crate::error::too_many_tags_exception::Builder {
crate::error::too_many_tags_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartSavingsPlansPurchaseRecommendationGenerationError {
pub kind: StartSavingsPlansPurchaseRecommendationGenerationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for StartSavingsPlansPurchaseRecommendationGenerationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartSavingsPlansPurchaseRecommendationGenerationErrorKind {
GenerationExistsException(crate::error::GenerationExistsException),
LimitExceededException(crate::error::LimitExceededException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartSavingsPlansPurchaseRecommendationGenerationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::GenerationExistsException(_inner) =>
_inner.fmt(f)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_inner) =>
_inner.fmt(f)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::ServiceQuotaExceededException(_inner) =>
_inner.fmt(f)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for StartSavingsPlansPurchaseRecommendationGenerationError
{
fn code(&self) -> Option<&str> {
StartSavingsPlansPurchaseRecommendationGenerationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartSavingsPlansPurchaseRecommendationGenerationError {
pub fn new(
kind: StartSavingsPlansPurchaseRecommendationGenerationErrorKind,
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: StartSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartSavingsPlansPurchaseRecommendationGenerationErrorKind::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_generation_exists_exception(&self) -> bool {
matches!(
&self.kind,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::GenerationExistsException(
_
)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(&self.kind, StartSavingsPlansPurchaseRecommendationGenerationErrorKind::ServiceQuotaExceededException(_))
}
}
impl std::error::Error for StartSavingsPlansPurchaseRecommendationGenerationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::GenerationExistsException(_inner) =>
Some(_inner)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_inner) =>
Some(_inner)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::ServiceQuotaExceededException(_inner) =>
Some(_inner)
,
StartSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GenerationExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl GenerationExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GenerationExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GenerationExistsException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for GenerationExistsException {}
pub mod generation_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::GenerationExistsException {
crate::error::GenerationExistsException {
message: self.message,
}
}
}
}
impl GenerationExistsException {
pub fn builder() -> crate::error::generation_exists_exception::Builder {
crate::error::generation_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ProvideAnomalyFeedbackError {
pub kind: ProvideAnomalyFeedbackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ProvideAnomalyFeedbackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ProvideAnomalyFeedbackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ProvideAnomalyFeedbackErrorKind {
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ProvideAnomalyFeedbackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ProvideAnomalyFeedbackErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ProvideAnomalyFeedbackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ProvideAnomalyFeedbackError {
fn code(&self) -> Option<&str> {
ProvideAnomalyFeedbackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ProvideAnomalyFeedbackError {
pub fn new(kind: ProvideAnomalyFeedbackErrorKind, 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: ProvideAnomalyFeedbackErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ProvideAnomalyFeedbackErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ProvideAnomalyFeedbackErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for ProvideAnomalyFeedbackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ProvideAnomalyFeedbackErrorKind::LimitExceededException(_inner) => Some(_inner),
ProvideAnomalyFeedbackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSavingsPlansPurchaseRecommendationGenerationError {
pub kind: ListSavingsPlansPurchaseRecommendationGenerationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListSavingsPlansPurchaseRecommendationGenerationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSavingsPlansPurchaseRecommendationGenerationErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSavingsPlansPurchaseRecommendationGenerationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::InvalidNextTokenException(_inner) =>
_inner.fmt(f)
,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_inner) =>
_inner.fmt(f)
,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for ListSavingsPlansPurchaseRecommendationGenerationError
{
fn code(&self) -> Option<&str> {
ListSavingsPlansPurchaseRecommendationGenerationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSavingsPlansPurchaseRecommendationGenerationError {
pub fn new(
kind: ListSavingsPlansPurchaseRecommendationGenerationErrorKind,
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: ListSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSavingsPlansPurchaseRecommendationGenerationErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for ListSavingsPlansPurchaseRecommendationGenerationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::InvalidNextTokenException(_inner) =>
Some(_inner)
,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::LimitExceededException(_inner) =>
Some(_inner)
,
ListSavingsPlansPurchaseRecommendationGenerationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[allow(missing_docs)] #[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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::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::fmt::Debug)]
pub struct ListCostCategoryDefinitionsError {
pub kind: ListCostCategoryDefinitionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCostCategoryDefinitionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCostCategoryDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCostCategoryDefinitionsErrorKind {
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCostCategoryDefinitionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCostCategoryDefinitionsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListCostCategoryDefinitionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCostCategoryDefinitionsError {
fn code(&self) -> Option<&str> {
ListCostCategoryDefinitionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCostCategoryDefinitionsError {
pub fn new(kind: ListCostCategoryDefinitionsErrorKind, 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: ListCostCategoryDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCostCategoryDefinitionsErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListCostCategoryDefinitionsErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for ListCostCategoryDefinitionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCostCategoryDefinitionsErrorKind::LimitExceededException(_inner) => Some(_inner),
ListCostCategoryDefinitionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCostAllocationTagsError {
pub kind: ListCostAllocationTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCostAllocationTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCostAllocationTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCostAllocationTagsErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCostAllocationTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCostAllocationTagsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListCostAllocationTagsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListCostAllocationTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCostAllocationTagsError {
fn code(&self) -> Option<&str> {
ListCostAllocationTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCostAllocationTagsError {
pub fn new(kind: ListCostAllocationTagsErrorKind, 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: ListCostAllocationTagsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCostAllocationTagsErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCostAllocationTagsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListCostAllocationTagsErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for ListCostAllocationTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCostAllocationTagsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListCostAllocationTagsErrorKind::LimitExceededException(_inner) => Some(_inner),
ListCostAllocationTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetUsageForecastError {
pub kind: GetUsageForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetUsageForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetUsageForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetUsageForecastErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
LimitExceededException(crate::error::LimitExceededException),
UnresolvableUsageUnitException(crate::error::UnresolvableUsageUnitException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetUsageForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetUsageForecastErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetUsageForecastErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetUsageForecastErrorKind::UnresolvableUsageUnitException(_inner) => _inner.fmt(f),
GetUsageForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetUsageForecastError {
fn code(&self) -> Option<&str> {
GetUsageForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetUsageForecastError {
pub fn new(kind: GetUsageForecastErrorKind, 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: GetUsageForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetUsageForecastErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetUsageForecastErrorKind::DataUnavailableException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetUsageForecastErrorKind::LimitExceededException(_)
)
}
pub fn is_unresolvable_usage_unit_exception(&self) -> bool {
matches!(
&self.kind,
GetUsageForecastErrorKind::UnresolvableUsageUnitException(_)
)
}
}
impl std::error::Error for GetUsageForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetUsageForecastErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetUsageForecastErrorKind::LimitExceededException(_inner) => Some(_inner),
GetUsageForecastErrorKind::UnresolvableUsageUnitException(_inner) => Some(_inner),
GetUsageForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnresolvableUsageUnitException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnresolvableUsageUnitException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnresolvableUsageUnitException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnresolvableUsageUnitException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for UnresolvableUsageUnitException {}
pub mod unresolvable_usage_unit_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::UnresolvableUsageUnitException {
crate::error::UnresolvableUsageUnitException {
message: self.message,
}
}
}
}
impl UnresolvableUsageUnitException {
pub fn builder() -> crate::error::unresolvable_usage_unit_exception::Builder {
crate::error::unresolvable_usage_unit_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DataUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DataUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DataUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DataUnavailableException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for DataUnavailableException {}
pub mod data_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::DataUnavailableException {
crate::error::DataUnavailableException {
message: self.message,
}
}
}
}
impl DataUnavailableException {
pub fn builder() -> crate::error::data_unavailable_exception::Builder {
crate::error::data_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTagsError {
pub kind: GetTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTagsErrorKind {
BillExpirationException(crate::error::BillExpirationException),
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
RequestChangedException(crate::error::RequestChangedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTagsErrorKind::BillExpirationException(_inner) => _inner.fmt(f),
GetTagsErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetTagsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetTagsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetTagsErrorKind::RequestChangedException(_inner) => _inner.fmt(f),
GetTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTagsError {
fn code(&self) -> Option<&str> {
GetTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTagsError {
pub fn new(kind: GetTagsErrorKind, 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: GetTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTagsErrorKind::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_bill_expiration_exception(&self) -> bool {
matches!(&self.kind, GetTagsErrorKind::BillExpirationException(_))
}
pub fn is_data_unavailable_exception(&self) -> bool {
matches!(&self.kind, GetTagsErrorKind::DataUnavailableException(_))
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(&self.kind, GetTagsErrorKind::InvalidNextTokenException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, GetTagsErrorKind::LimitExceededException(_))
}
pub fn is_request_changed_exception(&self) -> bool {
matches!(&self.kind, GetTagsErrorKind::RequestChangedException(_))
}
}
impl std::error::Error for GetTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTagsErrorKind::BillExpirationException(_inner) => Some(_inner),
GetTagsErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetTagsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetTagsErrorKind::LimitExceededException(_inner) => Some(_inner),
GetTagsErrorKind::RequestChangedException(_inner) => Some(_inner),
GetTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestChangedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RequestChangedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestChangedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestChangedException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestChangedException {}
pub mod request_changed_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RequestChangedException {
crate::error::RequestChangedException {
message: self.message,
}
}
}
}
impl RequestChangedException {
pub fn builder() -> crate::error::request_changed_exception::Builder {
crate::error::request_changed_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BillExpirationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BillExpirationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BillExpirationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BillExpirationException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for BillExpirationException {}
pub mod bill_expiration_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::BillExpirationException {
crate::error::BillExpirationException {
message: self.message,
}
}
}
}
impl BillExpirationException {
pub fn builder() -> crate::error::bill_expiration_exception::Builder {
crate::error::bill_expiration_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSavingsPlansUtilizationDetailsError {
pub kind: GetSavingsPlansUtilizationDetailsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSavingsPlansUtilizationDetailsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSavingsPlansUtilizationDetailsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSavingsPlansUtilizationDetailsErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSavingsPlansUtilizationDetailsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSavingsPlansUtilizationDetailsErrorKind::DataUnavailableException(_inner) => {
_inner.fmt(f)
}
GetSavingsPlansUtilizationDetailsErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
GetSavingsPlansUtilizationDetailsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
GetSavingsPlansUtilizationDetailsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSavingsPlansUtilizationDetailsError {
fn code(&self) -> Option<&str> {
GetSavingsPlansUtilizationDetailsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSavingsPlansUtilizationDetailsError {
pub fn new(
kind: GetSavingsPlansUtilizationDetailsErrorKind,
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: GetSavingsPlansUtilizationDetailsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSavingsPlansUtilizationDetailsErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansUtilizationDetailsErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansUtilizationDetailsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansUtilizationDetailsErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetSavingsPlansUtilizationDetailsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSavingsPlansUtilizationDetailsErrorKind::DataUnavailableException(_inner) => {
Some(_inner)
}
GetSavingsPlansUtilizationDetailsErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
GetSavingsPlansUtilizationDetailsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
GetSavingsPlansUtilizationDetailsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSavingsPlansUtilizationError {
pub kind: GetSavingsPlansUtilizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSavingsPlansUtilizationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSavingsPlansUtilizationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSavingsPlansUtilizationErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSavingsPlansUtilizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSavingsPlansUtilizationErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetSavingsPlansUtilizationErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetSavingsPlansUtilizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSavingsPlansUtilizationError {
fn code(&self) -> Option<&str> {
GetSavingsPlansUtilizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSavingsPlansUtilizationError {
pub fn new(kind: GetSavingsPlansUtilizationErrorKind, 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: GetSavingsPlansUtilizationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSavingsPlansUtilizationErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansUtilizationErrorKind::DataUnavailableException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansUtilizationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetSavingsPlansUtilizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSavingsPlansUtilizationErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetSavingsPlansUtilizationErrorKind::LimitExceededException(_inner) => Some(_inner),
GetSavingsPlansUtilizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSavingsPlansPurchaseRecommendationError {
pub kind: GetSavingsPlansPurchaseRecommendationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSavingsPlansPurchaseRecommendationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSavingsPlansPurchaseRecommendationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSavingsPlansPurchaseRecommendationErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSavingsPlansPurchaseRecommendationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSavingsPlansPurchaseRecommendationErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
GetSavingsPlansPurchaseRecommendationErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
GetSavingsPlansPurchaseRecommendationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSavingsPlansPurchaseRecommendationError {
fn code(&self) -> Option<&str> {
GetSavingsPlansPurchaseRecommendationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSavingsPlansPurchaseRecommendationError {
pub fn new(
kind: GetSavingsPlansPurchaseRecommendationErrorKind,
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: GetSavingsPlansPurchaseRecommendationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSavingsPlansPurchaseRecommendationErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansPurchaseRecommendationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansPurchaseRecommendationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetSavingsPlansPurchaseRecommendationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSavingsPlansPurchaseRecommendationErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
GetSavingsPlansPurchaseRecommendationErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
GetSavingsPlansPurchaseRecommendationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSavingsPlansCoverageError {
pub kind: GetSavingsPlansCoverageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSavingsPlansCoverageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSavingsPlansCoverageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSavingsPlansCoverageErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSavingsPlansCoverageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSavingsPlansCoverageErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetSavingsPlansCoverageErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetSavingsPlansCoverageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetSavingsPlansCoverageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSavingsPlansCoverageError {
fn code(&self) -> Option<&str> {
GetSavingsPlansCoverageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSavingsPlansCoverageError {
pub fn new(kind: GetSavingsPlansCoverageErrorKind, 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: GetSavingsPlansCoverageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSavingsPlansCoverageErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansCoverageErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansCoverageErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSavingsPlansCoverageErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetSavingsPlansCoverageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSavingsPlansCoverageErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetSavingsPlansCoverageErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetSavingsPlansCoverageErrorKind::LimitExceededException(_inner) => Some(_inner),
GetSavingsPlansCoverageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRightsizingRecommendationError {
pub kind: GetRightsizingRecommendationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRightsizingRecommendationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRightsizingRecommendationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRightsizingRecommendationErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRightsizingRecommendationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRightsizingRecommendationErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
GetRightsizingRecommendationErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetRightsizingRecommendationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRightsizingRecommendationError {
fn code(&self) -> Option<&str> {
GetRightsizingRecommendationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRightsizingRecommendationError {
pub fn new(kind: GetRightsizingRecommendationErrorKind, 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: GetRightsizingRecommendationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRightsizingRecommendationErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetRightsizingRecommendationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetRightsizingRecommendationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetRightsizingRecommendationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRightsizingRecommendationErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
GetRightsizingRecommendationErrorKind::LimitExceededException(_inner) => Some(_inner),
GetRightsizingRecommendationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetReservationUtilizationError {
pub kind: GetReservationUtilizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetReservationUtilizationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetReservationUtilizationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetReservationUtilizationErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetReservationUtilizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetReservationUtilizationErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetReservationUtilizationErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetReservationUtilizationErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetReservationUtilizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetReservationUtilizationError {
fn code(&self) -> Option<&str> {
GetReservationUtilizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetReservationUtilizationError {
pub fn new(kind: GetReservationUtilizationErrorKind, 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: GetReservationUtilizationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetReservationUtilizationErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationUtilizationErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationUtilizationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationUtilizationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetReservationUtilizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetReservationUtilizationErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetReservationUtilizationErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetReservationUtilizationErrorKind::LimitExceededException(_inner) => Some(_inner),
GetReservationUtilizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetReservationPurchaseRecommendationError {
pub kind: GetReservationPurchaseRecommendationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetReservationPurchaseRecommendationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetReservationPurchaseRecommendationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetReservationPurchaseRecommendationErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetReservationPurchaseRecommendationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetReservationPurchaseRecommendationErrorKind::DataUnavailableException(_inner) => {
_inner.fmt(f)
}
GetReservationPurchaseRecommendationErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
GetReservationPurchaseRecommendationErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
GetReservationPurchaseRecommendationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetReservationPurchaseRecommendationError {
fn code(&self) -> Option<&str> {
GetReservationPurchaseRecommendationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetReservationPurchaseRecommendationError {
pub fn new(
kind: GetReservationPurchaseRecommendationErrorKind,
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: GetReservationPurchaseRecommendationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetReservationPurchaseRecommendationErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationPurchaseRecommendationErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationPurchaseRecommendationErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationPurchaseRecommendationErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetReservationPurchaseRecommendationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetReservationPurchaseRecommendationErrorKind::DataUnavailableException(_inner) => {
Some(_inner)
}
GetReservationPurchaseRecommendationErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
GetReservationPurchaseRecommendationErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
GetReservationPurchaseRecommendationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetReservationCoverageError {
pub kind: GetReservationCoverageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetReservationCoverageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetReservationCoverageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetReservationCoverageErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetReservationCoverageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetReservationCoverageErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetReservationCoverageErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetReservationCoverageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetReservationCoverageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetReservationCoverageError {
fn code(&self) -> Option<&str> {
GetReservationCoverageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetReservationCoverageError {
pub fn new(kind: GetReservationCoverageErrorKind, 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: GetReservationCoverageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetReservationCoverageErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationCoverageErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationCoverageErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetReservationCoverageErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetReservationCoverageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetReservationCoverageErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetReservationCoverageErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetReservationCoverageErrorKind::LimitExceededException(_inner) => Some(_inner),
GetReservationCoverageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDimensionValuesError {
pub kind: GetDimensionValuesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDimensionValuesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDimensionValuesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDimensionValuesErrorKind {
BillExpirationException(crate::error::BillExpirationException),
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
RequestChangedException(crate::error::RequestChangedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDimensionValuesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDimensionValuesErrorKind::BillExpirationException(_inner) => _inner.fmt(f),
GetDimensionValuesErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetDimensionValuesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetDimensionValuesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetDimensionValuesErrorKind::RequestChangedException(_inner) => _inner.fmt(f),
GetDimensionValuesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDimensionValuesError {
fn code(&self) -> Option<&str> {
GetDimensionValuesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDimensionValuesError {
pub fn new(kind: GetDimensionValuesErrorKind, 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: GetDimensionValuesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDimensionValuesErrorKind::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_bill_expiration_exception(&self) -> bool {
matches!(
&self.kind,
GetDimensionValuesErrorKind::BillExpirationException(_)
)
}
pub fn is_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetDimensionValuesErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetDimensionValuesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetDimensionValuesErrorKind::LimitExceededException(_)
)
}
pub fn is_request_changed_exception(&self) -> bool {
matches!(
&self.kind,
GetDimensionValuesErrorKind::RequestChangedException(_)
)
}
}
impl std::error::Error for GetDimensionValuesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDimensionValuesErrorKind::BillExpirationException(_inner) => Some(_inner),
GetDimensionValuesErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetDimensionValuesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetDimensionValuesErrorKind::LimitExceededException(_inner) => Some(_inner),
GetDimensionValuesErrorKind::RequestChangedException(_inner) => Some(_inner),
GetDimensionValuesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCostForecastError {
pub kind: GetCostForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCostForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCostForecastErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCostForecastErrorKind {
DataUnavailableException(crate::error::DataUnavailableException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCostForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCostForecastErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetCostForecastErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetCostForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCostForecastError {
fn code(&self) -> Option<&str> {
GetCostForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCostForecastError {
pub fn new(kind: GetCostForecastErrorKind, 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: GetCostForecastErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCostForecastErrorKind::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_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetCostForecastErrorKind::DataUnavailableException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetCostForecastErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for GetCostForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCostForecastErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetCostForecastErrorKind::LimitExceededException(_inner) => Some(_inner),
GetCostForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCostCategoriesError {
pub kind: GetCostCategoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCostCategoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCostCategoriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCostCategoriesErrorKind {
BillExpirationException(crate::error::BillExpirationException),
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
RequestChangedException(crate::error::RequestChangedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCostCategoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCostCategoriesErrorKind::BillExpirationException(_inner) => _inner.fmt(f),
GetCostCategoriesErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetCostCategoriesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetCostCategoriesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetCostCategoriesErrorKind::RequestChangedException(_inner) => _inner.fmt(f),
GetCostCategoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCostCategoriesError {
fn code(&self) -> Option<&str> {
GetCostCategoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCostCategoriesError {
pub fn new(kind: GetCostCategoriesErrorKind, 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: GetCostCategoriesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCostCategoriesErrorKind::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_bill_expiration_exception(&self) -> bool {
matches!(
&self.kind,
GetCostCategoriesErrorKind::BillExpirationException(_)
)
}
pub fn is_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetCostCategoriesErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetCostCategoriesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetCostCategoriesErrorKind::LimitExceededException(_)
)
}
pub fn is_request_changed_exception(&self) -> bool {
matches!(
&self.kind,
GetCostCategoriesErrorKind::RequestChangedException(_)
)
}
}
impl std::error::Error for GetCostCategoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCostCategoriesErrorKind::BillExpirationException(_inner) => Some(_inner),
GetCostCategoriesErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetCostCategoriesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetCostCategoriesErrorKind::LimitExceededException(_inner) => Some(_inner),
GetCostCategoriesErrorKind::RequestChangedException(_inner) => Some(_inner),
GetCostCategoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCostAndUsageWithResourcesError {
pub kind: GetCostAndUsageWithResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCostAndUsageWithResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCostAndUsageWithResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCostAndUsageWithResourcesErrorKind {
BillExpirationException(crate::error::BillExpirationException),
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
RequestChangedException(crate::error::RequestChangedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCostAndUsageWithResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCostAndUsageWithResourcesErrorKind::BillExpirationException(_inner) => _inner.fmt(f),
GetCostAndUsageWithResourcesErrorKind::DataUnavailableException(_inner) => {
_inner.fmt(f)
}
GetCostAndUsageWithResourcesErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
GetCostAndUsageWithResourcesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetCostAndUsageWithResourcesErrorKind::RequestChangedException(_inner) => _inner.fmt(f),
GetCostAndUsageWithResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCostAndUsageWithResourcesError {
fn code(&self) -> Option<&str> {
GetCostAndUsageWithResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCostAndUsageWithResourcesError {
pub fn new(kind: GetCostAndUsageWithResourcesErrorKind, 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: GetCostAndUsageWithResourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCostAndUsageWithResourcesErrorKind::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_bill_expiration_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageWithResourcesErrorKind::BillExpirationException(_)
)
}
pub fn is_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageWithResourcesErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageWithResourcesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageWithResourcesErrorKind::LimitExceededException(_)
)
}
pub fn is_request_changed_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageWithResourcesErrorKind::RequestChangedException(_)
)
}
}
impl std::error::Error for GetCostAndUsageWithResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCostAndUsageWithResourcesErrorKind::BillExpirationException(_inner) => Some(_inner),
GetCostAndUsageWithResourcesErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetCostAndUsageWithResourcesErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
GetCostAndUsageWithResourcesErrorKind::LimitExceededException(_inner) => Some(_inner),
GetCostAndUsageWithResourcesErrorKind::RequestChangedException(_inner) => Some(_inner),
GetCostAndUsageWithResourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCostAndUsageError {
pub kind: GetCostAndUsageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCostAndUsageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCostAndUsageErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCostAndUsageErrorKind {
BillExpirationException(crate::error::BillExpirationException),
DataUnavailableException(crate::error::DataUnavailableException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
RequestChangedException(crate::error::RequestChangedException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCostAndUsageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCostAndUsageErrorKind::BillExpirationException(_inner) => _inner.fmt(f),
GetCostAndUsageErrorKind::DataUnavailableException(_inner) => _inner.fmt(f),
GetCostAndUsageErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetCostAndUsageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetCostAndUsageErrorKind::RequestChangedException(_inner) => _inner.fmt(f),
GetCostAndUsageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCostAndUsageError {
fn code(&self) -> Option<&str> {
GetCostAndUsageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCostAndUsageError {
pub fn new(kind: GetCostAndUsageErrorKind, 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: GetCostAndUsageErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCostAndUsageErrorKind::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_bill_expiration_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageErrorKind::BillExpirationException(_)
)
}
pub fn is_data_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageErrorKind::DataUnavailableException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageErrorKind::LimitExceededException(_)
)
}
pub fn is_request_changed_exception(&self) -> bool {
matches!(
&self.kind,
GetCostAndUsageErrorKind::RequestChangedException(_)
)
}
}
impl std::error::Error for GetCostAndUsageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCostAndUsageErrorKind::BillExpirationException(_inner) => Some(_inner),
GetCostAndUsageErrorKind::DataUnavailableException(_inner) => Some(_inner),
GetCostAndUsageErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetCostAndUsageErrorKind::LimitExceededException(_inner) => Some(_inner),
GetCostAndUsageErrorKind::RequestChangedException(_inner) => Some(_inner),
GetCostAndUsageErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAnomalySubscriptionsError {
pub kind: GetAnomalySubscriptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAnomalySubscriptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAnomalySubscriptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAnomalySubscriptionsErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
UnknownSubscriptionException(crate::error::UnknownSubscriptionException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAnomalySubscriptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAnomalySubscriptionsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetAnomalySubscriptionsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetAnomalySubscriptionsErrorKind::UnknownSubscriptionException(_inner) => _inner.fmt(f),
GetAnomalySubscriptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAnomalySubscriptionsError {
fn code(&self) -> Option<&str> {
GetAnomalySubscriptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAnomalySubscriptionsError {
pub fn new(kind: GetAnomalySubscriptionsErrorKind, 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: GetAnomalySubscriptionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAnomalySubscriptionsErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalySubscriptionsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalySubscriptionsErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_subscription_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalySubscriptionsErrorKind::UnknownSubscriptionException(_)
)
}
}
impl std::error::Error for GetAnomalySubscriptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAnomalySubscriptionsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetAnomalySubscriptionsErrorKind::LimitExceededException(_inner) => Some(_inner),
GetAnomalySubscriptionsErrorKind::UnknownSubscriptionException(_inner) => Some(_inner),
GetAnomalySubscriptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAnomalyMonitorsError {
pub kind: GetAnomalyMonitorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAnomalyMonitorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAnomalyMonitorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAnomalyMonitorsErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
UnknownMonitorException(crate::error::UnknownMonitorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAnomalyMonitorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAnomalyMonitorsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetAnomalyMonitorsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetAnomalyMonitorsErrorKind::UnknownMonitorException(_inner) => _inner.fmt(f),
GetAnomalyMonitorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAnomalyMonitorsError {
fn code(&self) -> Option<&str> {
GetAnomalyMonitorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAnomalyMonitorsError {
pub fn new(kind: GetAnomalyMonitorsErrorKind, 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: GetAnomalyMonitorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAnomalyMonitorsErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalyMonitorsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalyMonitorsErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_monitor_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomalyMonitorsErrorKind::UnknownMonitorException(_)
)
}
}
impl std::error::Error for GetAnomalyMonitorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAnomalyMonitorsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetAnomalyMonitorsErrorKind::LimitExceededException(_inner) => Some(_inner),
GetAnomalyMonitorsErrorKind::UnknownMonitorException(_inner) => Some(_inner),
GetAnomalyMonitorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAnomaliesError {
pub kind: GetAnomaliesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAnomaliesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAnomaliesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAnomaliesErrorKind {
InvalidNextTokenException(crate::error::InvalidNextTokenException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAnomaliesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAnomaliesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
GetAnomaliesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
GetAnomaliesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAnomaliesError {
fn code(&self) -> Option<&str> {
GetAnomaliesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAnomaliesError {
pub fn new(kind: GetAnomaliesErrorKind, 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: GetAnomaliesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAnomaliesErrorKind::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_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
GetAnomaliesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, GetAnomaliesErrorKind::LimitExceededException(_))
}
}
impl std::error::Error for GetAnomaliesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAnomaliesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
GetAnomaliesErrorKind::LimitExceededException(_inner) => Some(_inner),
GetAnomaliesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCostCategoryDefinitionError {
pub kind: DescribeCostCategoryDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCostCategoryDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCostCategoryDefinitionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCostCategoryDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
DescribeCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeCostCategoryDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCostCategoryDefinitionError {
fn code(&self) -> Option<&str> {
DescribeCostCategoryDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCostCategoryDefinitionError {
pub fn new(
kind: DescribeCostCategoryDefinitionErrorKind,
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: DescribeCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCostCategoryDefinitionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCostCategoryDefinitionErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCostCategoryDefinitionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeCostCategoryDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => Some(_inner),
DescribeCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeCostCategoryDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCostCategoryDefinitionError {
pub kind: DeleteCostCategoryDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCostCategoryDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCostCategoryDefinitionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCostCategoryDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
DeleteCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCostCategoryDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCostCategoryDefinitionError {
fn code(&self) -> Option<&str> {
DeleteCostCategoryDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCostCategoryDefinitionError {
pub fn new(kind: DeleteCostCategoryDefinitionErrorKind, 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: DeleteCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCostCategoryDefinitionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCostCategoryDefinitionErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCostCategoryDefinitionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteCostCategoryDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => Some(_inner),
DeleteCostCategoryDefinitionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteCostCategoryDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAnomalySubscriptionError {
pub kind: DeleteAnomalySubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAnomalySubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAnomalySubscriptionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
UnknownSubscriptionException(crate::error::UnknownSubscriptionException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAnomalySubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAnomalySubscriptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
DeleteAnomalySubscriptionErrorKind::UnknownSubscriptionException(_inner) => {
_inner.fmt(f)
}
DeleteAnomalySubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAnomalySubscriptionError {
fn code(&self) -> Option<&str> {
DeleteAnomalySubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAnomalySubscriptionError {
pub fn new(kind: DeleteAnomalySubscriptionErrorKind, 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: DeleteAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAnomalySubscriptionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalySubscriptionErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_subscription_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalySubscriptionErrorKind::UnknownSubscriptionException(_)
)
}
}
impl std::error::Error for DeleteAnomalySubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAnomalySubscriptionErrorKind::LimitExceededException(_inner) => Some(_inner),
DeleteAnomalySubscriptionErrorKind::UnknownSubscriptionException(_inner) => {
Some(_inner)
}
DeleteAnomalySubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAnomalyMonitorError {
pub kind: DeleteAnomalyMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAnomalyMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAnomalyMonitorErrorKind {
LimitExceededException(crate::error::LimitExceededException),
UnknownMonitorException(crate::error::UnknownMonitorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAnomalyMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAnomalyMonitorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
DeleteAnomalyMonitorErrorKind::UnknownMonitorException(_inner) => _inner.fmt(f),
DeleteAnomalyMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAnomalyMonitorError {
fn code(&self) -> Option<&str> {
DeleteAnomalyMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAnomalyMonitorError {
pub fn new(kind: DeleteAnomalyMonitorErrorKind, 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: DeleteAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAnomalyMonitorErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyMonitorErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_monitor_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyMonitorErrorKind::UnknownMonitorException(_)
)
}
}
impl std::error::Error for DeleteAnomalyMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAnomalyMonitorErrorKind::LimitExceededException(_inner) => Some(_inner),
DeleteAnomalyMonitorErrorKind::UnknownMonitorException(_inner) => Some(_inner),
DeleteAnomalyMonitorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCostCategoryDefinitionError {
pub kind: CreateCostCategoryDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCostCategoryDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCostCategoryDefinitionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCostCategoryDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateCostCategoryDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCostCategoryDefinitionError {
fn code(&self) -> Option<&str> {
CreateCostCategoryDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCostCategoryDefinitionError {
pub fn new(kind: CreateCostCategoryDefinitionErrorKind, 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: CreateCostCategoryDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCostCategoryDefinitionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCostCategoryDefinitionErrorKind::LimitExceededException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_)
)
}
}
impl std::error::Error for CreateCostCategoryDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCostCategoryDefinitionErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateCostCategoryDefinitionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateCostCategoryDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAnomalySubscriptionError {
pub kind: CreateAnomalySubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAnomalySubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAnomalySubscriptionErrorKind {
LimitExceededException(crate::error::LimitExceededException),
UnknownMonitorException(crate::error::UnknownMonitorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAnomalySubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAnomalySubscriptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAnomalySubscriptionErrorKind::UnknownMonitorException(_inner) => _inner.fmt(f),
CreateAnomalySubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAnomalySubscriptionError {
fn code(&self) -> Option<&str> {
CreateAnomalySubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAnomalySubscriptionError {
pub fn new(kind: CreateAnomalySubscriptionErrorKind, 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: CreateAnomalySubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAnomalySubscriptionErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAnomalySubscriptionErrorKind::LimitExceededException(_)
)
}
pub fn is_unknown_monitor_exception(&self) -> bool {
matches!(
&self.kind,
CreateAnomalySubscriptionErrorKind::UnknownMonitorException(_)
)
}
}
impl std::error::Error for CreateAnomalySubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAnomalySubscriptionErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAnomalySubscriptionErrorKind::UnknownMonitorException(_inner) => Some(_inner),
CreateAnomalySubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAnomalyMonitorError {
pub kind: CreateAnomalyMonitorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAnomalyMonitorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAnomalyMonitorErrorKind {
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAnomalyMonitorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAnomalyMonitorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAnomalyMonitorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAnomalyMonitorError {
fn code(&self) -> Option<&str> {
CreateAnomalyMonitorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAnomalyMonitorError {
pub fn new(kind: CreateAnomalyMonitorErrorKind, 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: CreateAnomalyMonitorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAnomalyMonitorErrorKind::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_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAnomalyMonitorErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateAnomalyMonitorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAnomalyMonitorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAnomalyMonitorErrorKind::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 _)
}
}