#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSubscriptionError {
pub kind: UpdateSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSubscriptionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
LockedSubscriptionException(crate::error::LockedSubscriptionException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSubscriptionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateSubscriptionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateSubscriptionErrorKind::LockedSubscriptionException(_inner) => _inner.fmt(f),
UpdateSubscriptionErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
UpdateSubscriptionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSubscriptionError {
fn code(&self) -> Option<&str> {
UpdateSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSubscriptionError {
pub fn new(kind: UpdateSubscriptionErrorKind, 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: UpdateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriptionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriptionErrorKind::InvalidParameterException(_)
)
}
pub fn is_locked_subscription_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriptionErrorKind::LockedSubscriptionException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriptionErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubscriptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSubscriptionErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateSubscriptionErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateSubscriptionErrorKind::LockedSubscriptionException(_inner) => Some(_inner),
UpdateSubscriptionErrorKind::OptimisticLockException(_inner) => Some(_inner),
UpdateSubscriptionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
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_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
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>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_type: self.resource_type,
}
}
}
}
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 OptimisticLockException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OptimisticLockException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OptimisticLockException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OptimisticLockException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for OptimisticLockException {}
pub mod optimistic_lock_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::OptimisticLockException {
crate::error::OptimisticLockException {
message: self.message,
}
}
}
}
impl OptimisticLockException {
pub fn builder() -> crate::error::optimistic_lock_exception::Builder {
crate::error::optimistic_lock_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LockedSubscriptionException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LockedSubscriptionException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LockedSubscriptionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LockedSubscriptionException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for LockedSubscriptionException {}
pub mod locked_subscription_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LockedSubscriptionException {
crate::error::LockedSubscriptionException {
message: self.message,
}
}
}
}
impl LockedSubscriptionException {
pub fn builder() -> crate::error::locked_subscription_exception::Builder {
crate::error::locked_subscription_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
pub fields: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl InvalidParameterException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn fields(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.fields.as_deref()
}
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_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) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) fields:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn fields(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.fields.unwrap_or_default();
v.push(input);
self.fields = Some(v);
self
}
pub fn set_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.fields = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
reason: self.reason,
fields: self.fields,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalErrorException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalErrorException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalErrorException {}
pub mod internal_error_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalErrorException {
crate::error::InternalErrorException {
message: self.message,
}
}
}
}
impl InternalErrorException {
pub fn builder() -> crate::error::internal_error_exception::Builder {
crate::error::internal_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateProtectionGroupError {
pub kind: UpdateProtectionGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateProtectionGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateProtectionGroupErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateProtectionGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateProtectionGroupErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
UpdateProtectionGroupErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateProtectionGroupErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
UpdateProtectionGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateProtectionGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateProtectionGroupError {
fn code(&self) -> Option<&str> {
UpdateProtectionGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateProtectionGroupError {
pub fn new(kind: UpdateProtectionGroupErrorKind, 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: UpdateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateProtectionGroupErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateProtectionGroupErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
UpdateProtectionGroupErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateProtectionGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateProtectionGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateProtectionGroupErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateProtectionGroupErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateProtectionGroupErrorKind::OptimisticLockException(_inner) => Some(_inner),
UpdateProtectionGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateProtectionGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEmergencyContactSettingsError {
pub kind: UpdateEmergencyContactSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEmergencyContactSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEmergencyContactSettingsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEmergencyContactSettingsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEmergencyContactSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEmergencyContactSettingsErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
UpdateEmergencyContactSettingsErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
UpdateEmergencyContactSettingsErrorKind::OptimisticLockException(_inner) => {
_inner.fmt(f)
}
UpdateEmergencyContactSettingsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateEmergencyContactSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEmergencyContactSettingsError {
fn code(&self) -> Option<&str> {
UpdateEmergencyContactSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEmergencyContactSettingsError {
pub fn new(
kind: UpdateEmergencyContactSettingsErrorKind,
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: UpdateEmergencyContactSettingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEmergencyContactSettingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEmergencyContactSettingsErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEmergencyContactSettingsErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEmergencyContactSettingsErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEmergencyContactSettingsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateEmergencyContactSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEmergencyContactSettingsErrorKind::InternalErrorException(_inner) => Some(_inner),
UpdateEmergencyContactSettingsErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
UpdateEmergencyContactSettingsErrorKind::OptimisticLockException(_inner) => {
Some(_inner)
}
UpdateEmergencyContactSettingsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateEmergencyContactSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateApplicationLayerAutomaticResponseError {
pub kind: UpdateApplicationLayerAutomaticResponseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for UpdateApplicationLayerAutomaticResponseError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateApplicationLayerAutomaticResponseErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateApplicationLayerAutomaticResponseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_inner) => {
_inner.fmt(f)
}
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
UpdateApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
_inner.fmt(f)
}
UpdateApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateApplicationLayerAutomaticResponseError {
fn code(&self) -> Option<&str> {
UpdateApplicationLayerAutomaticResponseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateApplicationLayerAutomaticResponseError {
pub fn new(
kind: UpdateApplicationLayerAutomaticResponseErrorKind,
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: UpdateApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateApplicationLayerAutomaticResponseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_inner) => {
Some(_inner)
}
UpdateApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
UpdateApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
Some(_inner)
}
UpdateApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidOperationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidOperationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidOperationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidOperationException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidOperationException {}
pub mod invalid_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidOperationException {
crate::error::InvalidOperationException {
message: self.message,
}
}
}
}
impl InvalidOperationException {
pub fn builder() -> crate::error::invalid_operation_exception::Builder {
crate::error::invalid_operation_exception::Builder::default()
}
}
#[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 {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InternalErrorException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(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_error_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidResourceException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalErrorException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidResourceException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidResourceException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidResourceException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidResourceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidResourceException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidResourceException {}
pub mod invalid_resource_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidResourceException {
crate::error::InvalidResourceException {
message: self.message,
}
}
}
}
impl InvalidResourceException {
pub fn builder() -> crate::error::invalid_resource_exception::Builder {
crate::error::invalid_resource_exception::Builder::default()
}
}
#[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 {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InternalErrorException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(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_error_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalErrorException(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidResourceException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalErrorException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidResourceException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 {
InternalErrorException(crate::error::InternalErrorException),
InvalidResourceException(crate::error::InvalidResourceException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InternalErrorException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(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_error_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidResourceException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalErrorException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidResourceException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListResourcesInProtectionGroupError {
pub kind: ListResourcesInProtectionGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListResourcesInProtectionGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListResourcesInProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListResourcesInProtectionGroupErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListResourcesInProtectionGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListResourcesInProtectionGroupErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
ListResourcesInProtectionGroupErrorKind::InvalidPaginationTokenException(_inner) => {
_inner.fmt(f)
}
ListResourcesInProtectionGroupErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListResourcesInProtectionGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListResourcesInProtectionGroupError {
fn code(&self) -> Option<&str> {
ListResourcesInProtectionGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListResourcesInProtectionGroupError {
pub fn new(
kind: ListResourcesInProtectionGroupErrorKind,
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: ListResourcesInProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListResourcesInProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
ListResourcesInProtectionGroupErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListResourcesInProtectionGroupErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListResourcesInProtectionGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListResourcesInProtectionGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListResourcesInProtectionGroupErrorKind::InternalErrorException(_inner) => Some(_inner),
ListResourcesInProtectionGroupErrorKind::InvalidPaginationTokenException(_inner) => {
Some(_inner)
}
ListResourcesInProtectionGroupErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListResourcesInProtectionGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPaginationTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPaginationTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPaginationTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPaginationTokenException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPaginationTokenException {}
pub mod invalid_pagination_token_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidPaginationTokenException {
crate::error::InvalidPaginationTokenException {
message: self.message,
}
}
}
}
impl InvalidPaginationTokenException {
pub fn builder() -> crate::error::invalid_pagination_token_exception::Builder {
crate::error::invalid_pagination_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListProtectionsError {
pub kind: ListProtectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListProtectionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListProtectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListProtectionsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListProtectionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListProtectionsErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
ListProtectionsErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListProtectionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListProtectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListProtectionsError {
fn code(&self) -> Option<&str> {
ListProtectionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListProtectionsError {
pub fn new(kind: ListProtectionsErrorKind, 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: ListProtectionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListProtectionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionsErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListProtectionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListProtectionsErrorKind::InternalErrorException(_inner) => Some(_inner),
ListProtectionsErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListProtectionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListProtectionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListProtectionGroupsError {
pub kind: ListProtectionGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListProtectionGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListProtectionGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListProtectionGroupsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListProtectionGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListProtectionGroupsErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
ListProtectionGroupsErrorKind::InvalidPaginationTokenException(_inner) => _inner.fmt(f),
ListProtectionGroupsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListProtectionGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListProtectionGroupsError {
fn code(&self) -> Option<&str> {
ListProtectionGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListProtectionGroupsError {
pub fn new(kind: ListProtectionGroupsErrorKind, 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: ListProtectionGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListProtectionGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionGroupsErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_pagination_token_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionGroupsErrorKind::InvalidPaginationTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListProtectionGroupsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListProtectionGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListProtectionGroupsErrorKind::InternalErrorException(_inner) => Some(_inner),
ListProtectionGroupsErrorKind::InvalidPaginationTokenException(_inner) => Some(_inner),
ListProtectionGroupsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListProtectionGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAttacksError {
pub kind: ListAttacksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAttacksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAttacksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAttacksErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAttacksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAttacksErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
ListAttacksErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
ListAttacksErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListAttacksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAttacksError {
fn code(&self) -> Option<&str> {
ListAttacksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAttacksError {
pub fn new(kind: ListAttacksErrorKind, 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: ListAttacksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAttacksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(&self.kind, ListAttacksErrorKind::InternalErrorException(_))
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
ListAttacksErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListAttacksErrorKind::InvalidParameterException(_)
)
}
}
impl std::error::Error for ListAttacksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAttacksErrorKind::InternalErrorException(_inner) => Some(_inner),
ListAttacksErrorKind::InvalidOperationException(_inner) => Some(_inner),
ListAttacksErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListAttacksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSubscriptionStateError {
pub kind: GetSubscriptionStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSubscriptionStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSubscriptionStateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSubscriptionStateErrorKind {
InternalErrorException(crate::error::InternalErrorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSubscriptionStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSubscriptionStateErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
GetSubscriptionStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSubscriptionStateError {
fn code(&self) -> Option<&str> {
GetSubscriptionStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSubscriptionStateError {
pub fn new(kind: GetSubscriptionStateErrorKind, 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: GetSubscriptionStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSubscriptionStateErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
GetSubscriptionStateErrorKind::InternalErrorException(_)
)
}
}
impl std::error::Error for GetSubscriptionStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSubscriptionStateErrorKind::InternalErrorException(_inner) => Some(_inner),
GetSubscriptionStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableProactiveEngagementError {
pub kind: EnableProactiveEngagementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableProactiveEngagementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableProactiveEngagementErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableProactiveEngagementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableProactiveEngagementErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
EnableProactiveEngagementErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
EnableProactiveEngagementErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
EnableProactiveEngagementErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
EnableProactiveEngagementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
EnableProactiveEngagementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableProactiveEngagementError {
fn code(&self) -> Option<&str> {
EnableProactiveEngagementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableProactiveEngagementError {
pub fn new(kind: EnableProactiveEngagementErrorKind, 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: EnableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
EnableProactiveEngagementErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
EnableProactiveEngagementErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
EnableProactiveEngagementErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
EnableProactiveEngagementErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
EnableProactiveEngagementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for EnableProactiveEngagementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableProactiveEngagementErrorKind::InternalErrorException(_inner) => Some(_inner),
EnableProactiveEngagementErrorKind::InvalidOperationException(_inner) => Some(_inner),
EnableProactiveEngagementErrorKind::InvalidParameterException(_inner) => Some(_inner),
EnableProactiveEngagementErrorKind::OptimisticLockException(_inner) => Some(_inner),
EnableProactiveEngagementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
EnableProactiveEngagementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableApplicationLayerAutomaticResponseError {
pub kind: EnableApplicationLayerAutomaticResponseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for EnableApplicationLayerAutomaticResponseError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableApplicationLayerAutomaticResponseErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
LimitsExceededException(crate::error::LimitsExceededException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableApplicationLayerAutomaticResponseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::LimitsExceededException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
EnableApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableApplicationLayerAutomaticResponseError {
fn code(&self) -> Option<&str> {
EnableApplicationLayerAutomaticResponseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableApplicationLayerAutomaticResponseError {
pub fn new(
kind: EnableApplicationLayerAutomaticResponseErrorKind,
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: EnableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_)
)
}
pub fn is_limits_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::LimitsExceededException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
EnableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for EnableApplicationLayerAutomaticResponseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::LimitsExceededException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
EnableApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitsExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub r#type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i64,
}
impl LimitsExceededException {
pub fn r#type(&self) -> std::option::Option<&str> {
self.r#type.as_deref()
}
pub fn limit(&self) -> i64 {
self.limit
}
}
impl LimitsExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitsExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitsExceededException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitsExceededException {}
pub mod limits_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>,
pub(crate) r#type: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i64>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
self.r#type = Some(input.into());
self
}
pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn limit(mut self, input: i64) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i64>) -> Self {
self.limit = input;
self
}
pub fn build(self) -> crate::error::LimitsExceededException {
crate::error::LimitsExceededException {
message: self.message,
r#type: self.r#type,
limit: self.limit.unwrap_or_default(),
}
}
}
}
impl LimitsExceededException {
pub fn builder() -> crate::error::limits_exceeded_exception::Builder {
crate::error::limits_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateHealthCheckError {
pub kind: DisassociateHealthCheckErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateHealthCheckError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateHealthCheckErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateHealthCheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateHealthCheckErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DisassociateHealthCheckErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DisassociateHealthCheckErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
DisassociateHealthCheckErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DisassociateHealthCheckErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateHealthCheckErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateHealthCheckError {
fn code(&self) -> Option<&str> {
DisassociateHealthCheckError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateHealthCheckError {
pub fn new(kind: DisassociateHealthCheckErrorKind, 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: DisassociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateHealthCheckErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateHealthCheckErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateHealthCheckErrorKind::InvalidResourceException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateHealthCheckErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateHealthCheckErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateHealthCheckError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateHealthCheckErrorKind::InternalErrorException(_inner) => Some(_inner),
DisassociateHealthCheckErrorKind::InvalidParameterException(_inner) => Some(_inner),
DisassociateHealthCheckErrorKind::InvalidResourceException(_inner) => Some(_inner),
DisassociateHealthCheckErrorKind::OptimisticLockException(_inner) => Some(_inner),
DisassociateHealthCheckErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateHealthCheckErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateDRTRoleError {
pub kind: DisassociateDRTRoleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateDRTRoleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateDRTRoleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateDRTRoleErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateDRTRoleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateDRTRoleErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DisassociateDRTRoleErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DisassociateDRTRoleErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DisassociateDRTRoleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateDRTRoleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateDRTRoleError {
fn code(&self) -> Option<&str> {
DisassociateDRTRoleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateDRTRoleError {
pub fn new(kind: DisassociateDRTRoleErrorKind, 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: DisassociateDRTRoleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateDRTRoleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTRoleErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTRoleErrorKind::InvalidOperationException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTRoleErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTRoleErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateDRTRoleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateDRTRoleErrorKind::InternalErrorException(_inner) => Some(_inner),
DisassociateDRTRoleErrorKind::InvalidOperationException(_inner) => Some(_inner),
DisassociateDRTRoleErrorKind::OptimisticLockException(_inner) => Some(_inner),
DisassociateDRTRoleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateDRTRoleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateDRTLogBucketError {
pub kind: DisassociateDRTLogBucketErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateDRTLogBucketError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateDRTLogBucketErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateDRTLogBucketErrorKind {
AccessDeniedForDependencyException(crate::error::AccessDeniedForDependencyException),
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
NoAssociatedRoleException(crate::error::NoAssociatedRoleException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateDRTLogBucketError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_inner) => {
_inner.fmt(f)
}
DisassociateDRTLogBucketErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DisassociateDRTLogBucketErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException(_inner) => _inner.fmt(f),
DisassociateDRTLogBucketErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DisassociateDRTLogBucketErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateDRTLogBucketErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateDRTLogBucketError {
fn code(&self) -> Option<&str> {
DisassociateDRTLogBucketError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateDRTLogBucketError {
pub fn new(kind: DisassociateDRTLogBucketErrorKind, 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: DisassociateDRTLogBucketErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateDRTLogBucketErrorKind::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_access_denied_for_dependency_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::InvalidOperationException(_)
)
}
pub fn is_no_associated_role_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateDRTLogBucketErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisassociateDRTLogBucketError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_inner) => {
Some(_inner)
}
DisassociateDRTLogBucketErrorKind::InternalErrorException(_inner) => Some(_inner),
DisassociateDRTLogBucketErrorKind::InvalidOperationException(_inner) => Some(_inner),
DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException(_inner) => Some(_inner),
DisassociateDRTLogBucketErrorKind::OptimisticLockException(_inner) => Some(_inner),
DisassociateDRTLogBucketErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateDRTLogBucketErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NoAssociatedRoleException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NoAssociatedRoleException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NoAssociatedRoleException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NoAssociatedRoleException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for NoAssociatedRoleException {}
pub mod no_associated_role_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::NoAssociatedRoleException {
crate::error::NoAssociatedRoleException {
message: self.message,
}
}
}
}
impl NoAssociatedRoleException {
pub fn builder() -> crate::error::no_associated_role_exception::Builder {
crate::error::no_associated_role_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedForDependencyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedForDependencyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedForDependencyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedForDependencyException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedForDependencyException {}
pub mod access_denied_for_dependency_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedForDependencyException {
crate::error::AccessDeniedForDependencyException {
message: self.message,
}
}
}
}
impl AccessDeniedForDependencyException {
pub fn builder() -> crate::error::access_denied_for_dependency_exception::Builder {
crate::error::access_denied_for_dependency_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableProactiveEngagementError {
pub kind: DisableProactiveEngagementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableProactiveEngagementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableProactiveEngagementErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableProactiveEngagementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableProactiveEngagementErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DisableProactiveEngagementErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DisableProactiveEngagementErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DisableProactiveEngagementErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DisableProactiveEngagementErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisableProactiveEngagementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableProactiveEngagementError {
fn code(&self) -> Option<&str> {
DisableProactiveEngagementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableProactiveEngagementError {
pub fn new(kind: DisableProactiveEngagementErrorKind, 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: DisableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableProactiveEngagementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DisableProactiveEngagementErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisableProactiveEngagementErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DisableProactiveEngagementErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DisableProactiveEngagementErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisableProactiveEngagementErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisableProactiveEngagementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableProactiveEngagementErrorKind::InternalErrorException(_inner) => Some(_inner),
DisableProactiveEngagementErrorKind::InvalidOperationException(_inner) => Some(_inner),
DisableProactiveEngagementErrorKind::InvalidParameterException(_inner) => Some(_inner),
DisableProactiveEngagementErrorKind::OptimisticLockException(_inner) => Some(_inner),
DisableProactiveEngagementErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisableProactiveEngagementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableApplicationLayerAutomaticResponseError {
pub kind: DisableApplicationLayerAutomaticResponseErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DisableApplicationLayerAutomaticResponseError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableApplicationLayerAutomaticResponseErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableApplicationLayerAutomaticResponseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DisableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(
_inner,
) => _inner.fmt(f),
DisableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(
_inner,
) => _inner.fmt(f),
DisableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
_inner.fmt(f)
}
DisableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
DisableApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableApplicationLayerAutomaticResponseError {
fn code(&self) -> Option<&str> {
DisableApplicationLayerAutomaticResponseError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableApplicationLayerAutomaticResponseError {
pub fn new(
kind: DisableApplicationLayerAutomaticResponseErrorKind,
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: DisableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableApplicationLayerAutomaticResponseErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DisableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DisableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DisableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DisableApplicationLayerAutomaticResponseError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableApplicationLayerAutomaticResponseErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DisableApplicationLayerAutomaticResponseErrorKind::InvalidOperationException(
_inner,
) => Some(_inner),
DisableApplicationLayerAutomaticResponseErrorKind::InvalidParameterException(
_inner,
) => Some(_inner),
DisableApplicationLayerAutomaticResponseErrorKind::OptimisticLockException(_inner) => {
Some(_inner)
}
DisableApplicationLayerAutomaticResponseErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
DisableApplicationLayerAutomaticResponseErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSubscriptionError {
pub kind: DescribeSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSubscriptionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSubscriptionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeSubscriptionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSubscriptionError {
fn code(&self) -> Option<&str> {
DescribeSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSubscriptionError {
pub fn new(kind: DescribeSubscriptionErrorKind, 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: DescribeSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscriptionErrorKind::InternalErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSubscriptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSubscriptionErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeSubscriptionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeProtectionGroupError {
pub kind: DescribeProtectionGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeProtectionGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeProtectionGroupErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeProtectionGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeProtectionGroupErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeProtectionGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeProtectionGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeProtectionGroupError {
fn code(&self) -> Option<&str> {
DescribeProtectionGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeProtectionGroupError {
pub fn new(kind: DescribeProtectionGroupErrorKind, 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: DescribeProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeProtectionGroupErrorKind::InternalErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeProtectionGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeProtectionGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeProtectionGroupErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeProtectionGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeProtectionGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeProtectionError {
pub kind: DescribeProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeProtectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeProtectionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeProtectionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeProtectionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeProtectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeProtectionError {
fn code(&self) -> Option<&str> {
DescribeProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeProtectionError {
pub fn new(kind: DescribeProtectionErrorKind, 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: DescribeProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeProtectionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeProtectionErrorKind::InvalidParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeProtectionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeProtectionErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeProtectionErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeProtectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEmergencyContactSettingsError {
pub kind: DescribeEmergencyContactSettingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEmergencyContactSettingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEmergencyContactSettingsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEmergencyContactSettingsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEmergencyContactSettingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEmergencyContactSettingsErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
DescribeEmergencyContactSettingsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeEmergencyContactSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEmergencyContactSettingsError {
fn code(&self) -> Option<&str> {
DescribeEmergencyContactSettingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEmergencyContactSettingsError {
pub fn new(
kind: DescribeEmergencyContactSettingsErrorKind,
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: DescribeEmergencyContactSettingsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEmergencyContactSettingsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEmergencyContactSettingsErrorKind::InternalErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEmergencyContactSettingsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeEmergencyContactSettingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEmergencyContactSettingsErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
DescribeEmergencyContactSettingsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeEmergencyContactSettingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDRTAccessError {
pub kind: DescribeDRTAccessErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDRTAccessError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDRTAccessErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDRTAccessErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDRTAccessError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDRTAccessErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeDRTAccessErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDRTAccessErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDRTAccessError {
fn code(&self) -> Option<&str> {
DescribeDRTAccessError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDRTAccessError {
pub fn new(kind: DescribeDRTAccessErrorKind, 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: DescribeDRTAccessErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDRTAccessErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDRTAccessErrorKind::InternalErrorException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDRTAccessErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDRTAccessError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDRTAccessErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeDRTAccessErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDRTAccessErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAttackStatisticsError {
pub kind: DescribeAttackStatisticsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAttackStatisticsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAttackStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAttackStatisticsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAttackStatisticsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAttackStatisticsErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeAttackStatisticsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAttackStatisticsError {
fn code(&self) -> Option<&str> {
DescribeAttackStatisticsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAttackStatisticsError {
pub fn new(kind: DescribeAttackStatisticsErrorKind, 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: DescribeAttackStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAttackStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAttackStatisticsErrorKind::InternalErrorException(_)
)
}
}
impl std::error::Error for DescribeAttackStatisticsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAttackStatisticsErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeAttackStatisticsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAttackError {
pub kind: DescribeAttackErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAttackError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAttackErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAttackErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalErrorException(crate::error::InternalErrorException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAttackError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAttackErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeAttackErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DescribeAttackErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAttackError {
fn code(&self) -> Option<&str> {
DescribeAttackError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAttackError {
pub fn new(kind: DescribeAttackErrorKind, 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: DescribeAttackErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAttackErrorKind::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_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAttackErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAttackErrorKind::InternalErrorException(_)
)
}
}
impl std::error::Error for DescribeAttackError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAttackErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeAttackErrorKind::InternalErrorException(_inner) => Some(_inner),
DescribeAttackErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_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 {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSubscriptionError {
pub kind: DeleteSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSubscriptionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
LockedSubscriptionException(crate::error::LockedSubscriptionException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSubscriptionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteSubscriptionErrorKind::LockedSubscriptionException(_inner) => _inner.fmt(f),
DeleteSubscriptionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSubscriptionError {
fn code(&self) -> Option<&str> {
DeleteSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSubscriptionError {
pub fn new(kind: DeleteSubscriptionErrorKind, 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: DeleteSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriptionErrorKind::InternalErrorException(_)
)
}
pub fn is_locked_subscription_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriptionErrorKind::LockedSubscriptionException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSubscriptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSubscriptionErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteSubscriptionErrorKind::LockedSubscriptionException(_inner) => Some(_inner),
DeleteSubscriptionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteProtectionGroupError {
pub kind: DeleteProtectionGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteProtectionGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteProtectionGroupErrorKind {
InternalErrorException(crate::error::InternalErrorException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteProtectionGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteProtectionGroupErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteProtectionGroupErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DeleteProtectionGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteProtectionGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteProtectionGroupError {
fn code(&self) -> Option<&str> {
DeleteProtectionGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteProtectionGroupError {
pub fn new(kind: DeleteProtectionGroupErrorKind, 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: DeleteProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionGroupErrorKind::InternalErrorException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionGroupErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteProtectionGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteProtectionGroupErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteProtectionGroupErrorKind::OptimisticLockException(_inner) => Some(_inner),
DeleteProtectionGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteProtectionGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteProtectionError {
pub kind: DeleteProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteProtectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteProtectionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteProtectionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
DeleteProtectionErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
DeleteProtectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteProtectionError {
fn code(&self) -> Option<&str> {
DeleteProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteProtectionError {
pub fn new(kind: DeleteProtectionErrorKind, 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: DeleteProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionErrorKind::InternalErrorException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteProtectionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteProtectionErrorKind::InternalErrorException(_inner) => Some(_inner),
DeleteProtectionErrorKind::OptimisticLockException(_inner) => Some(_inner),
DeleteProtectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSubscriptionError {
pub kind: CreateSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSubscriptionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSubscriptionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateSubscriptionErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSubscriptionError {
fn code(&self) -> Option<&str> {
CreateSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSubscriptionError {
pub fn new(kind: CreateSubscriptionErrorKind, 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: CreateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriptionErrorKind::InternalErrorException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateSubscriptionErrorKind::ResourceAlreadyExistsException(_)
)
}
}
impl std::error::Error for CreateSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSubscriptionErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateSubscriptionErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResourceAlreadyExistsException {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.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_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
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_type: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ResourceAlreadyExistsException {
crate::error::ResourceAlreadyExistsException {
message: self.message,
resource_type: self.resource_type,
}
}
}
}
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 CreateProtectionGroupError {
pub kind: CreateProtectionGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateProtectionGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateProtectionGroupErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
LimitsExceededException(crate::error::LimitsExceededException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateProtectionGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateProtectionGroupErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::LimitsExceededException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateProtectionGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateProtectionGroupError {
fn code(&self) -> Option<&str> {
CreateProtectionGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateProtectionGroupError {
pub fn new(kind: CreateProtectionGroupErrorKind, 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: CreateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateProtectionGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::InvalidParameterException(_)
)
}
pub fn is_limits_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::LimitsExceededException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionGroupErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateProtectionGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateProtectionGroupErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::LimitsExceededException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::OptimisticLockException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateProtectionGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateProtectionError {
pub kind: CreateProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateProtectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateProtectionErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
LimitsExceededException(crate::error::LimitsExceededException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateProtectionErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::LimitsExceededException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateProtectionError {
fn code(&self) -> Option<&str> {
CreateProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateProtectionError {
pub fn new(kind: CreateProtectionErrorKind, 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: CreateProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateProtectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::InvalidResourceException(_)
)
}
pub fn is_limits_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::LimitsExceededException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::ResourceAlreadyExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateProtectionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateProtectionErrorKind::InternalErrorException(_inner) => Some(_inner),
CreateProtectionErrorKind::InvalidOperationException(_inner) => Some(_inner),
CreateProtectionErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateProtectionErrorKind::InvalidResourceException(_inner) => Some(_inner),
CreateProtectionErrorKind::LimitsExceededException(_inner) => Some(_inner),
CreateProtectionErrorKind::OptimisticLockException(_inner) => Some(_inner),
CreateProtectionErrorKind::ResourceAlreadyExistsException(_inner) => Some(_inner),
CreateProtectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateProactiveEngagementDetailsError {
pub kind: AssociateProactiveEngagementDetailsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateProactiveEngagementDetailsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateProactiveEngagementDetailsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateProactiveEngagementDetailsErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateProactiveEngagementDetailsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateProactiveEngagementDetailsErrorKind::InternalErrorException(_inner) => {
_inner.fmt(f)
}
AssociateProactiveEngagementDetailsErrorKind::InvalidOperationException(_inner) => {
_inner.fmt(f)
}
AssociateProactiveEngagementDetailsErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
AssociateProactiveEngagementDetailsErrorKind::OptimisticLockException(_inner) => {
_inner.fmt(f)
}
AssociateProactiveEngagementDetailsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateProactiveEngagementDetailsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateProactiveEngagementDetailsError {
fn code(&self) -> Option<&str> {
AssociateProactiveEngagementDetailsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateProactiveEngagementDetailsError {
pub fn new(
kind: AssociateProactiveEngagementDetailsErrorKind,
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: AssociateProactiveEngagementDetailsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateProactiveEngagementDetailsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateProactiveEngagementDetailsErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateProactiveEngagementDetailsErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AssociateProactiveEngagementDetailsErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
AssociateProactiveEngagementDetailsErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateProactiveEngagementDetailsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateProactiveEngagementDetailsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateProactiveEngagementDetailsErrorKind::InternalErrorException(_inner) => {
Some(_inner)
}
AssociateProactiveEngagementDetailsErrorKind::InvalidOperationException(_inner) => {
Some(_inner)
}
AssociateProactiveEngagementDetailsErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
AssociateProactiveEngagementDetailsErrorKind::OptimisticLockException(_inner) => {
Some(_inner)
}
AssociateProactiveEngagementDetailsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AssociateProactiveEngagementDetailsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateHealthCheckError {
pub kind: AssociateHealthCheckErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateHealthCheckError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateHealthCheckErrorKind {
InternalErrorException(crate::error::InternalErrorException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
LimitsExceededException(crate::error::LimitsExceededException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateHealthCheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateHealthCheckErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::InvalidResourceException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::LimitsExceededException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateHealthCheckErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateHealthCheckError {
fn code(&self) -> Option<&str> {
AssociateHealthCheckError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateHealthCheckError {
pub fn new(kind: AssociateHealthCheckErrorKind, 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: AssociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_resource_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::InvalidResourceException(_)
)
}
pub fn is_limits_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::LimitsExceededException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateHealthCheckErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateHealthCheckError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateHealthCheckErrorKind::InternalErrorException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::InvalidParameterException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::InvalidResourceException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::LimitsExceededException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::OptimisticLockException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateHealthCheckErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateDRTRoleError {
pub kind: AssociateDRTRoleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateDRTRoleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateDRTRoleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateDRTRoleErrorKind {
AccessDeniedForDependencyException(crate::error::AccessDeniedForDependencyException),
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateDRTRoleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateDRTRoleErrorKind::AccessDeniedForDependencyException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateDRTRoleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateDRTRoleError {
fn code(&self) -> Option<&str> {
AssociateDRTRoleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateDRTRoleError {
pub fn new(kind: AssociateDRTRoleErrorKind, 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: AssociateDRTRoleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateDRTRoleErrorKind::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_access_denied_for_dependency_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::AccessDeniedForDependencyException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::InvalidParameterException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTRoleErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateDRTRoleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateDRTRoleErrorKind::AccessDeniedForDependencyException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::InternalErrorException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::InvalidOperationException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::InvalidParameterException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::OptimisticLockException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateDRTRoleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateDRTLogBucketError {
pub kind: AssociateDRTLogBucketErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateDRTLogBucketError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateDRTLogBucketErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateDRTLogBucketErrorKind {
AccessDeniedForDependencyException(crate::error::AccessDeniedForDependencyException),
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidParameterException(crate::error::InvalidParameterException),
LimitsExceededException(crate::error::LimitsExceededException),
NoAssociatedRoleException(crate::error::NoAssociatedRoleException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateDRTLogBucketError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_inner) => {
_inner.fmt(f)
}
AssociateDRTLogBucketErrorKind::InternalErrorException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::LimitsExceededException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::NoAssociatedRoleException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::OptimisticLockException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateDRTLogBucketErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateDRTLogBucketError {
fn code(&self) -> Option<&str> {
AssociateDRTLogBucketError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateDRTLogBucketError {
pub fn new(kind: AssociateDRTLogBucketErrorKind, 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: AssociateDRTLogBucketErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateDRTLogBucketErrorKind::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_access_denied_for_dependency_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_)
)
}
pub fn is_internal_error_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::InternalErrorException(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::InvalidParameterException(_)
)
}
pub fn is_limits_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::LimitsExceededException(_)
)
}
pub fn is_no_associated_role_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::NoAssociatedRoleException(_)
)
}
pub fn is_optimistic_lock_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::OptimisticLockException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateDRTLogBucketErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for AssociateDRTLogBucketError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(_inner) => {
Some(_inner)
}
AssociateDRTLogBucketErrorKind::InternalErrorException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::InvalidOperationException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::InvalidParameterException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::LimitsExceededException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::NoAssociatedRoleException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::OptimisticLockException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateDRTLogBucketErrorKind::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 _)
}
}