#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAlarmsError {
pub kind: DeleteAlarmsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAlarmsErrorKind {
ResourceNotFound(crate::error::ResourceNotFound),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteAlarmsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAlarmsErrorKind::ResourceNotFound(_inner) => _inner.fmt(f),
DeleteAlarmsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAlarmsError {
fn code(&self) -> Option<&str> {
DeleteAlarmsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAlarmsError {
pub fn new(kind: DeleteAlarmsErrorKind, 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: DeleteAlarmsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAlarmsErrorKind::Unhandled(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_resource_not_found(&self) -> bool {
matches!(&self.kind, DeleteAlarmsErrorKind::ResourceNotFound(_))
}
}
impl std::error::Error for DeleteAlarmsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAlarmsErrorKind::ResourceNotFound(_inner) => Some(_inner),
DeleteAlarmsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAnomalyDetectorError {
pub kind: DeleteAnomalyDetectorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAnomalyDetectorErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteAnomalyDetectorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAnomalyDetectorErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
DeleteAnomalyDetectorErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteAnomalyDetectorErrorKind::MissingRequiredParameterException(_inner) => {
_inner.fmt(f)
}
DeleteAnomalyDetectorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAnomalyDetectorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAnomalyDetectorError {
fn code(&self) -> Option<&str> {
DeleteAnomalyDetectorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAnomalyDetectorError {
pub fn new(kind: DeleteAnomalyDetectorErrorKind, 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: DeleteAnomalyDetectorErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAnomalyDetectorErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyDetectorErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyDetectorErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyDetectorErrorKind::MissingRequiredParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAnomalyDetectorErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteAnomalyDetectorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAnomalyDetectorErrorKind::InternalServiceFault(_inner) => Some(_inner),
DeleteAnomalyDetectorErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteAnomalyDetectorErrorKind::MissingRequiredParameterException(_inner) => {
Some(_inner)
}
DeleteAnomalyDetectorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAnomalyDetectorErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDashboardsError {
pub kind: DeleteDashboardsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDashboardsErrorKind {
DashboardNotFoundError(crate::error::DashboardNotFoundError),
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteDashboardsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDashboardsErrorKind::DashboardNotFoundError(_inner) => _inner.fmt(f),
DeleteDashboardsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
DeleteDashboardsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteDashboardsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDashboardsError {
fn code(&self) -> Option<&str> {
DeleteDashboardsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDashboardsError {
pub fn new(kind: DeleteDashboardsErrorKind, 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: DeleteDashboardsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDashboardsErrorKind::Unhandled(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_dashboard_not_found_error(&self) -> bool {
matches!(
&self.kind,
DeleteDashboardsErrorKind::DashboardNotFoundError(_)
)
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
DeleteDashboardsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDashboardsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DeleteDashboardsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDashboardsErrorKind::DashboardNotFoundError(_inner) => Some(_inner),
DeleteDashboardsErrorKind::InternalServiceFault(_inner) => Some(_inner),
DeleteDashboardsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteDashboardsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInsightRulesError {
pub kind: DeleteInsightRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInsightRulesErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteInsightRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInsightRulesErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteInsightRulesErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
DeleteInsightRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInsightRulesError {
fn code(&self) -> Option<&str> {
DeleteInsightRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteInsightRulesError {
pub fn new(kind: DeleteInsightRulesErrorKind, 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: DeleteInsightRulesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInsightRulesErrorKind::Unhandled(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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInsightRulesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInsightRulesErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for DeleteInsightRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInsightRulesErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteInsightRulesErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
DeleteInsightRulesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMetricStreamError {
pub kind: DeleteMetricStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMetricStreamErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteMetricStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMetricStreamErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
DeleteMetricStreamErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteMetricStreamErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
DeleteMetricStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMetricStreamError {
fn code(&self) -> Option<&str> {
DeleteMetricStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteMetricStreamError {
pub fn new(kind: DeleteMetricStreamErrorKind, 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: DeleteMetricStreamErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMetricStreamErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
DeleteMetricStreamErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMetricStreamErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteMetricStreamErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for DeleteMetricStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMetricStreamErrorKind::InternalServiceFault(_inner) => Some(_inner),
DeleteMetricStreamErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteMetricStreamErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
DeleteMetricStreamErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAlarmHistoryError {
pub kind: DescribeAlarmHistoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAlarmHistoryErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeAlarmHistoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAlarmHistoryErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeAlarmHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAlarmHistoryError {
fn code(&self) -> Option<&str> {
DescribeAlarmHistoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAlarmHistoryError {
pub fn new(kind: DescribeAlarmHistoryErrorKind, 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: DescribeAlarmHistoryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAlarmHistoryErrorKind::Unhandled(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(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmHistoryErrorKind::InvalidNextToken(_)
)
}
}
impl std::error::Error for DescribeAlarmHistoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAlarmHistoryErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeAlarmHistoryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAlarmsError {
pub kind: DescribeAlarmsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAlarmsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeAlarmsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAlarmsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeAlarmsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAlarmsError {
fn code(&self) -> Option<&str> {
DescribeAlarmsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAlarmsError {
pub fn new(kind: DescribeAlarmsErrorKind, 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: DescribeAlarmsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAlarmsErrorKind::Unhandled(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(&self) -> bool {
matches!(&self.kind, DescribeAlarmsErrorKind::InvalidNextToken(_))
}
}
impl std::error::Error for DescribeAlarmsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAlarmsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeAlarmsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAlarmsForMetricError {
pub kind: DescribeAlarmsForMetricErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAlarmsForMetricErrorKind {
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeAlarmsForMetricError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAlarmsForMetricErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAlarmsForMetricError {
fn code(&self) -> Option<&str> {
DescribeAlarmsForMetricError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAlarmsForMetricError {
pub fn new(kind: DescribeAlarmsForMetricErrorKind, 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: DescribeAlarmsForMetricErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAlarmsForMetricErrorKind::Unhandled(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()
}
}
impl std::error::Error for DescribeAlarmsForMetricError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAlarmsForMetricErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAnomalyDetectorsError {
pub kind: DescribeAnomalyDetectorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAnomalyDetectorsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidNextToken(crate::error::InvalidNextToken),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeAnomalyDetectorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAnomalyDetectorsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
DescribeAnomalyDetectorsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeAnomalyDetectorsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeAnomalyDetectorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAnomalyDetectorsError {
fn code(&self) -> Option<&str> {
DescribeAnomalyDetectorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAnomalyDetectorsError {
pub fn new(kind: DescribeAnomalyDetectorsErrorKind, 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: DescribeAnomalyDetectorsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAnomalyDetectorsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAnomalyDetectorsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeAnomalyDetectorsErrorKind::InvalidNextToken(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAnomalyDetectorsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeAnomalyDetectorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAnomalyDetectorsErrorKind::InternalServiceFault(_inner) => Some(_inner),
DescribeAnomalyDetectorsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeAnomalyDetectorsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeAnomalyDetectorsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeInsightRulesError {
pub kind: DescribeInsightRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeInsightRulesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeInsightRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeInsightRulesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeInsightRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeInsightRulesError {
fn code(&self) -> Option<&str> {
DescribeInsightRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeInsightRulesError {
pub fn new(kind: DescribeInsightRulesErrorKind, 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: DescribeInsightRulesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeInsightRulesErrorKind::Unhandled(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(&self) -> bool {
matches!(
&self.kind,
DescribeInsightRulesErrorKind::InvalidNextToken(_)
)
}
}
impl std::error::Error for DescribeInsightRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeInsightRulesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeInsightRulesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableAlarmActionsError {
pub kind: DisableAlarmActionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableAlarmActionsErrorKind {
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisableAlarmActionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableAlarmActionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableAlarmActionsError {
fn code(&self) -> Option<&str> {
DisableAlarmActionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableAlarmActionsError {
pub fn new(kind: DisableAlarmActionsErrorKind, 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: DisableAlarmActionsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableAlarmActionsErrorKind::Unhandled(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()
}
}
impl std::error::Error for DisableAlarmActionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableAlarmActionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableInsightRulesError {
pub kind: DisableInsightRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableInsightRulesErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisableInsightRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableInsightRulesErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DisableInsightRulesErrorKind::MissingRequiredParameterException(_inner) => {
_inner.fmt(f)
}
DisableInsightRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableInsightRulesError {
fn code(&self) -> Option<&str> {
DisableInsightRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableInsightRulesError {
pub fn new(kind: DisableInsightRulesErrorKind, 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: DisableInsightRulesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableInsightRulesErrorKind::Unhandled(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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DisableInsightRulesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DisableInsightRulesErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for DisableInsightRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableInsightRulesErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DisableInsightRulesErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
DisableInsightRulesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableAlarmActionsError {
pub kind: EnableAlarmActionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableAlarmActionsErrorKind {
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for EnableAlarmActionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableAlarmActionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableAlarmActionsError {
fn code(&self) -> Option<&str> {
EnableAlarmActionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableAlarmActionsError {
pub fn new(kind: EnableAlarmActionsErrorKind, 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: EnableAlarmActionsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableAlarmActionsErrorKind::Unhandled(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()
}
}
impl std::error::Error for EnableAlarmActionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableAlarmActionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableInsightRulesError {
pub kind: EnableInsightRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableInsightRulesErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for EnableInsightRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableInsightRulesErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
EnableInsightRulesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
EnableInsightRulesErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
EnableInsightRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableInsightRulesError {
fn code(&self) -> Option<&str> {
EnableInsightRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableInsightRulesError {
pub fn new(kind: EnableInsightRulesErrorKind, 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: EnableInsightRulesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableInsightRulesErrorKind::Unhandled(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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
EnableInsightRulesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
EnableInsightRulesErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
EnableInsightRulesErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for EnableInsightRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableInsightRulesErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
EnableInsightRulesErrorKind::LimitExceededException(_inner) => Some(_inner),
EnableInsightRulesErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
EnableInsightRulesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDashboardError {
pub kind: GetDashboardErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDashboardErrorKind {
DashboardNotFoundError(crate::error::DashboardNotFoundError),
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetDashboardError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDashboardErrorKind::DashboardNotFoundError(_inner) => _inner.fmt(f),
GetDashboardErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
GetDashboardErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetDashboardErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDashboardError {
fn code(&self) -> Option<&str> {
GetDashboardError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDashboardError {
pub fn new(kind: GetDashboardErrorKind, 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: GetDashboardErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDashboardErrorKind::Unhandled(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_dashboard_not_found_error(&self) -> bool {
matches!(&self.kind, GetDashboardErrorKind::DashboardNotFoundError(_))
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(&self.kind, GetDashboardErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetDashboardErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for GetDashboardError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDashboardErrorKind::DashboardNotFoundError(_inner) => Some(_inner),
GetDashboardErrorKind::InternalServiceFault(_inner) => Some(_inner),
GetDashboardErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetDashboardErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInsightRuleReportError {
pub kind: GetInsightRuleReportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInsightRuleReportErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetInsightRuleReportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInsightRuleReportErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetInsightRuleReportErrorKind::MissingRequiredParameterException(_inner) => {
_inner.fmt(f)
}
GetInsightRuleReportErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetInsightRuleReportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInsightRuleReportError {
fn code(&self) -> Option<&str> {
GetInsightRuleReportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInsightRuleReportError {
pub fn new(kind: GetInsightRuleReportErrorKind, 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: GetInsightRuleReportErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInsightRuleReportErrorKind::Unhandled(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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightRuleReportErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightRuleReportErrorKind::MissingRequiredParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightRuleReportErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetInsightRuleReportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInsightRuleReportErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetInsightRuleReportErrorKind::MissingRequiredParameterException(_inner) => {
Some(_inner)
}
GetInsightRuleReportErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetInsightRuleReportErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMetricDataError {
pub kind: GetMetricDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMetricDataErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetMetricDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMetricDataErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
GetMetricDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMetricDataError {
fn code(&self) -> Option<&str> {
GetMetricDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMetricDataError {
pub fn new(kind: GetMetricDataErrorKind, 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: GetMetricDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMetricDataErrorKind::Unhandled(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(&self) -> bool {
matches!(&self.kind, GetMetricDataErrorKind::InvalidNextToken(_))
}
}
impl std::error::Error for GetMetricDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMetricDataErrorKind::InvalidNextToken(_inner) => Some(_inner),
GetMetricDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMetricStatisticsError {
pub kind: GetMetricStatisticsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMetricStatisticsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetMetricStatisticsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMetricStatisticsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
GetMetricStatisticsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
GetMetricStatisticsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetMetricStatisticsErrorKind::MissingRequiredParameterException(_inner) => {
_inner.fmt(f)
}
GetMetricStatisticsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMetricStatisticsError {
fn code(&self) -> Option<&str> {
GetMetricStatisticsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMetricStatisticsError {
pub fn new(kind: GetMetricStatisticsErrorKind, 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: GetMetricStatisticsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMetricStatisticsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
GetMetricStatisticsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStatisticsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStatisticsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStatisticsErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for GetMetricStatisticsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMetricStatisticsErrorKind::InternalServiceFault(_inner) => Some(_inner),
GetMetricStatisticsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
GetMetricStatisticsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetMetricStatisticsErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
GetMetricStatisticsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMetricStreamError {
pub kind: GetMetricStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMetricStreamErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetMetricStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMetricStreamErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
GetMetricStreamErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
GetMetricStreamErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetMetricStreamErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
GetMetricStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMetricStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMetricStreamError {
fn code(&self) -> Option<&str> {
GetMetricStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMetricStreamError {
pub fn new(kind: GetMetricStreamErrorKind, 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: GetMetricStreamErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMetricStreamErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
GetMetricStreamErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStreamErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStreamErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStreamErrorKind::MissingRequiredParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMetricStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetMetricStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMetricStreamErrorKind::InternalServiceFault(_inner) => Some(_inner),
GetMetricStreamErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
GetMetricStreamErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetMetricStreamErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
GetMetricStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMetricStreamErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMetricWidgetImageError {
pub kind: GetMetricWidgetImageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMetricWidgetImageErrorKind {
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetMetricWidgetImageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMetricWidgetImageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMetricWidgetImageError {
fn code(&self) -> Option<&str> {
GetMetricWidgetImageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetMetricWidgetImageError {
pub fn new(kind: GetMetricWidgetImageErrorKind, 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: GetMetricWidgetImageErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMetricWidgetImageErrorKind::Unhandled(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()
}
}
impl std::error::Error for GetMetricWidgetImageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMetricWidgetImageErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDashboardsError {
pub kind: ListDashboardsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDashboardsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListDashboardsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDashboardsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
ListDashboardsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ListDashboardsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDashboardsError {
fn code(&self) -> Option<&str> {
ListDashboardsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDashboardsError {
pub fn new(kind: ListDashboardsErrorKind, 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: ListDashboardsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDashboardsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(&self.kind, ListDashboardsErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListDashboardsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for ListDashboardsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDashboardsErrorKind::InternalServiceFault(_inner) => Some(_inner),
ListDashboardsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListDashboardsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMetricsError {
pub kind: ListMetricsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMetricsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListMetricsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMetricsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
ListMetricsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ListMetricsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMetricsError {
fn code(&self) -> Option<&str> {
ListMetricsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMetricsError {
pub fn new(kind: ListMetricsErrorKind, 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: ListMetricsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMetricsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(&self.kind, ListMetricsErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListMetricsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for ListMetricsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMetricsErrorKind::InternalServiceFault(_inner) => Some(_inner),
ListMetricsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListMetricsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMetricStreamsError {
pub kind: ListMetricStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMetricStreamsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidNextToken(crate::error::InvalidNextToken),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListMetricStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMetricStreamsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
ListMetricStreamsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
ListMetricStreamsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ListMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
ListMetricStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMetricStreamsError {
fn code(&self) -> Option<&str> {
ListMetricStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListMetricStreamsError {
pub fn new(kind: ListMetricStreamsErrorKind, 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: ListMetricStreamsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMetricStreamsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
ListMetricStreamsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_next_token(&self) -> bool {
matches!(&self.kind, ListMetricStreamsErrorKind::InvalidNextToken(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListMetricStreamsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListMetricStreamsErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for ListMetricStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMetricStreamsErrorKind::InternalServiceFault(_inner) => Some(_inner),
ListMetricStreamsErrorKind::InvalidNextToken(_inner) => Some(_inner),
ListMetricStreamsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
ListMetricStreamsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidParameterValueException(_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(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidParameterValueException(_)
)
}
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::InternalServiceFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutAnomalyDetectorError {
pub kind: PutAnomalyDetectorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutAnomalyDetectorErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutAnomalyDetectorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutAnomalyDetectorErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
PutAnomalyDetectorErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutAnomalyDetectorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutAnomalyDetectorErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
PutAnomalyDetectorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutAnomalyDetectorError {
fn code(&self) -> Option<&str> {
PutAnomalyDetectorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutAnomalyDetectorError {
pub fn new(kind: PutAnomalyDetectorErrorKind, 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: PutAnomalyDetectorErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutAnomalyDetectorErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
PutAnomalyDetectorErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutAnomalyDetectorErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutAnomalyDetectorErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutAnomalyDetectorErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for PutAnomalyDetectorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutAnomalyDetectorErrorKind::InternalServiceFault(_inner) => Some(_inner),
PutAnomalyDetectorErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutAnomalyDetectorErrorKind::LimitExceededException(_inner) => Some(_inner),
PutAnomalyDetectorErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
PutAnomalyDetectorErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutCompositeAlarmError {
pub kind: PutCompositeAlarmErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutCompositeAlarmErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutCompositeAlarmError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutCompositeAlarmErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutCompositeAlarmErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutCompositeAlarmError {
fn code(&self) -> Option<&str> {
PutCompositeAlarmError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutCompositeAlarmError {
pub fn new(kind: PutCompositeAlarmErrorKind, 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: PutCompositeAlarmErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutCompositeAlarmErrorKind::Unhandled(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_fault(&self) -> bool {
matches!(
&self.kind,
PutCompositeAlarmErrorKind::LimitExceededFault(_)
)
}
}
impl std::error::Error for PutCompositeAlarmError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutCompositeAlarmErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutCompositeAlarmErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutDashboardError {
pub kind: PutDashboardErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutDashboardErrorKind {
DashboardInvalidInputError(crate::error::DashboardInvalidInputError),
InternalServiceFault(crate::error::InternalServiceFault),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutDashboardError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutDashboardErrorKind::DashboardInvalidInputError(_inner) => _inner.fmt(f),
PutDashboardErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
PutDashboardErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutDashboardError {
fn code(&self) -> Option<&str> {
PutDashboardError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutDashboardError {
pub fn new(kind: PutDashboardErrorKind, 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: PutDashboardErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutDashboardErrorKind::Unhandled(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_dashboard_invalid_input_error(&self) -> bool {
matches!(
&self.kind,
PutDashboardErrorKind::DashboardInvalidInputError(_)
)
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(&self.kind, PutDashboardErrorKind::InternalServiceFault(_))
}
}
impl std::error::Error for PutDashboardError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutDashboardErrorKind::DashboardInvalidInputError(_inner) => Some(_inner),
PutDashboardErrorKind::InternalServiceFault(_inner) => Some(_inner),
PutDashboardErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutInsightRuleError {
pub kind: PutInsightRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutInsightRuleErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutInsightRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutInsightRuleErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutInsightRuleErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutInsightRuleErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
PutInsightRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutInsightRuleError {
fn code(&self) -> Option<&str> {
PutInsightRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutInsightRuleError {
pub fn new(kind: PutInsightRuleErrorKind, 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: PutInsightRuleErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutInsightRuleErrorKind::Unhandled(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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutInsightRuleErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutInsightRuleErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutInsightRuleErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for PutInsightRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutInsightRuleErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutInsightRuleErrorKind::LimitExceededException(_inner) => Some(_inner),
PutInsightRuleErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
PutInsightRuleErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutMetricAlarmError {
pub kind: PutMetricAlarmErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutMetricAlarmErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutMetricAlarmError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutMetricAlarmErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutMetricAlarmErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutMetricAlarmError {
fn code(&self) -> Option<&str> {
PutMetricAlarmError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutMetricAlarmError {
pub fn new(kind: PutMetricAlarmErrorKind, 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: PutMetricAlarmErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutMetricAlarmErrorKind::Unhandled(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_fault(&self) -> bool {
matches!(&self.kind, PutMetricAlarmErrorKind::LimitExceededFault(_))
}
}
impl std::error::Error for PutMetricAlarmError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutMetricAlarmErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutMetricAlarmErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutMetricDataError {
pub kind: PutMetricDataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutMetricDataErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutMetricDataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutMetricDataErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
PutMetricDataErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
PutMetricDataErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutMetricDataErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
PutMetricDataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutMetricDataError {
fn code(&self) -> Option<&str> {
PutMetricDataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutMetricDataError {
pub fn new(kind: PutMetricDataErrorKind, 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: PutMetricDataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutMetricDataErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(&self.kind, PutMetricDataErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricDataErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricDataErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricDataErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for PutMetricDataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutMetricDataErrorKind::InternalServiceFault(_inner) => Some(_inner),
PutMetricDataErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
PutMetricDataErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutMetricDataErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
PutMetricDataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutMetricStreamError {
pub kind: PutMetricStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutMetricStreamErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PutMetricStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutMetricStreamErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
PutMetricStreamErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
PutMetricStreamErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
PutMetricStreamErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
PutMetricStreamErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
PutMetricStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutMetricStreamError {
fn code(&self) -> Option<&str> {
PutMetricStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutMetricStreamError {
pub fn new(kind: PutMetricStreamErrorKind, 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: PutMetricStreamErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutMetricStreamErrorKind::Unhandled(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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricStreamErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
PutMetricStreamErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricStreamErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricStreamErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutMetricStreamErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for PutMetricStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutMetricStreamErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
PutMetricStreamErrorKind::InternalServiceFault(_inner) => Some(_inner),
PutMetricStreamErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
PutMetricStreamErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
PutMetricStreamErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
PutMetricStreamErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetAlarmStateError {
pub kind: SetAlarmStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetAlarmStateErrorKind {
InvalidFormatFault(crate::error::InvalidFormatFault),
ResourceNotFound(crate::error::ResourceNotFound),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for SetAlarmStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetAlarmStateErrorKind::InvalidFormatFault(_inner) => _inner.fmt(f),
SetAlarmStateErrorKind::ResourceNotFound(_inner) => _inner.fmt(f),
SetAlarmStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetAlarmStateError {
fn code(&self) -> Option<&str> {
SetAlarmStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetAlarmStateError {
pub fn new(kind: SetAlarmStateErrorKind, 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: SetAlarmStateErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetAlarmStateErrorKind::Unhandled(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_format_fault(&self) -> bool {
matches!(&self.kind, SetAlarmStateErrorKind::InvalidFormatFault(_))
}
pub fn is_resource_not_found(&self) -> bool {
matches!(&self.kind, SetAlarmStateErrorKind::ResourceNotFound(_))
}
}
impl std::error::Error for SetAlarmStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetAlarmStateErrorKind::InvalidFormatFault(_inner) => Some(_inner),
SetAlarmStateErrorKind::ResourceNotFound(_inner) => Some(_inner),
SetAlarmStateErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartMetricStreamsError {
pub kind: StartMetricStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartMetricStreamsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartMetricStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartMetricStreamsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
StartMetricStreamsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
StartMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
StartMetricStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartMetricStreamsError {
fn code(&self) -> Option<&str> {
StartMetricStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartMetricStreamsError {
pub fn new(kind: StartMetricStreamsErrorKind, 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: StartMetricStreamsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartMetricStreamsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
StartMetricStreamsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
StartMetricStreamsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StartMetricStreamsErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for StartMetricStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartMetricStreamsErrorKind::InternalServiceFault(_inner) => Some(_inner),
StartMetricStreamsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
StartMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
StartMetricStreamsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopMetricStreamsError {
pub kind: StopMetricStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopMetricStreamsErrorKind {
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingRequiredParameterException(crate::error::MissingRequiredParameterException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StopMetricStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopMetricStreamsErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
StopMetricStreamsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
StopMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => _inner.fmt(f),
StopMetricStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopMetricStreamsError {
fn code(&self) -> Option<&str> {
StopMetricStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopMetricStreamsError {
pub fn new(kind: StopMetricStreamsErrorKind, 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: StopMetricStreamsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopMetricStreamsErrorKind::Unhandled(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_internal_service_fault(&self) -> bool {
matches!(
&self.kind,
StopMetricStreamsErrorKind::InternalServiceFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
StopMetricStreamsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_required_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StopMetricStreamsErrorKind::MissingRequiredParameterException(_)
)
}
}
impl std::error::Error for StopMetricStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopMetricStreamsErrorKind::InternalServiceFault(_inner) => Some(_inner),
StopMetricStreamsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
StopMetricStreamsErrorKind::MissingRequiredParameterException(_inner) => Some(_inner),
StopMetricStreamsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_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(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServiceFault(_inner) => Some(_inner),
TagResourceErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InternalServiceFault(crate::error::InternalServiceFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServiceFault(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidParameterValueException(_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(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_internal_service_fault(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InternalServiceFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidParameterValueException(_)
)
}
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::ConcurrentModificationException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServiceFault(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] pub resource_type: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub resource_id: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
#[allow(missing_docs)] pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
#[allow(missing_docs)] pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("resource_type", &self.resource_type);
formatter.field("resource_id", &self.resource_id);
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> 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_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
#[allow(missing_docs)] pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
resource_type: self.resource_type,
resource_id: self.resource_id,
message: self.message,
}
}
}
}
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)]
pub struct InvalidParameterValueException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidParameterValueException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidParameterValueException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValueException")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValueException {}
pub mod invalid_parameter_value_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterValueException {
crate::error::InvalidParameterValueException {
message: self.message,
}
}
}
}
impl InvalidParameterValueException {
pub fn builder() -> crate::error::invalid_parameter_value_exception::Builder {
crate::error::invalid_parameter_value_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServiceFault {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InternalServiceFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServiceFault");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InternalServiceFault {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceFault")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for InternalServiceFault {}
pub mod internal_service_fault {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServiceFault {
crate::error::InternalServiceFault {
message: self.message,
}
}
}
}
impl InternalServiceFault {
pub fn builder() -> crate::error::internal_service_fault::Builder {
crate::error::internal_service_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConcurrentModificationException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConcurrentModificationException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ConcurrentModificationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentModificationException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for ConcurrentModificationException {}
pub mod concurrent_modification_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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::ConcurrentModificationException {
crate::error::ConcurrentModificationException {
message: self.message,
}
}
}
}
impl ConcurrentModificationException {
pub fn builder() -> crate::error::concurrent_modification_exception::Builder {
crate::error::concurrent_modification_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MissingRequiredParameterException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for MissingRequiredParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("MissingRequiredParameterException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl MissingRequiredParameterException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MissingRequiredParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MissingRequiredParameterException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for MissingRequiredParameterException {}
pub mod missing_required_parameter_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::MissingRequiredParameterException {
crate::error::MissingRequiredParameterException {
message: self.message,
}
}
}
}
impl MissingRequiredParameterException {
pub fn builder() -> crate::error::missing_required_parameter_exception::Builder {
crate::error::missing_required_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFound {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFound");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl ResourceNotFound {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFound {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFound")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFound {}
pub mod resource_not_found {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFound {
crate::error::ResourceNotFound {
message: self.message,
}
}
}
}
impl ResourceNotFound {
pub fn builder() -> crate::error::resource_not_found::Builder {
crate::error::resource_not_found::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidFormatFault {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidFormatFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidFormatFault");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidFormatFault {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidFormatFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidFormatFault")?;
if let Some(inner_7) = &self.message {
write!(f, ": {}", inner_7)?;
}
Ok(())
}
}
impl std::error::Error for InvalidFormatFault {}
pub mod invalid_format_fault {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidFormatFault {
crate::error::InvalidFormatFault {
message: self.message,
}
}
}
}
impl InvalidFormatFault {
pub fn builder() -> crate::error::invalid_format_fault::Builder {
crate::error::invalid_format_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidParameterCombinationException {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidParameterCombinationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidParameterCombinationException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidParameterCombinationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterCombinationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterCombinationException")?;
if let Some(inner_8) = &self.message {
write!(f, ": {}", inner_8)?;
}
Ok(())
}
}
impl std::error::Error for InvalidParameterCombinationException {}
pub mod invalid_parameter_combination_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterCombinationException {
crate::error::InvalidParameterCombinationException {
message: self.message,
}
}
}
}
impl InvalidParameterCombinationException {
pub fn builder() -> crate::error::invalid_parameter_combination_exception::Builder {
crate::error::invalid_parameter_combination_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LimitExceededFault {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for LimitExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LimitExceededFault");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl LimitExceededFault {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededFault")?;
if let Some(inner_9) = &self.message {
write!(f, ": {}", inner_9)?;
}
Ok(())
}
}
impl std::error::Error for LimitExceededFault {}
pub mod limit_exceeded_fault {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededFault {
crate::error::LimitExceededFault {
message: self.message,
}
}
}
}
impl LimitExceededFault {
pub fn builder() -> crate::error::limit_exceeded_fault::Builder {
crate::error::limit_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LimitExceededException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LimitExceededException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl LimitExceededException {
pub fn message(&self) -> 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_10) = &self.message {
write!(f, ": {}", inner_10)?;
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashboardInvalidInputError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub dashboard_validation_messages:
std::option::Option<std::vec::Vec<crate::model::DashboardValidationMessage>>,
}
impl DashboardInvalidInputError {
#[allow(missing_docs)] pub fn dashboard_validation_messages(
&self,
) -> std::option::Option<&[crate::model::DashboardValidationMessage]> {
self.dashboard_validation_messages.as_deref()
}
}
impl std::fmt::Debug for DashboardInvalidInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashboardInvalidInputError");
formatter.field("message", &self.message);
formatter.field(
"dashboard_validation_messages",
&self.dashboard_validation_messages,
);
formatter.finish()
}
}
impl DashboardInvalidInputError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DashboardInvalidInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DashboardInvalidInputError")?;
if let Some(inner_11) = &self.message {
write!(f, ": {}", inner_11)?;
}
Ok(())
}
}
impl std::error::Error for DashboardInvalidInputError {}
pub mod dashboard_invalid_input_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) dashboard_validation_messages:
std::option::Option<std::vec::Vec<crate::model::DashboardValidationMessage>>,
}
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 dashboard_validation_messages(
mut self,
input: impl Into<crate::model::DashboardValidationMessage>,
) -> Self {
let mut v = self.dashboard_validation_messages.unwrap_or_default();
v.push(input.into());
self.dashboard_validation_messages = Some(v);
self
}
#[allow(missing_docs)] pub fn set_dashboard_validation_messages(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DashboardValidationMessage>>,
) -> Self {
self.dashboard_validation_messages = input;
self
}
pub fn build(self) -> crate::error::DashboardInvalidInputError {
crate::error::DashboardInvalidInputError {
message: self.message,
dashboard_validation_messages: self.dashboard_validation_messages,
}
}
}
}
impl DashboardInvalidInputError {
pub fn builder() -> crate::error::dashboard_invalid_input_error::Builder {
crate::error::dashboard_invalid_input_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InvalidNextToken {
pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for InvalidNextToken {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InvalidNextToken");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl InvalidNextToken {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextToken {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextToken")?;
if let Some(inner_12) = &self.message {
write!(f, ": {}", inner_12)?;
}
Ok(())
}
}
impl std::error::Error for InvalidNextToken {}
pub mod invalid_next_token {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidNextToken {
crate::error::InvalidNextToken {
message: self.message,
}
}
}
}
impl InvalidNextToken {
pub fn builder() -> crate::error::invalid_next_token::Builder {
crate::error::invalid_next_token::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DashboardNotFoundError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DashboardNotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DashboardNotFoundError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl DashboardNotFoundError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DashboardNotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DashboardNotFoundError")?;
if let Some(inner_13) = &self.message {
write!(f, ": {}", inner_13)?;
}
Ok(())
}
}
impl std::error::Error for DashboardNotFoundError {}
pub mod dashboard_not_found_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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::DashboardNotFoundError {
crate::error::DashboardNotFoundError {
message: self.message,
}
}
}
}
impl DashboardNotFoundError {
pub fn builder() -> crate::error::dashboard_not_found_error::Builder {
crate::error::dashboard_not_found_error::Builder::default()
}
}