#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSubnetChangeProtectionError {
pub kind: UpdateSubnetChangeProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSubnetChangeProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSubnetChangeProtectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSubnetChangeProtectionErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceOwnerCheckException(crate::error::ResourceOwnerCheckException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSubnetChangeProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSubnetChangeProtectionErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateSubnetChangeProtectionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateSubnetChangeProtectionErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateSubnetChangeProtectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateSubnetChangeProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
_inner.fmt(f)
}
UpdateSubnetChangeProtectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateSubnetChangeProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSubnetChangeProtectionError {
fn code(&self) -> Option<&str> {
UpdateSubnetChangeProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSubnetChangeProtectionError {
pub fn new(kind: UpdateSubnetChangeProtectionErrorKind, 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: UpdateSubnetChangeProtectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSubnetChangeProtectionErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_owner_check_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::ResourceOwnerCheckException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSubnetChangeProtectionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateSubnetChangeProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSubnetChangeProtectionErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateSubnetChangeProtectionErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateSubnetChangeProtectionErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateSubnetChangeProtectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateSubnetChangeProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
Some(_inner)
}
UpdateSubnetChangeProtectionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateSubnetChangeProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceOwnerCheckException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceOwnerCheckException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceOwnerCheckException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceOwnerCheckException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceOwnerCheckException {}
pub mod resource_owner_check_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::ResourceOwnerCheckException {
crate::error::ResourceOwnerCheckException {
message: self.message,
}
}
}
}
impl ResourceOwnerCheckException {
pub fn builder() -> crate::error::resource_owner_check_exception::Builder {
crate::error::resource_owner_check_exception::Builder::default()
}
}
#[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>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidTokenException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidTokenException {}
pub mod invalid_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::InvalidTokenException {
crate::error::InvalidTokenException {
message: self.message,
}
}
}
}
impl InvalidTokenException {
pub fn builder() -> crate::error::invalid_token_exception::Builder {
crate::error::invalid_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerError {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerError")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerError {}
pub mod internal_server_error {
#[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::InternalServerError {
crate::error::InternalServerError {
message: self.message,
}
}
}
}
impl InternalServerError {
pub fn builder() -> crate::error::internal_server_error::Builder {
crate::error::internal_server_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRuleGroupError {
pub kind: UpdateRuleGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRuleGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRuleGroupErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRuleGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRuleGroupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateRuleGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateRuleGroupErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateRuleGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateRuleGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateRuleGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRuleGroupError {
fn code(&self) -> Option<&str> {
UpdateRuleGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateRuleGroupError {
pub fn new(kind: UpdateRuleGroupErrorKind, 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: UpdateRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRuleGroupErrorKind::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_server_error(&self) -> bool {
matches!(&self.kind, UpdateRuleGroupErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleGroupErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleGroupErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRuleGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateRuleGroupErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for UpdateRuleGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRuleGroupErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateRuleGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateRuleGroupErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateRuleGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateRuleGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateRuleGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLoggingConfigurationError {
pub kind: UpdateLoggingConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLoggingConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLoggingConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLoggingConfigurationErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
LogDestinationPermissionException(crate::error::LogDestinationPermissionException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateLoggingConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLoggingConfigurationErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateLoggingConfigurationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateLoggingConfigurationErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateLoggingConfigurationErrorKind::LogDestinationPermissionException(_inner) => {
_inner.fmt(f)
}
UpdateLoggingConfigurationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateLoggingConfigurationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateLoggingConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLoggingConfigurationError {
fn code(&self) -> Option<&str> {
UpdateLoggingConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLoggingConfigurationError {
pub fn new(kind: UpdateLoggingConfigurationErrorKind, 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: UpdateLoggingConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLoggingConfigurationErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::InvalidTokenException(_)
)
}
pub fn is_log_destination_permission_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::LogDestinationPermissionException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLoggingConfigurationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateLoggingConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLoggingConfigurationErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateLoggingConfigurationErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateLoggingConfigurationErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateLoggingConfigurationErrorKind::LogDestinationPermissionException(_inner) => {
Some(_inner)
}
UpdateLoggingConfigurationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateLoggingConfigurationErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateLoggingConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LogDestinationPermissionException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LogDestinationPermissionException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LogDestinationPermissionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LogDestinationPermissionException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for LogDestinationPermissionException {}
pub mod log_destination_permission_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::LogDestinationPermissionException {
crate::error::LogDestinationPermissionException {
message: self.message,
}
}
}
}
impl LogDestinationPermissionException {
pub fn builder() -> crate::error::log_destination_permission_exception::Builder {
crate::error::log_destination_permission_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFirewallPolicyChangeProtectionError {
pub kind: UpdateFirewallPolicyChangeProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFirewallPolicyChangeProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFirewallPolicyChangeProtectionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFirewallPolicyChangeProtectionErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceOwnerCheckException(crate::error::ResourceOwnerCheckException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFirewallPolicyChangeProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFirewallPolicyChangeProtectionErrorKind::InternalServerError(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidTokenException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallPolicyChangeProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFirewallPolicyChangeProtectionError {
fn code(&self) -> Option<&str> {
UpdateFirewallPolicyChangeProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFirewallPolicyChangeProtectionError {
pub fn new(
kind: UpdateFirewallPolicyChangeProtectionErrorKind,
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: UpdateFirewallPolicyChangeProtectionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFirewallPolicyChangeProtectionErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_owner_check_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceOwnerCheckException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyChangeProtectionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateFirewallPolicyChangeProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFirewallPolicyChangeProtectionErrorKind::InternalServerError(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::InvalidTokenException(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
UpdateFirewallPolicyChangeProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFirewallPolicyError {
pub kind: UpdateFirewallPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFirewallPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFirewallPolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFirewallPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFirewallPolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateFirewallPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateFirewallPolicyErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateFirewallPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateFirewallPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFirewallPolicyError {
fn code(&self) -> Option<&str> {
UpdateFirewallPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFirewallPolicyError {
pub fn new(kind: UpdateFirewallPolicyErrorKind, 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: UpdateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFirewallPolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallPolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateFirewallPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFirewallPolicyErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateFirewallPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateFirewallPolicyErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateFirewallPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateFirewallPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFirewallEncryptionConfigurationError {
pub kind: UpdateFirewallEncryptionConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFirewallEncryptionConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFirewallEncryptionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFirewallEncryptionConfigurationErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceOwnerCheckException(crate::error::ResourceOwnerCheckException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFirewallEncryptionConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFirewallEncryptionConfigurationErrorKind::InternalServerError(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::InvalidTokenException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::ResourceOwnerCheckException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallEncryptionConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFirewallEncryptionConfigurationError {
fn code(&self) -> Option<&str> {
UpdateFirewallEncryptionConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFirewallEncryptionConfigurationError {
pub fn new(
kind: UpdateFirewallEncryptionConfigurationErrorKind,
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: UpdateFirewallEncryptionConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFirewallEncryptionConfigurationErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_owner_check_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::ResourceOwnerCheckException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallEncryptionConfigurationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateFirewallEncryptionConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFirewallEncryptionConfigurationErrorKind::InternalServerError(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::InvalidTokenException(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::ResourceOwnerCheckException(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
UpdateFirewallEncryptionConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFirewallDescriptionError {
pub kind: UpdateFirewallDescriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFirewallDescriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFirewallDescriptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFirewallDescriptionErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFirewallDescriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFirewallDescriptionErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateFirewallDescriptionErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateFirewallDescriptionErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateFirewallDescriptionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateFirewallDescriptionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateFirewallDescriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFirewallDescriptionError {
fn code(&self) -> Option<&str> {
UpdateFirewallDescriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFirewallDescriptionError {
pub fn new(kind: UpdateFirewallDescriptionErrorKind, 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: UpdateFirewallDescriptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFirewallDescriptionErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDescriptionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDescriptionErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDescriptionErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDescriptionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDescriptionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateFirewallDescriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFirewallDescriptionErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateFirewallDescriptionErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateFirewallDescriptionErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateFirewallDescriptionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateFirewallDescriptionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateFirewallDescriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFirewallDeleteProtectionError {
pub kind: UpdateFirewallDeleteProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFirewallDeleteProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFirewallDeleteProtectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFirewallDeleteProtectionErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ResourceOwnerCheckException(crate::error::ResourceOwnerCheckException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFirewallDeleteProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFirewallDeleteProtectionErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UpdateFirewallDeleteProtectionErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallDeleteProtectionErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
UpdateFirewallDeleteProtectionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallDeleteProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
_inner.fmt(f)
}
UpdateFirewallDeleteProtectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateFirewallDeleteProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFirewallDeleteProtectionError {
fn code(&self) -> Option<&str> {
UpdateFirewallDeleteProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFirewallDeleteProtectionError {
pub fn new(
kind: UpdateFirewallDeleteProtectionErrorKind,
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: UpdateFirewallDeleteProtectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFirewallDeleteProtectionErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_resource_owner_check_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::ResourceOwnerCheckException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFirewallDeleteProtectionErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateFirewallDeleteProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFirewallDeleteProtectionErrorKind::InternalServerError(_inner) => Some(_inner),
UpdateFirewallDeleteProtectionErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
UpdateFirewallDeleteProtectionErrorKind::InvalidTokenException(_inner) => Some(_inner),
UpdateFirewallDeleteProtectionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateFirewallDeleteProtectionErrorKind::ResourceOwnerCheckException(_inner) => {
Some(_inner)
}
UpdateFirewallDeleteProtectionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateFirewallDeleteProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalServerError(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalServerError(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutResourcePolicyError {
pub kind: PutResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutResourcePolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidResourcePolicyException(crate::error::InvalidResourcePolicyException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutResourcePolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::InvalidResourcePolicyException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutResourcePolicyError {
fn code(&self) -> Option<&str> {
PutResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutResourcePolicyError {
pub fn new(kind: PutResourcePolicyErrorKind, 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: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutResourcePolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_resource_policy_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InvalidResourcePolicyException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for PutResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutResourcePolicyErrorKind::InternalServerError(_inner) => Some(_inner),
PutResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::InvalidResourcePolicyException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidResourcePolicyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidResourcePolicyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidResourcePolicyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidResourcePolicyException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidResourcePolicyException {}
pub mod invalid_resource_policy_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::InvalidResourcePolicyException {
crate::error::InvalidResourcePolicyException {
message: self.message,
}
}
}
}
impl InvalidResourcePolicyException {
pub fn builder() -> crate::error::invalid_resource_policy_exception::Builder {
crate::error::invalid_resource_policy_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerError(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListRuleGroupsError {
pub kind: ListRuleGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListRuleGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListRuleGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListRuleGroupsErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListRuleGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListRuleGroupsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListRuleGroupsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListRuleGroupsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListRuleGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListRuleGroupsError {
fn code(&self) -> Option<&str> {
ListRuleGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListRuleGroupsError {
pub fn new(kind: ListRuleGroupsErrorKind, 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: ListRuleGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListRuleGroupsErrorKind::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_server_error(&self) -> bool {
matches!(&self.kind, ListRuleGroupsErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListRuleGroupsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListRuleGroupsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListRuleGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListRuleGroupsErrorKind::InternalServerError(_inner) => Some(_inner),
ListRuleGroupsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListRuleGroupsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListRuleGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListFirewallsError {
pub kind: ListFirewallsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListFirewallsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListFirewallsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListFirewallsErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListFirewallsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListFirewallsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListFirewallsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListFirewallsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListFirewallsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListFirewallsError {
fn code(&self) -> Option<&str> {
ListFirewallsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListFirewallsError {
pub fn new(kind: ListFirewallsErrorKind, 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: ListFirewallsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListFirewallsErrorKind::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_server_error(&self) -> bool {
matches!(&self.kind, ListFirewallsErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListFirewallsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListFirewallsErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListFirewallsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListFirewallsErrorKind::InternalServerError(_inner) => Some(_inner),
ListFirewallsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListFirewallsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListFirewallsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListFirewallPoliciesError {
pub kind: ListFirewallPoliciesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListFirewallPoliciesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListFirewallPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListFirewallPoliciesErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListFirewallPoliciesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListFirewallPoliciesErrorKind::InternalServerError(_inner) => _inner.fmt(f),
ListFirewallPoliciesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListFirewallPoliciesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListFirewallPoliciesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListFirewallPoliciesError {
fn code(&self) -> Option<&str> {
ListFirewallPoliciesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListFirewallPoliciesError {
pub fn new(kind: ListFirewallPoliciesErrorKind, 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: ListFirewallPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListFirewallPoliciesErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
ListFirewallPoliciesErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListFirewallPoliciesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListFirewallPoliciesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListFirewallPoliciesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListFirewallPoliciesErrorKind::InternalServerError(_inner) => Some(_inner),
ListFirewallPoliciesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListFirewallPoliciesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListFirewallPoliciesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateSubnetsError {
pub kind: DisassociateSubnetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateSubnetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateSubnetsErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateSubnetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateSubnetsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateSubnetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateSubnetsError {
fn code(&self) -> Option<&str> {
DisassociateSubnetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateSubnetsError {
pub fn new(kind: DisassociateSubnetsErrorKind, 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: DisassociateSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateSubnetsErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateSubnetsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DisassociateSubnetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateSubnetsErrorKind::InternalServerError(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::InvalidOperationException(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::InvalidRequestException(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::InvalidTokenException(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateSubnetsErrorKind::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_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
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 DescribeRuleGroupMetadataError {
pub kind: DescribeRuleGroupMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRuleGroupMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRuleGroupMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRuleGroupMetadataErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRuleGroupMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRuleGroupMetadataErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeRuleGroupMetadataErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeRuleGroupMetadataErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeRuleGroupMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeRuleGroupMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRuleGroupMetadataError {
fn code(&self) -> Option<&str> {
DescribeRuleGroupMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRuleGroupMetadataError {
pub fn new(kind: DescribeRuleGroupMetadataErrorKind, 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: DescribeRuleGroupMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRuleGroupMetadataErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupMetadataErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupMetadataErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupMetadataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupMetadataErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeRuleGroupMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRuleGroupMetadataErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeRuleGroupMetadataErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeRuleGroupMetadataErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeRuleGroupMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeRuleGroupMetadataErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRuleGroupError {
pub kind: DescribeRuleGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRuleGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRuleGroupErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRuleGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRuleGroupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeRuleGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeRuleGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeRuleGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeRuleGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRuleGroupError {
fn code(&self) -> Option<&str> {
DescribeRuleGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRuleGroupError {
pub fn new(kind: DescribeRuleGroupErrorKind, 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: DescribeRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRuleGroupErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRuleGroupErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeRuleGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRuleGroupErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeRuleGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeRuleGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeRuleGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeRuleGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeResourcePolicyError {
pub kind: DescribeResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeResourcePolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeResourcePolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeResourcePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeResourcePolicyError {
fn code(&self) -> Option<&str> {
DescribeResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeResourcePolicyError {
pub fn new(kind: DescribeResourcePolicyErrorKind, 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: DescribeResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeResourcePolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeResourcePolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeResourcePolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeResourcePolicyErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoggingConfigurationError {
pub kind: DescribeLoggingConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoggingConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoggingConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoggingConfigurationErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoggingConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoggingConfigurationErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeLoggingConfigurationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeLoggingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeLoggingConfigurationErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeLoggingConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoggingConfigurationError {
fn code(&self) -> Option<&str> {
DescribeLoggingConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoggingConfigurationError {
pub fn new(kind: DescribeLoggingConfigurationErrorKind, 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: DescribeLoggingConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoggingConfigurationErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingConfigurationErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingConfigurationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingConfigurationErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoggingConfigurationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeLoggingConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoggingConfigurationErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeLoggingConfigurationErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeLoggingConfigurationErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeLoggingConfigurationErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeLoggingConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFirewallPolicyError {
pub kind: DescribeFirewallPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFirewallPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFirewallPolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFirewallPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFirewallPolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeFirewallPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeFirewallPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeFirewallPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFirewallPolicyError {
fn code(&self) -> Option<&str> {
DescribeFirewallPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFirewallPolicyError {
pub fn new(kind: DescribeFirewallPolicyErrorKind, 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: DescribeFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFirewallPolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallPolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallPolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeFirewallPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFirewallPolicyErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeFirewallPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeFirewallPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeFirewallPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFirewallError {
pub kind: DescribeFirewallErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFirewallError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFirewallErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFirewallErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFirewallError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFirewallErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DescribeFirewallErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DescribeFirewallErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeFirewallErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeFirewallErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFirewallError {
fn code(&self) -> Option<&str> {
DescribeFirewallError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFirewallError {
pub fn new(kind: DescribeFirewallErrorKind, 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: DescribeFirewallErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFirewallErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFirewallErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeFirewallError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFirewallErrorKind::InternalServerError(_inner) => Some(_inner),
DescribeFirewallErrorKind::InvalidRequestException(_inner) => Some(_inner),
DescribeFirewallErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeFirewallErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeFirewallErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRuleGroupError {
pub kind: DeleteRuleGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRuleGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRuleGroupErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRuleGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRuleGroupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeleteRuleGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRuleGroupError {
fn code(&self) -> Option<&str> {
DeleteRuleGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRuleGroupError {
pub fn new(kind: DeleteRuleGroupErrorKind, 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: DeleteRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRuleGroupErrorKind::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_server_error(&self) -> bool {
matches!(&self.kind, DeleteRuleGroupErrorKind::InternalServerError(_))
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRuleGroupErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRuleGroupErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRuleGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteRuleGroupErrorKind::ThrottlingException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRuleGroupErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteRuleGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRuleGroupErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::InvalidOperationException(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeleteRuleGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedOperationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedOperationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedOperationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedOperationException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedOperationException {}
pub mod unsupported_operation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::UnsupportedOperationException {
crate::error::UnsupportedOperationException {
message: self.message,
}
}
}
}
impl UnsupportedOperationException {
pub fn builder() -> crate::error::unsupported_operation_exception::Builder {
crate::error::unsupported_operation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteResourcePolicyError {
pub kind: DeleteResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteResourcePolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidResourcePolicyException(crate::error::InvalidResourcePolicyException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteResourcePolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::InvalidResourcePolicyException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteResourcePolicyError {
fn code(&self) -> Option<&str> {
DeleteResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteResourcePolicyError {
pub fn new(kind: DeleteResourcePolicyErrorKind, 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: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteResourcePolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_resource_policy_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidResourcePolicyException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteResourcePolicyErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InvalidResourcePolicyException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFirewallPolicyError {
pub kind: DeleteFirewallPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFirewallPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFirewallPolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFirewallPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFirewallPolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeleteFirewallPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFirewallPolicyError {
fn code(&self) -> Option<&str> {
DeleteFirewallPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFirewallPolicyError {
pub fn new(kind: DeleteFirewallPolicyErrorKind, 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: DeleteFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFirewallPolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallPolicyErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteFirewallPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFirewallPolicyErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::InvalidOperationException(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeleteFirewallPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFirewallError {
pub kind: DeleteFirewallErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFirewallError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFirewallErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFirewallErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
UnsupportedOperationException(crate::error::UnsupportedOperationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFirewallError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFirewallErrorKind::InternalServerError(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::UnsupportedOperationException(_inner) => _inner.fmt(f),
DeleteFirewallErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFirewallError {
fn code(&self) -> Option<&str> {
DeleteFirewallError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFirewallError {
pub fn new(kind: DeleteFirewallErrorKind, 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: DeleteFirewallErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFirewallErrorKind::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_server_error(&self) -> bool {
matches!(&self.kind, DeleteFirewallErrorKind::InternalServerError(_))
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteFirewallErrorKind::ThrottlingException(_))
}
pub fn is_unsupported_operation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFirewallErrorKind::UnsupportedOperationException(_)
)
}
}
impl std::error::Error for DeleteFirewallError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFirewallErrorKind::InternalServerError(_inner) => Some(_inner),
DeleteFirewallErrorKind::InvalidOperationException(_inner) => Some(_inner),
DeleteFirewallErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteFirewallErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteFirewallErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteFirewallErrorKind::UnsupportedOperationException(_inner) => Some(_inner),
DeleteFirewallErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRuleGroupError {
pub kind: CreateRuleGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRuleGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRuleGroupErrorKind {
InsufficientCapacityException(crate::error::InsufficientCapacityException),
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRuleGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRuleGroupErrorKind::InsufficientCapacityException(_inner) => _inner.fmt(f),
CreateRuleGroupErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateRuleGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateRuleGroupErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateRuleGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateRuleGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRuleGroupError {
fn code(&self) -> Option<&str> {
CreateRuleGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateRuleGroupError {
pub fn new(kind: CreateRuleGroupErrorKind, 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: CreateRuleGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRuleGroupErrorKind::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_insufficient_capacity_exception(&self) -> bool {
matches!(
&self.kind,
CreateRuleGroupErrorKind::InsufficientCapacityException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateRuleGroupErrorKind::InternalServerError(_))
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateRuleGroupErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateRuleGroupErrorKind::LimitExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateRuleGroupErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for CreateRuleGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRuleGroupErrorKind::InsufficientCapacityException(_inner) => Some(_inner),
CreateRuleGroupErrorKind::InternalServerError(_inner) => Some(_inner),
CreateRuleGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateRuleGroupErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateRuleGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateRuleGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[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::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InsufficientCapacityException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InsufficientCapacityException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InsufficientCapacityException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InsufficientCapacityException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for InsufficientCapacityException {}
pub mod insufficient_capacity_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::InsufficientCapacityException {
crate::error::InsufficientCapacityException {
message: self.message,
}
}
}
}
impl InsufficientCapacityException {
pub fn builder() -> crate::error::insufficient_capacity_exception::Builder {
crate::error::insufficient_capacity_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFirewallPolicyError {
pub kind: CreateFirewallPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFirewallPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFirewallPolicyErrorKind {
InsufficientCapacityException(crate::error::InsufficientCapacityException),
InternalServerError(crate::error::InternalServerError),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFirewallPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFirewallPolicyErrorKind::InsufficientCapacityException(_inner) => _inner.fmt(f),
CreateFirewallPolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateFirewallPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateFirewallPolicyErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateFirewallPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateFirewallPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFirewallPolicyError {
fn code(&self) -> Option<&str> {
CreateFirewallPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFirewallPolicyError {
pub fn new(kind: CreateFirewallPolicyErrorKind, 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: CreateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFirewallPolicyErrorKind::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_insufficient_capacity_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallPolicyErrorKind::InsufficientCapacityException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
CreateFirewallPolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallPolicyErrorKind::LimitExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallPolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for CreateFirewallPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFirewallPolicyErrorKind::InsufficientCapacityException(_inner) => Some(_inner),
CreateFirewallPolicyErrorKind::InternalServerError(_inner) => Some(_inner),
CreateFirewallPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateFirewallPolicyErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateFirewallPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateFirewallPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFirewallError {
pub kind: CreateFirewallErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFirewallError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFirewallErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFirewallErrorKind {
InsufficientCapacityException(crate::error::InsufficientCapacityException),
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFirewallError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFirewallErrorKind::InsufficientCapacityException(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::InternalServerError(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateFirewallErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFirewallError {
fn code(&self) -> Option<&str> {
CreateFirewallError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFirewallError {
pub fn new(kind: CreateFirewallErrorKind, 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: CreateFirewallErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFirewallErrorKind::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_insufficient_capacity_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallErrorKind::InsufficientCapacityException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(&self.kind, CreateFirewallErrorKind::InternalServerError(_))
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateFirewallErrorKind::LimitExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateFirewallErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for CreateFirewallError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFirewallErrorKind::InsufficientCapacityException(_inner) => Some(_inner),
CreateFirewallErrorKind::InternalServerError(_inner) => Some(_inner),
CreateFirewallErrorKind::InvalidOperationException(_inner) => Some(_inner),
CreateFirewallErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateFirewallErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateFirewallErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateFirewallErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateSubnetsError {
pub kind: AssociateSubnetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateSubnetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateSubnetsErrorKind {
InsufficientCapacityException(crate::error::InsufficientCapacityException),
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateSubnetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateSubnetsErrorKind::InsufficientCapacityException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateSubnetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateSubnetsError {
fn code(&self) -> Option<&str> {
AssociateSubnetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateSubnetsError {
pub fn new(kind: AssociateSubnetsErrorKind, 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: AssociateSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateSubnetsErrorKind::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_insufficient_capacity_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::InsufficientCapacityException(_)
)
}
pub fn is_internal_server_error(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateSubnetsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for AssociateSubnetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateSubnetsErrorKind::InsufficientCapacityException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::InternalServerError(_inner) => Some(_inner),
AssociateSubnetsErrorKind::InvalidOperationException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::InvalidRequestException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::InvalidTokenException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateSubnetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateFirewallPolicyError {
pub kind: AssociateFirewallPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateFirewallPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateFirewallPolicyErrorKind {
InternalServerError(crate::error::InternalServerError),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidTokenException(crate::error::InvalidTokenException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateFirewallPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateFirewallPolicyErrorKind::InternalServerError(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::InvalidOperationException(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::InvalidTokenException(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateFirewallPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateFirewallPolicyError {
fn code(&self) -> Option<&str> {
AssociateFirewallPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateFirewallPolicyError {
pub fn new(kind: AssociateFirewallPolicyErrorKind, 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: AssociateFirewallPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateFirewallPolicyErrorKind::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_server_error(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::InternalServerError(_)
)
}
pub fn is_invalid_operation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::InvalidOperationException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_invalid_token_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::InvalidTokenException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateFirewallPolicyErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for AssociateFirewallPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateFirewallPolicyErrorKind::InternalServerError(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::InvalidOperationException(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::InvalidTokenException(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateFirewallPolicyErrorKind::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 _)
}
}