#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateInputError {
pub kind: UpdateInputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateInputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateInputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateInputErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateInputErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateInputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateInputError {
fn code(&self) -> Option<&str> {
UpdateInputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateInputError {
pub fn new(kind: UpdateInputErrorKind, 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: UpdateInputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateInputErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInputErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, UpdateInputErrorKind::InvalidRequestException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, UpdateInputErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInputErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateInputErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for UpdateInputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateInputErrorKind::InternalFailureException(_inner) => Some(_inner),
UpdateInputErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateInputErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateInputErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateInputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateInputErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateInputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_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::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
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::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
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, std::fmt::Debug)]
pub struct ResourceInUseException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseException {}
pub mod resource_in_use_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::ResourceInUseException {
crate::error::ResourceInUseException {
message: self.message,
}
}
}
}
impl ResourceInUseException {
pub fn builder() -> crate::error::resource_in_use_exception::Builder {
crate::error::resource_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_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::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalFailureException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalFailureException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalFailureException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalFailureException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalFailureException {}
pub mod internal_failure_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::InternalFailureException {
crate::error::InternalFailureException {
message: self.message,
}
}
}
}
impl InternalFailureException {
pub fn builder() -> crate::error::internal_failure_exception::Builder {
crate::error::internal_failure_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDetectorModelError {
pub kind: UpdateDetectorModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDetectorModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDetectorModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDetectorModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDetectorModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDetectorModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDetectorModelError {
fn code(&self) -> Option<&str> {
UpdateDetectorModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDetectorModelError {
pub fn new(kind: UpdateDetectorModelErrorKind, 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: UpdateDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDetectorModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDetectorModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateDetectorModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDetectorModelErrorKind::InternalFailureException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDetectorModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAlarmModelError {
pub kind: UpdateAlarmModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAlarmModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAlarmModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAlarmModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAlarmModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateAlarmModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAlarmModelError {
fn code(&self) -> Option<&str> {
UpdateAlarmModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAlarmModelError {
pub fn new(kind: UpdateAlarmModelErrorKind, 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: UpdateAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAlarmModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAlarmModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateAlarmModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAlarmModelErrorKind::InternalFailureException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateAlarmModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalFailureException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceInUseException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::LimitExceededException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalFailureException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::LimitExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceInUseException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
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::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDetectorModelAnalysisError {
pub kind: StartDetectorModelAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDetectorModelAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDetectorModelAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDetectorModelAnalysisErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDetectorModelAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDetectorModelAnalysisErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
StartDetectorModelAnalysisErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StartDetectorModelAnalysisErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartDetectorModelAnalysisErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
StartDetectorModelAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartDetectorModelAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDetectorModelAnalysisError {
fn code(&self) -> Option<&str> {
StartDetectorModelAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartDetectorModelAnalysisError {
pub fn new(kind: StartDetectorModelAnalysisErrorKind, 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: StartDetectorModelAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDetectorModelAnalysisErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
StartDetectorModelAnalysisErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StartDetectorModelAnalysisErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDetectorModelAnalysisErrorKind::LimitExceededException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartDetectorModelAnalysisErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartDetectorModelAnalysisErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for StartDetectorModelAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDetectorModelAnalysisErrorKind::InternalFailureException(_inner) => Some(_inner),
StartDetectorModelAnalysisErrorKind::InvalidRequestException(_inner) => Some(_inner),
StartDetectorModelAnalysisErrorKind::LimitExceededException(_inner) => Some(_inner),
StartDetectorModelAnalysisErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
StartDetectorModelAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
StartDetectorModelAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutLoggingOptionsError {
pub kind: PutLoggingOptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutLoggingOptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutLoggingOptionsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutLoggingOptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutLoggingOptionsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutLoggingOptionsError {
fn code(&self) -> Option<&str> {
PutLoggingOptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutLoggingOptionsError {
pub fn new(kind: PutLoggingOptionsErrorKind, 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: PutLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutLoggingOptionsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for PutLoggingOptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutLoggingOptionsErrorKind::InternalFailureException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ResourceInUseException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ThrottlingException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedOperationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedOperationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedOperationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedOperationException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedOperationException {}
pub mod unsupported_operation_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::UnsupportedOperationException {
crate::error::UnsupportedOperationException {
message: self.message,
}
}
}
}
impl UnsupportedOperationException {
pub fn builder() -> crate::error::unsupported_operation_exception::Builder {
crate::error::unsupported_operation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalFailureException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceInUseException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListInputsError {
pub kind: ListInputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListInputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListInputsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListInputsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListInputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListInputsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListInputsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListInputsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListInputsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListInputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListInputsError {
fn code(&self) -> Option<&str> {
ListInputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListInputsError {
pub fn new(kind: ListInputsErrorKind, 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: ListInputsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListInputsErrorKind::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_failure_exception(&self) -> bool {
matches!(&self.kind, ListInputsErrorKind::InternalFailureException(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, ListInputsErrorKind::InvalidRequestException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListInputsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListInputsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListInputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListInputsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListInputsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListInputsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListInputsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListInputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListInputRoutingsError {
pub kind: ListInputRoutingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListInputRoutingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListInputRoutingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListInputRoutingsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListInputRoutingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListInputRoutingsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListInputRoutingsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListInputRoutingsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListInputRoutingsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListInputRoutingsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListInputRoutingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListInputRoutingsError {
fn code(&self) -> Option<&str> {
ListInputRoutingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListInputRoutingsError {
pub fn new(kind: ListInputRoutingsErrorKind, 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: ListInputRoutingsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListInputRoutingsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListInputRoutingsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListInputRoutingsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListInputRoutingsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListInputRoutingsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListInputRoutingsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListInputRoutingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListInputRoutingsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListInputRoutingsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListInputRoutingsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListInputRoutingsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListInputRoutingsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListInputRoutingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDetectorModelVersionsError {
pub kind: ListDetectorModelVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDetectorModelVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDetectorModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDetectorModelVersionsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDetectorModelVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDetectorModelVersionsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListDetectorModelVersionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListDetectorModelVersionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDetectorModelVersionsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ListDetectorModelVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDetectorModelVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDetectorModelVersionsError {
fn code(&self) -> Option<&str> {
ListDetectorModelVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDetectorModelVersionsError {
pub fn new(kind: ListDetectorModelVersionsErrorKind, 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: ListDetectorModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDetectorModelVersionsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelVersionsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelVersionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelVersionsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelVersionsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListDetectorModelVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDetectorModelVersionsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListDetectorModelVersionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListDetectorModelVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDetectorModelVersionsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListDetectorModelVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDetectorModelVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDetectorModelsError {
pub kind: ListDetectorModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDetectorModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDetectorModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDetectorModelsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDetectorModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDetectorModelsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListDetectorModelsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListDetectorModelsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListDetectorModelsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDetectorModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDetectorModelsError {
fn code(&self) -> Option<&str> {
ListDetectorModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDetectorModelsError {
pub fn new(kind: ListDetectorModelsErrorKind, 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: ListDetectorModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDetectorModelsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDetectorModelsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListDetectorModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDetectorModelsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListDetectorModelsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListDetectorModelsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListDetectorModelsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDetectorModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAlarmModelVersionsError {
pub kind: ListAlarmModelVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAlarmModelVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAlarmModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAlarmModelVersionsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAlarmModelVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAlarmModelVersionsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListAlarmModelVersionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListAlarmModelVersionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListAlarmModelVersionsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListAlarmModelVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListAlarmModelVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAlarmModelVersionsError {
fn code(&self) -> Option<&str> {
ListAlarmModelVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAlarmModelVersionsError {
pub fn new(kind: ListAlarmModelVersionsErrorKind, 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: ListAlarmModelVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAlarmModelVersionsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelVersionsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelVersionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelVersionsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelVersionsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListAlarmModelVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAlarmModelVersionsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListAlarmModelVersionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListAlarmModelVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListAlarmModelVersionsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListAlarmModelVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListAlarmModelVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAlarmModelsError {
pub kind: ListAlarmModelsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAlarmModelsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAlarmModelsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAlarmModelsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAlarmModelsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAlarmModelsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
ListAlarmModelsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListAlarmModelsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListAlarmModelsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListAlarmModelsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAlarmModelsError {
fn code(&self) -> Option<&str> {
ListAlarmModelsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAlarmModelsError {
pub fn new(kind: ListAlarmModelsErrorKind, 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: ListAlarmModelsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAlarmModelsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelsErrorKind::InvalidRequestException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListAlarmModelsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListAlarmModelsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListAlarmModelsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAlarmModelsErrorKind::InternalFailureException(_inner) => Some(_inner),
ListAlarmModelsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListAlarmModelsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListAlarmModelsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListAlarmModelsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDetectorModelAnalysisResultsError {
pub kind: GetDetectorModelAnalysisResultsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDetectorModelAnalysisResultsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDetectorModelAnalysisResultsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDetectorModelAnalysisResultsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDetectorModelAnalysisResultsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDetectorModelAnalysisResultsErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
GetDetectorModelAnalysisResultsErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
GetDetectorModelAnalysisResultsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetDetectorModelAnalysisResultsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetDetectorModelAnalysisResultsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDetectorModelAnalysisResultsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDetectorModelAnalysisResultsError {
fn code(&self) -> Option<&str> {
GetDetectorModelAnalysisResultsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDetectorModelAnalysisResultsError {
pub fn new(
kind: GetDetectorModelAnalysisResultsErrorKind,
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: GetDetectorModelAnalysisResultsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDetectorModelAnalysisResultsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorModelAnalysisResultsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorModelAnalysisResultsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorModelAnalysisResultsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorModelAnalysisResultsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDetectorModelAnalysisResultsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetDetectorModelAnalysisResultsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDetectorModelAnalysisResultsErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
GetDetectorModelAnalysisResultsErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
GetDetectorModelAnalysisResultsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetDetectorModelAnalysisResultsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetDetectorModelAnalysisResultsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDetectorModelAnalysisResultsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoggingOptionsError {
pub kind: DescribeLoggingOptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoggingOptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoggingOptionsErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoggingOptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoggingOptionsErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DescribeLoggingOptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoggingOptionsError {
fn code(&self) -> Option<&str> {
DescribeLoggingOptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoggingOptionsError {
pub fn new(kind: DescribeLoggingOptionsErrorKind, 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: DescribeLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoggingOptionsErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingOptionsErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DescribeLoggingOptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoggingOptionsErrorKind::InternalFailureException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DescribeLoggingOptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeInputError {
pub kind: DescribeInputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeInputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeInputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeInputErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeInputErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DescribeInputErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeInputErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeInputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeInputErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeInputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeInputError {
fn code(&self) -> Option<&str> {
DescribeInputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeInputError {
pub fn new(kind: DescribeInputErrorKind, 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: DescribeInputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeInputErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInputErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInputErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInputErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribeInputErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DescribeInputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeInputErrorKind::InternalFailureException(_inner) => Some(_inner),
DescribeInputErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeInputErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeInputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeInputErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeInputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDetectorModelAnalysisError {
pub kind: DescribeDetectorModelAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDetectorModelAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDetectorModelAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDetectorModelAnalysisErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDetectorModelAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDetectorModelAnalysisErrorKind::InternalFailureException(_inner) => {
_inner.fmt(f)
}
DescribeDetectorModelAnalysisErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
DescribeDetectorModelAnalysisErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeDetectorModelAnalysisErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DescribeDetectorModelAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeDetectorModelAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDetectorModelAnalysisError {
fn code(&self) -> Option<&str> {
DescribeDetectorModelAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDetectorModelAnalysisError {
pub fn new(
kind: DescribeDetectorModelAnalysisErrorKind,
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: DescribeDetectorModelAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDetectorModelAnalysisErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelAnalysisErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelAnalysisErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelAnalysisErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelAnalysisErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelAnalysisErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeDetectorModelAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDetectorModelAnalysisErrorKind::InternalFailureException(_inner) => {
Some(_inner)
}
DescribeDetectorModelAnalysisErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeDetectorModelAnalysisErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeDetectorModelAnalysisErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DescribeDetectorModelAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeDetectorModelAnalysisErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDetectorModelError {
pub kind: DescribeDetectorModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDetectorModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDetectorModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDetectorModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDetectorModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DescribeDetectorModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeDetectorModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDetectorModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeDetectorModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeDetectorModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDetectorModelError {
fn code(&self) -> Option<&str> {
DescribeDetectorModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDetectorModelError {
pub fn new(kind: DescribeDetectorModelErrorKind, 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: DescribeDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDetectorModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDetectorModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeDetectorModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDetectorModelErrorKind::InternalFailureException(_inner) => Some(_inner),
DescribeDetectorModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeDetectorModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDetectorModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeDetectorModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeDetectorModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAlarmModelError {
pub kind: DescribeAlarmModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAlarmModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAlarmModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAlarmModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAlarmModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DescribeAlarmModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeAlarmModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeAlarmModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeAlarmModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeAlarmModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAlarmModelError {
fn code(&self) -> Option<&str> {
DescribeAlarmModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAlarmModelError {
pub fn new(kind: DescribeAlarmModelErrorKind, 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: DescribeAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAlarmModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAlarmModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeAlarmModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAlarmModelErrorKind::InternalFailureException(_inner) => Some(_inner),
DescribeAlarmModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeAlarmModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeAlarmModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeAlarmModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeAlarmModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInputError {
pub kind: DeleteInputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteInputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteInputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInputErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInputErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteInputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInputError {
fn code(&self) -> Option<&str> {
DeleteInputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteInputError {
pub fn new(kind: DeleteInputErrorKind, 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: DeleteInputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInputErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInputErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, DeleteInputErrorKind::InvalidRequestException(_))
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(&self.kind, DeleteInputErrorKind::ResourceInUseException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInputErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteInputErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for DeleteInputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInputErrorKind::InternalFailureException(_inner) => Some(_inner),
DeleteInputErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteInputErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteInputErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteInputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteInputErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteInputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDetectorModelError {
pub kind: DeleteDetectorModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDetectorModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDetectorModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDetectorModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDetectorModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDetectorModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDetectorModelError {
fn code(&self) -> Option<&str> {
DeleteDetectorModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDetectorModelError {
pub fn new(kind: DeleteDetectorModelErrorKind, 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: DeleteDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDetectorModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDetectorModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteDetectorModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDetectorModelErrorKind::InternalFailureException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDetectorModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAlarmModelError {
pub kind: DeleteAlarmModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAlarmModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAlarmModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAlarmModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAlarmModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteAlarmModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAlarmModelError {
fn code(&self) -> Option<&str> {
DeleteAlarmModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAlarmModelError {
pub fn new(kind: DeleteAlarmModelErrorKind, 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: DeleteAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAlarmModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAlarmModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteAlarmModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAlarmModelErrorKind::InternalFailureException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteAlarmModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateInputError {
pub kind: CreateInputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateInputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateInputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateInputErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateInputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateInputErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
CreateInputErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateInputErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateInputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateInputErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateInputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateInputError {
fn code(&self) -> Option<&str> {
CreateInputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateInputError {
pub fn new(kind: CreateInputErrorKind, 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: CreateInputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateInputErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateInputErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, CreateInputErrorKind::InvalidRequestException(_))
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateInputErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateInputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateInputErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for CreateInputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateInputErrorKind::InternalFailureException(_inner) => Some(_inner),
CreateInputErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateInputErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateInputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateInputErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateInputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ResourceAlreadyExistsException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl ResourceAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceAlreadyExistsException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceAlreadyExistsException {}
pub mod resource_already_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_arn: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(self) -> crate::error::ResourceAlreadyExistsException {
crate::error::ResourceAlreadyExistsException {
message: self.message,
resource_id: self.resource_id,
resource_arn: self.resource_arn,
}
}
}
}
impl ResourceAlreadyExistsException {
pub fn builder() -> crate::error::resource_already_exists_exception::Builder {
crate::error::resource_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDetectorModelError {
pub kind: CreateDetectorModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDetectorModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDetectorModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDetectorModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDetectorModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDetectorModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDetectorModelError {
fn code(&self) -> Option<&str> {
CreateDetectorModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDetectorModelError {
pub fn new(kind: CreateDetectorModelErrorKind, 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: CreateDetectorModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDetectorModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDetectorModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateDetectorModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDetectorModelErrorKind::InternalFailureException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDetectorModelErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAlarmModelError {
pub kind: CreateAlarmModelErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAlarmModelError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAlarmModelErrorKind {
InternalFailureException(crate::error::InternalFailureException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceInUseException(crate::error::ResourceInUseException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAlarmModelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAlarmModelErrorKind::InternalFailureException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateAlarmModelErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAlarmModelError {
fn code(&self) -> Option<&str> {
CreateAlarmModelError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAlarmModelError {
pub fn new(kind: CreateAlarmModelErrorKind, 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: CreateAlarmModelErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAlarmModelErrorKind::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_failure_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::InternalFailureException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::ResourceInUseException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateAlarmModelErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateAlarmModelError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAlarmModelErrorKind::InternalFailureException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateAlarmModelErrorKind::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 _)
}
}