#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutReportDefinitionError {
pub kind: PutReportDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutReportDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutReportDefinitionErrorKind {
DuplicateReportNameException(crate::error::DuplicateReportNameException),
InternalErrorException(crate::error::InternalErrorException),
ReportLimitReachedException(crate::error::ReportLimitReachedException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutReportDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutReportDefinitionErrorKind::DuplicateReportNameException(_inner) => _inner.fmt(f),
PutReportDefinitionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
PutReportDefinitionErrorKind::ReportLimitReachedException(_inner) => _inner.fmt(f),
PutReportDefinitionErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutReportDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutReportDefinitionError {
fn code(&self) -> Option<&str> {
PutReportDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutReportDefinitionError {
pub fn new(kind: PutReportDefinitionErrorKind, 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: PutReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_duplicate_report_name_exception(&self) -> bool {
matches!(
&self.kind,
PutReportDefinitionErrorKind::DuplicateReportNameException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
PutReportDefinitionErrorKind::InternalErrorException(_)
)
}
pub fn is_report_limit_reached_exception(&self) -> bool {
matches!(
&self.kind,
PutReportDefinitionErrorKind::ReportLimitReachedException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutReportDefinitionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutReportDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutReportDefinitionErrorKind::DuplicateReportNameException(_inner) => Some(_inner),
PutReportDefinitionErrorKind::InternalErrorException(_inner) => Some(_inner),
PutReportDefinitionErrorKind::ReportLimitReachedException(_inner) => Some(_inner),
PutReportDefinitionErrorKind::ValidationException(_inner) => Some(_inner),
PutReportDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReportLimitReachedException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReportLimitReachedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReportLimitReachedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReportLimitReachedException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ReportLimitReachedException {}
pub mod report_limit_reached_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ReportLimitReachedException {
crate::error::ReportLimitReachedException {
message: self.message,
}
}
}
}
impl ReportLimitReachedException {
pub fn builder() -> crate::error::report_limit_reached_exception::Builder {
crate::error::report_limit_reached_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalErrorException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalErrorException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalErrorException {}
pub mod internal_error_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalErrorException {
crate::error::InternalErrorException {
message: self.message,
}
}
}
}
impl InternalErrorException {
pub fn builder() -> crate::error::internal_error_exception::Builder {
crate::error::internal_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateReportNameException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateReportNameException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateReportNameException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateReportNameException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateReportNameException {}
pub mod duplicate_report_name_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::DuplicateReportNameException {
crate::error::DuplicateReportNameException {
message: self.message,
}
}
}
}
impl DuplicateReportNameException {
pub fn builder() -> crate::error::duplicate_report_name_exception::Builder {
crate::error::duplicate_report_name_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyReportDefinitionError {
pub kind: ModifyReportDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyReportDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyReportDefinitionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyReportDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyReportDefinitionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
ModifyReportDefinitionErrorKind::ValidationException(_inner) => _inner.fmt(f),
ModifyReportDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyReportDefinitionError {
fn code(&self) -> Option<&str> {
ModifyReportDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyReportDefinitionError {
pub fn new(kind: ModifyReportDefinitionErrorKind, 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: ModifyReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReportDefinitionErrorKind::InternalErrorException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReportDefinitionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ModifyReportDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyReportDefinitionErrorKind::InternalErrorException(_inner) => Some(_inner),
ModifyReportDefinitionErrorKind::ValidationException(_inner) => Some(_inner),
ModifyReportDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeReportDefinitionsError {
pub kind: DescribeReportDefinitionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeReportDefinitionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeReportDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeReportDefinitionsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeReportDefinitionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeReportDefinitionsErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeReportDefinitionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeReportDefinitionsError {
fn code(&self) -> Option<&str> {
DescribeReportDefinitionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeReportDefinitionsError {
pub fn new(kind: DescribeReportDefinitionsErrorKind, 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: DescribeReportDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeReportDefinitionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReportDefinitionsErrorKind::InternalErrorException(_)
)
}
}
impl std::error::Error for DescribeReportDefinitionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeReportDefinitionsErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeReportDefinitionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteReportDefinitionError {
pub kind: DeleteReportDefinitionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteReportDefinitionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteReportDefinitionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteReportDefinitionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteReportDefinitionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteReportDefinitionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteReportDefinitionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteReportDefinitionError {
fn code(&self) -> Option<&str> {
DeleteReportDefinitionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteReportDefinitionError {
pub fn new(kind: DeleteReportDefinitionErrorKind, 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: DeleteReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteReportDefinitionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteReportDefinitionErrorKind::InternalErrorException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteReportDefinitionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteReportDefinitionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteReportDefinitionErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteReportDefinitionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteReportDefinitionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}