#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartSupportDataExportError {
pub kind: StartSupportDataExportErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartSupportDataExportError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartSupportDataExportErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartSupportDataExportErrorKind {
MarketplaceCommerceAnalyticsException(crate::error::MarketplaceCommerceAnalyticsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartSupportDataExportError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartSupportDataExportErrorKind::MarketplaceCommerceAnalyticsException(_inner) => {
_inner.fmt(f)
}
StartSupportDataExportErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartSupportDataExportError {
fn code(&self) -> Option<&str> {
StartSupportDataExportError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartSupportDataExportError {
pub fn new(kind: StartSupportDataExportErrorKind, 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: StartSupportDataExportErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartSupportDataExportErrorKind::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_marketplace_commerce_analytics_exception(&self) -> bool {
matches!(
&self.kind,
StartSupportDataExportErrorKind::MarketplaceCommerceAnalyticsException(_)
)
}
}
impl std::error::Error for StartSupportDataExportError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartSupportDataExportErrorKind::MarketplaceCommerceAnalyticsException(_inner) => {
Some(_inner)
}
StartSupportDataExportErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MarketplaceCommerceAnalyticsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MarketplaceCommerceAnalyticsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MarketplaceCommerceAnalyticsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MarketplaceCommerceAnalyticsException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for MarketplaceCommerceAnalyticsException {}
pub mod marketplace_commerce_analytics_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::MarketplaceCommerceAnalyticsException {
crate::error::MarketplaceCommerceAnalyticsException {
message: self.message,
}
}
}
}
impl MarketplaceCommerceAnalyticsException {
pub fn builder() -> crate::error::marketplace_commerce_analytics_exception::Builder {
crate::error::marketplace_commerce_analytics_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GenerateDataSetError {
pub kind: GenerateDataSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GenerateDataSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GenerateDataSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GenerateDataSetErrorKind {
MarketplaceCommerceAnalyticsException(crate::error::MarketplaceCommerceAnalyticsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GenerateDataSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GenerateDataSetErrorKind::MarketplaceCommerceAnalyticsException(_inner) => {
_inner.fmt(f)
}
GenerateDataSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GenerateDataSetError {
fn code(&self) -> Option<&str> {
GenerateDataSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GenerateDataSetError {
pub fn new(kind: GenerateDataSetErrorKind, 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: GenerateDataSetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GenerateDataSetErrorKind::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_marketplace_commerce_analytics_exception(&self) -> bool {
matches!(
&self.kind,
GenerateDataSetErrorKind::MarketplaceCommerceAnalyticsException(_)
)
}
}
impl std::error::Error for GenerateDataSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GenerateDataSetErrorKind::MarketplaceCommerceAnalyticsException(_inner) => Some(_inner),
GenerateDataSetErrorKind::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 _)
}
}