#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct HealthcheckOperationError {
pub kind: HealthcheckOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum HealthcheckOperationErrorKind {
HealtcheckError(crate::error::HealtcheckError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for HealthcheckOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
HealthcheckOperationErrorKind::HealtcheckError(_inner) => _inner.fmt(f),
HealthcheckOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for HealthcheckOperationError {
fn code(&self) -> Option<&str> {
HealthcheckOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl HealthcheckOperationError {
pub fn new(kind: HealthcheckOperationErrorKind, 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: HealthcheckOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: HealthcheckOperationErrorKind::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_healtcheck_error(&self) -> bool {
matches!(
&self.kind,
HealthcheckOperationErrorKind::HealtcheckError(_)
)
}
}
impl std::error::Error for HealthcheckOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
HealthcheckOperationErrorKind::HealtcheckError(_inner) => Some(_inner),
HealthcheckOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListOperationError {
pub kind: ListOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListOperationErrorKind {
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListOperationError {
fn code(&self) -> Option<&str> {
ListOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListOperationError {
pub fn new(kind: ListOperationErrorKind, 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: ListOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListOperationErrorKind::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 ListOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PrometheusTargetOperationError {
pub kind: PrometheusTargetOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PrometheusTargetOperationErrorKind {
DocktorError(crate::error::DocktorError),
PrometheusError(crate::error::PrometheusError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PrometheusTargetOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PrometheusTargetOperationErrorKind::DocktorError(_inner) => _inner.fmt(f),
PrometheusTargetOperationErrorKind::PrometheusError(_inner) => _inner.fmt(f),
PrometheusTargetOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PrometheusTargetOperationError {
fn code(&self) -> Option<&str> {
PrometheusTargetOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PrometheusTargetOperationError {
pub fn new(kind: PrometheusTargetOperationErrorKind, 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: PrometheusTargetOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PrometheusTargetOperationErrorKind::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_docktor_error(&self) -> bool {
matches!(
&self.kind,
PrometheusTargetOperationErrorKind::DocktorError(_)
)
}
pub fn is_prometheus_error(&self) -> bool {
matches!(
&self.kind,
PrometheusTargetOperationErrorKind::PrometheusError(_)
)
}
}
impl std::error::Error for PrometheusTargetOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PrometheusTargetOperationErrorKind::DocktorError(_inner) => Some(_inner),
PrometheusTargetOperationErrorKind::PrometheusError(_inner) => Some(_inner),
PrometheusTargetOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestartOperationError {
pub kind: RestartOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestartOperationErrorKind {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for RestartOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestartOperationErrorKind::DocktorError(_inner) => _inner.fmt(f),
RestartOperationErrorKind::SystemdError(_inner) => _inner.fmt(f),
RestartOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestartOperationError {
fn code(&self) -> Option<&str> {
RestartOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestartOperationError {
pub fn new(kind: RestartOperationErrorKind, 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: RestartOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestartOperationErrorKind::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_docktor_error(&self) -> bool {
matches!(&self.kind, RestartOperationErrorKind::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self.kind, RestartOperationErrorKind::SystemdError(_))
}
}
impl std::error::Error for RestartOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestartOperationErrorKind::DocktorError(_inner) => Some(_inner),
RestartOperationErrorKind::SystemdError(_inner) => Some(_inner),
RestartOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartOperationError {
pub kind: StartOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartOperationErrorKind {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartOperationErrorKind::DocktorError(_inner) => _inner.fmt(f),
StartOperationErrorKind::SystemdError(_inner) => _inner.fmt(f),
StartOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartOperationError {
fn code(&self) -> Option<&str> {
StartOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartOperationError {
pub fn new(kind: StartOperationErrorKind, 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: StartOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartOperationErrorKind::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_docktor_error(&self) -> bool {
matches!(&self.kind, StartOperationErrorKind::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self.kind, StartOperationErrorKind::SystemdError(_))
}
}
impl std::error::Error for StartOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartOperationErrorKind::DocktorError(_inner) => Some(_inner),
StartOperationErrorKind::SystemdError(_inner) => Some(_inner),
StartOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopOperationError {
pub kind: StopOperationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopOperationErrorKind {
DocktorError(crate::error::DocktorError),
SystemdError(crate::error::SystemdError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StopOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopOperationErrorKind::DocktorError(_inner) => _inner.fmt(f),
StopOperationErrorKind::SystemdError(_inner) => _inner.fmt(f),
StopOperationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopOperationError {
fn code(&self) -> Option<&str> {
StopOperationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopOperationError {
pub fn new(kind: StopOperationErrorKind, 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: StopOperationErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopOperationErrorKind::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_docktor_error(&self) -> bool {
matches!(&self.kind, StopOperationErrorKind::DocktorError(_))
}
pub fn is_systemd_error(&self) -> bool {
matches!(&self.kind, StopOperationErrorKind::SystemdError(_))
}
}
impl std::error::Error for StopOperationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopOperationErrorKind::DocktorError(_inner) => Some(_inner),
StopOperationErrorKind::SystemdError(_inner) => Some(_inner),
StopOperationErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PrometheusError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for PrometheusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PrometheusError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl PrometheusError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PrometheusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PrometheusError")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for PrometheusError {}
pub mod prometheus_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::PrometheusError {
crate::error::PrometheusError {
message: self.message,
}
}
}
}
impl PrometheusError {
pub fn builder() -> crate::error::prometheus_error::Builder {
crate::error::prometheus_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DocktorError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DocktorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DocktorError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl DocktorError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DocktorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DocktorError")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for DocktorError {}
pub mod docktor_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::DocktorError {
crate::error::DocktorError {
message: self.message,
}
}
}
}
impl DocktorError {
pub fn builder() -> crate::error::docktor_error::Builder {
crate::error::docktor_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SystemdError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for SystemdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SystemdError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl SystemdError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SystemdError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SystemdError")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for SystemdError {}
pub mod systemd_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::SystemdError {
crate::error::SystemdError {
message: self.message,
}
}
}
}
impl SystemdError {
pub fn builder() -> crate::error::systemd_error::Builder {
crate::error::systemd_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct HealtcheckError {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for HealtcheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("HealtcheckError");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl HealtcheckError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for HealtcheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "HealtcheckError")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for HealtcheckError {}
pub mod healtcheck_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::HealtcheckError {
crate::error::HealtcheckError {
message: self.message,
}
}
}
}
impl HealtcheckError {
pub fn builder() -> crate::error::healtcheck_error::Builder {
crate::error::healtcheck_error::Builder::default()
}
}