#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ValidateResourcePolicyError {
pub kind: ValidateResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ValidateResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ValidateResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ValidateResourcePolicyErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
MalformedPolicyDocumentException(crate::error::MalformedPolicyDocumentException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ValidateResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ValidateResourcePolicyErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
ValidateResourcePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ValidateResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ValidateResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => {
_inner.fmt(f)
}
ValidateResourcePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ValidateResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ValidateResourcePolicyError {
fn code(&self) -> Option<&str> {
ValidateResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ValidateResourcePolicyError {
pub fn new(kind: ValidateResourcePolicyErrorKind, 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: ValidateResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ValidateResourcePolicyErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
ValidateResourcePolicyErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ValidateResourcePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ValidateResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_malformed_policy_document_exception(&self) -> bool {
matches!(
&self.kind,
ValidateResourcePolicyErrorKind::MalformedPolicyDocumentException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ValidateResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ValidateResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ValidateResourcePolicyErrorKind::InternalServiceError(_inner) => Some(_inner),
ValidateResourcePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
ValidateResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
ValidateResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => {
Some(_inner)
}
ValidateResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ValidateResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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 MalformedPolicyDocumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MalformedPolicyDocumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MalformedPolicyDocumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MalformedPolicyDocumentException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for MalformedPolicyDocumentException {}
pub mod malformed_policy_document_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::MalformedPolicyDocumentException {
crate::error::MalformedPolicyDocumentException {
message: self.message,
}
}
}
}
impl MalformedPolicyDocumentException {
pub fn builder() -> crate::error::malformed_policy_document_exception::Builder {
crate::error::malformed_policy_document_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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
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 InvalidParameterException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterException {}
pub mod invalid_parameter_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::InvalidParameterException {
crate::error::InvalidParameterException {
message: self.message,
}
}
}
}
impl InvalidParameterException {
pub fn builder() -> crate::error::invalid_parameter_exception::Builder {
crate::error::invalid_parameter_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServiceError {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServiceError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceError")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServiceError {}
pub mod internal_service_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::InternalServiceError {
crate::error::InternalServiceError {
message: self.message,
}
}
}
}
impl InternalServiceError {
pub fn builder() -> crate::error::internal_service_error::Builder {
crate::error::internal_service_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSecretVersionStageError {
pub kind: UpdateSecretVersionStageErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSecretVersionStageError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSecretVersionStageErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSecretVersionStageErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSecretVersionStageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSecretVersionStageErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
UpdateSecretVersionStageErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateSecretVersionStageErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateSecretVersionStageErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateSecretVersionStageErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateSecretVersionStageErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSecretVersionStageError {
fn code(&self) -> Option<&str> {
UpdateSecretVersionStageError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSecretVersionStageError {
pub fn new(kind: UpdateSecretVersionStageErrorKind, 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: UpdateSecretVersionStageErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSecretVersionStageErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
UpdateSecretVersionStageErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretVersionStageErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretVersionStageErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretVersionStageErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretVersionStageErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateSecretVersionStageError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSecretVersionStageErrorKind::InternalServiceError(_inner) => Some(_inner),
UpdateSecretVersionStageErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateSecretVersionStageErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateSecretVersionStageErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateSecretVersionStageErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateSecretVersionStageErrorKind::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_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
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::fmt::Debug)]
pub struct UpdateSecretError {
pub kind: UpdateSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSecretErrorKind {
DecryptionFailure(crate::error::DecryptionFailure),
EncryptionFailure(crate::error::EncryptionFailure),
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
MalformedPolicyDocumentException(crate::error::MalformedPolicyDocumentException),
PreconditionNotMetException(crate::error::PreconditionNotMetException),
ResourceExistsException(crate::error::ResourceExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSecretErrorKind::DecryptionFailure(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::EncryptionFailure(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::MalformedPolicyDocumentException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::PreconditionNotMetException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::ResourceExistsException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSecretError {
fn code(&self) -> Option<&str> {
UpdateSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSecretError {
pub fn new(kind: UpdateSecretErrorKind, 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: UpdateSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSecretErrorKind::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_decryption_failure(&self) -> bool {
matches!(&self.kind, UpdateSecretErrorKind::DecryptionFailure(_))
}
pub fn is_encryption_failure(&self) -> bool {
matches!(&self.kind, UpdateSecretErrorKind::EncryptionFailure(_))
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, UpdateSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, UpdateSecretErrorKind::LimitExceededException(_))
}
pub fn is_malformed_policy_document_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::MalformedPolicyDocumentException(_)
)
}
pub fn is_precondition_not_met_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::PreconditionNotMetException(_)
)
}
pub fn is_resource_exists_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::ResourceExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSecretErrorKind::DecryptionFailure(_inner) => Some(_inner),
UpdateSecretErrorKind::EncryptionFailure(_inner) => Some(_inner),
UpdateSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
UpdateSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
UpdateSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateSecretErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateSecretErrorKind::MalformedPolicyDocumentException(_inner) => Some(_inner),
UpdateSecretErrorKind::PreconditionNotMetException(_inner) => Some(_inner),
UpdateSecretErrorKind::ResourceExistsException(_inner) => Some(_inner),
UpdateSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceExistsException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceExistsException {}
pub mod resource_exists_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ResourceExistsException {
crate::error::ResourceExistsException {
message: self.message,
}
}
}
}
impl ResourceExistsException {
pub fn builder() -> crate::error::resource_exists_exception::Builder {
crate::error::resource_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PreconditionNotMetException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PreconditionNotMetException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PreconditionNotMetException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PreconditionNotMetException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for PreconditionNotMetException {}
pub mod precondition_not_met_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::PreconditionNotMetException {
crate::error::PreconditionNotMetException {
message: self.message,
}
}
}
}
impl PreconditionNotMetException {
pub fn builder() -> crate::error::precondition_not_met_exception::Builder {
crate::error::precondition_not_met_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EncryptionFailure {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EncryptionFailure {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EncryptionFailure {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EncryptionFailure")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for EncryptionFailure {}
pub mod encryption_failure {
#[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::EncryptionFailure {
crate::error::EncryptionFailure {
message: self.message,
}
}
}
}
impl EncryptionFailure {
pub fn builder() -> crate::error::encryption_failure::Builder {
crate::error::encryption_failure::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DecryptionFailure {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DecryptionFailure {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DecryptionFailure {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DecryptionFailure")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for DecryptionFailure {}
pub mod decryption_failure {
#[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::DecryptionFailure {
crate::error::DecryptionFailure {
message: self.message,
}
}
}
}
impl DecryptionFailure {
pub fn builder() -> crate::error::decryption_failure::Builder {
crate::error::decryption_failure::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidParameterException(_)
)
}
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(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalServiceError(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_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 {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidParameterException(_)
)
}
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(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalServiceError(_inner) => Some(_inner),
TagResourceErrorKind::InvalidParameterException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopReplicationToReplicaError {
pub kind: StopReplicationToReplicaErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopReplicationToReplicaError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopReplicationToReplicaErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopReplicationToReplicaErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopReplicationToReplicaError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopReplicationToReplicaErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
StopReplicationToReplicaErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
StopReplicationToReplicaErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
StopReplicationToReplicaErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopReplicationToReplicaErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopReplicationToReplicaError {
fn code(&self) -> Option<&str> {
StopReplicationToReplicaError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopReplicationToReplicaError {
pub fn new(kind: StopReplicationToReplicaErrorKind, 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: StopReplicationToReplicaErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopReplicationToReplicaErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
StopReplicationToReplicaErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
StopReplicationToReplicaErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
StopReplicationToReplicaErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopReplicationToReplicaErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StopReplicationToReplicaError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopReplicationToReplicaErrorKind::InternalServiceError(_inner) => Some(_inner),
StopReplicationToReplicaErrorKind::InvalidParameterException(_inner) => Some(_inner),
StopReplicationToReplicaErrorKind::InvalidRequestException(_inner) => Some(_inner),
StopReplicationToReplicaErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopReplicationToReplicaErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RotateSecretError {
pub kind: RotateSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RotateSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RotateSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RotateSecretErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RotateSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RotateSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
RotateSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RotateSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
RotateSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RotateSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RotateSecretError {
fn code(&self) -> Option<&str> {
RotateSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RotateSecretError {
pub fn new(kind: RotateSecretErrorKind, 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: RotateSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RotateSecretErrorKind::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_service_error(&self) -> bool {
matches!(&self.kind, RotateSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RotateSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
RotateSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RotateSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for RotateSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RotateSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
RotateSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
RotateSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
RotateSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RotateSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestoreSecretError {
pub kind: RestoreSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RestoreSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RestoreSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestoreSecretErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RestoreSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestoreSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
RestoreSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
RestoreSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
RestoreSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RestoreSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestoreSecretError {
fn code(&self) -> Option<&str> {
RestoreSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestoreSecretError {
pub fn new(kind: RestoreSecretErrorKind, 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: RestoreSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestoreSecretErrorKind::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_service_error(&self) -> bool {
matches!(&self.kind, RestoreSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RestoreSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
RestoreSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RestoreSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for RestoreSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestoreSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
RestoreSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
RestoreSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
RestoreSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RestoreSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ReplicateSecretToRegionsError {
pub kind: ReplicateSecretToRegionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ReplicateSecretToRegionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ReplicateSecretToRegionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ReplicateSecretToRegionsErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ReplicateSecretToRegionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ReplicateSecretToRegionsErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
ReplicateSecretToRegionsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ReplicateSecretToRegionsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ReplicateSecretToRegionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ReplicateSecretToRegionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ReplicateSecretToRegionsError {
fn code(&self) -> Option<&str> {
ReplicateSecretToRegionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ReplicateSecretToRegionsError {
pub fn new(kind: ReplicateSecretToRegionsErrorKind, 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: ReplicateSecretToRegionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ReplicateSecretToRegionsErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
ReplicateSecretToRegionsErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ReplicateSecretToRegionsErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ReplicateSecretToRegionsErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ReplicateSecretToRegionsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ReplicateSecretToRegionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ReplicateSecretToRegionsErrorKind::InternalServiceError(_inner) => Some(_inner),
ReplicateSecretToRegionsErrorKind::InvalidParameterException(_inner) => Some(_inner),
ReplicateSecretToRegionsErrorKind::InvalidRequestException(_inner) => Some(_inner),
ReplicateSecretToRegionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ReplicateSecretToRegionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveRegionsFromReplicationError {
pub kind: RemoveRegionsFromReplicationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveRegionsFromReplicationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveRegionsFromReplicationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveRegionsFromReplicationErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveRegionsFromReplicationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveRegionsFromReplicationErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
RemoveRegionsFromReplicationErrorKind::InvalidParameterException(_inner) => {
_inner.fmt(f)
}
RemoveRegionsFromReplicationErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
RemoveRegionsFromReplicationErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
RemoveRegionsFromReplicationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveRegionsFromReplicationError {
fn code(&self) -> Option<&str> {
RemoveRegionsFromReplicationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveRegionsFromReplicationError {
pub fn new(kind: RemoveRegionsFromReplicationErrorKind, 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: RemoveRegionsFromReplicationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveRegionsFromReplicationErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
RemoveRegionsFromReplicationErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionsFromReplicationErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionsFromReplicationErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveRegionsFromReplicationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for RemoveRegionsFromReplicationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveRegionsFromReplicationErrorKind::InternalServiceError(_inner) => Some(_inner),
RemoveRegionsFromReplicationErrorKind::InvalidParameterException(_inner) => {
Some(_inner)
}
RemoveRegionsFromReplicationErrorKind::InvalidRequestException(_inner) => Some(_inner),
RemoveRegionsFromReplicationErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
RemoveRegionsFromReplicationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutSecretValueError {
pub kind: PutSecretValueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutSecretValueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutSecretValueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutSecretValueErrorKind {
DecryptionFailure(crate::error::DecryptionFailure),
EncryptionFailure(crate::error::EncryptionFailure),
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
ResourceExistsException(crate::error::ResourceExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutSecretValueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutSecretValueErrorKind::DecryptionFailure(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::EncryptionFailure(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::ResourceExistsException(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutSecretValueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutSecretValueError {
fn code(&self) -> Option<&str> {
PutSecretValueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutSecretValueError {
pub fn new(kind: PutSecretValueErrorKind, 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: PutSecretValueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutSecretValueErrorKind::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_decryption_failure(&self) -> bool {
matches!(&self.kind, PutSecretValueErrorKind::DecryptionFailure(_))
}
pub fn is_encryption_failure(&self) -> bool {
matches!(&self.kind, PutSecretValueErrorKind::EncryptionFailure(_))
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, PutSecretValueErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutSecretValueErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutSecretValueErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutSecretValueErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_exists_exception(&self) -> bool {
matches!(
&self.kind,
PutSecretValueErrorKind::ResourceExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutSecretValueErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for PutSecretValueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutSecretValueErrorKind::DecryptionFailure(_inner) => Some(_inner),
PutSecretValueErrorKind::EncryptionFailure(_inner) => Some(_inner),
PutSecretValueErrorKind::InternalServiceError(_inner) => Some(_inner),
PutSecretValueErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutSecretValueErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutSecretValueErrorKind::LimitExceededException(_inner) => Some(_inner),
PutSecretValueErrorKind::ResourceExistsException(_inner) => Some(_inner),
PutSecretValueErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutSecretValueErrorKind::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 {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
MalformedPolicyDocumentException(crate::error::MalformedPolicyDocumentException),
PublicPolicyException(crate::error::PublicPolicyException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InternalServiceError(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::PublicPolicyException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ResourceNotFoundException(_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_service_error(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_malformed_policy_document_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_)
)
}
pub fn is_public_policy_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::PublicPolicyException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for PutResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutResourcePolicyErrorKind::InternalServiceError(_inner) => Some(_inner),
PutResourcePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::PublicPolicyException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PublicPolicyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PublicPolicyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PublicPolicyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PublicPolicyException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for PublicPolicyException {}
pub mod public_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::PublicPolicyException {
crate::error::PublicPolicyException {
message: self.message,
}
}
}
}
impl PublicPolicyException {
pub fn builder() -> crate::error::public_policy_exception::Builder {
crate::error::public_policy_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSecretVersionIdsError {
pub kind: ListSecretVersionIdsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSecretVersionIdsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSecretVersionIdsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSecretVersionIdsErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSecretVersionIdsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSecretVersionIdsErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
ListSecretVersionIdsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListSecretVersionIdsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListSecretVersionIdsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSecretVersionIdsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSecretVersionIdsError {
fn code(&self) -> Option<&str> {
ListSecretVersionIdsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSecretVersionIdsError {
pub fn new(kind: ListSecretVersionIdsErrorKind, 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: ListSecretVersionIdsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSecretVersionIdsErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
ListSecretVersionIdsErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListSecretVersionIdsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListSecretVersionIdsErrorKind::InvalidParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSecretVersionIdsErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListSecretVersionIdsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSecretVersionIdsErrorKind::InternalServiceError(_inner) => Some(_inner),
ListSecretVersionIdsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListSecretVersionIdsErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListSecretVersionIdsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSecretVersionIdsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_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::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSecretsError {
pub kind: ListSecretsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSecretsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSecretsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSecretsErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSecretsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSecretsErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
ListSecretsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListSecretsErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
ListSecretsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSecretsError {
fn code(&self) -> Option<&str> {
ListSecretsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSecretsError {
pub fn new(kind: ListSecretsErrorKind, 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: ListSecretsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSecretsErrorKind::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_service_error(&self) -> bool {
matches!(&self.kind, ListSecretsErrorKind::InternalServiceError(_))
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListSecretsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
ListSecretsErrorKind::InvalidParameterException(_)
)
}
}
impl std::error::Error for ListSecretsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSecretsErrorKind::InternalServiceError(_inner) => Some(_inner),
ListSecretsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListSecretsErrorKind::InvalidParameterException(_inner) => Some(_inner),
ListSecretsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSecretValueError {
pub kind: GetSecretValueErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSecretValueError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSecretValueErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSecretValueErrorKind {
DecryptionFailure(crate::error::DecryptionFailure),
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSecretValueError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSecretValueErrorKind::DecryptionFailure(_inner) => _inner.fmt(f),
GetSecretValueErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
GetSecretValueErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetSecretValueErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetSecretValueErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSecretValueErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSecretValueError {
fn code(&self) -> Option<&str> {
GetSecretValueError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSecretValueError {
pub fn new(kind: GetSecretValueErrorKind, 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: GetSecretValueErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSecretValueErrorKind::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_decryption_failure(&self) -> bool {
matches!(&self.kind, GetSecretValueErrorKind::DecryptionFailure(_))
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, GetSecretValueErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetSecretValueErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetSecretValueErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSecretValueErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetSecretValueError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSecretValueErrorKind::DecryptionFailure(_inner) => Some(_inner),
GetSecretValueErrorKind::InternalServiceError(_inner) => Some(_inner),
GetSecretValueErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetSecretValueErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSecretValueErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSecretValueErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetResourcePolicyError {
pub kind: GetResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetResourcePolicyErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetResourcePolicyErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetResourcePolicyError {
fn code(&self) -> Option<&str> {
GetResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetResourcePolicyError {
pub fn new(kind: GetResourcePolicyErrorKind, 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: GetResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetResourcePolicyErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for GetResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetResourcePolicyErrorKind::InternalServiceError(_inner) => Some(_inner),
GetResourcePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRandomPasswordError {
pub kind: GetRandomPasswordErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRandomPasswordError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRandomPasswordErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRandomPasswordErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRandomPasswordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRandomPasswordErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
GetRandomPasswordErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
GetRandomPasswordErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetRandomPasswordErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRandomPasswordError {
fn code(&self) -> Option<&str> {
GetRandomPasswordError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRandomPasswordError {
pub fn new(kind: GetRandomPasswordErrorKind, 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: GetRandomPasswordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRandomPasswordErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
GetRandomPasswordErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
GetRandomPasswordErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetRandomPasswordErrorKind::InvalidRequestException(_)
)
}
}
impl std::error::Error for GetRandomPasswordError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRandomPasswordErrorKind::InternalServiceError(_inner) => Some(_inner),
GetRandomPasswordErrorKind::InvalidParameterException(_inner) => Some(_inner),
GetRandomPasswordErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetRandomPasswordErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSecretError {
pub kind: DescribeSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSecretErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
DescribeSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DescribeSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSecretError {
fn code(&self) -> Option<&str> {
DescribeSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSecretError {
pub fn new(kind: DescribeSecretErrorKind, 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: DescribeSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSecretErrorKind::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_service_error(&self) -> bool {
matches!(&self.kind, DescribeSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
DescribeSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
DescribeSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSecretError {
pub kind: DeleteSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSecretErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
DeleteSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSecretError {
fn code(&self) -> Option<&str> {
DeleteSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSecretError {
pub fn new(kind: DeleteSecretErrorKind, 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: DeleteSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSecretErrorKind::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_service_error(&self) -> bool {
matches!(&self.kind, DeleteSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
DeleteSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
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::InternalServiceError(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_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_service_error(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteResourcePolicyErrorKind::InternalServiceError(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InvalidParameterException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSecretError {
pub kind: CreateSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSecretErrorKind {
DecryptionFailure(crate::error::DecryptionFailure),
EncryptionFailure(crate::error::EncryptionFailure),
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
LimitExceededException(crate::error::LimitExceededException),
MalformedPolicyDocumentException(crate::error::MalformedPolicyDocumentException),
PreconditionNotMetException(crate::error::PreconditionNotMetException),
ResourceExistsException(crate::error::ResourceExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSecretErrorKind::DecryptionFailure(_inner) => _inner.fmt(f),
CreateSecretErrorKind::EncryptionFailure(_inner) => _inner.fmt(f),
CreateSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
CreateSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::MalformedPolicyDocumentException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::PreconditionNotMetException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::ResourceExistsException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSecretError {
fn code(&self) -> Option<&str> {
CreateSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSecretError {
pub fn new(kind: CreateSecretErrorKind, 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: CreateSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSecretErrorKind::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_decryption_failure(&self) -> bool {
matches!(&self.kind, CreateSecretErrorKind::DecryptionFailure(_))
}
pub fn is_encryption_failure(&self) -> bool {
matches!(&self.kind, CreateSecretErrorKind::EncryptionFailure(_))
}
pub fn is_internal_service_error(&self) -> bool {
matches!(&self.kind, CreateSecretErrorKind::InternalServiceError(_))
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CreateSecretErrorKind::LimitExceededException(_))
}
pub fn is_malformed_policy_document_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::MalformedPolicyDocumentException(_)
)
}
pub fn is_precondition_not_met_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::PreconditionNotMetException(_)
)
}
pub fn is_resource_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::ResourceExistsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CreateSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSecretErrorKind::DecryptionFailure(_inner) => Some(_inner),
CreateSecretErrorKind::EncryptionFailure(_inner) => Some(_inner),
CreateSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
CreateSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
CreateSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateSecretErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateSecretErrorKind::MalformedPolicyDocumentException(_inner) => Some(_inner),
CreateSecretErrorKind::PreconditionNotMetException(_inner) => Some(_inner),
CreateSecretErrorKind::ResourceExistsException(_inner) => Some(_inner),
CreateSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateSecretErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelRotateSecretError {
pub kind: CancelRotateSecretErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelRotateSecretError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelRotateSecretErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelRotateSecretErrorKind {
InternalServiceError(crate::error::InternalServiceError),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelRotateSecretError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelRotateSecretErrorKind::InternalServiceError(_inner) => _inner.fmt(f),
CancelRotateSecretErrorKind::InvalidParameterException(_inner) => _inner.fmt(f),
CancelRotateSecretErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CancelRotateSecretErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelRotateSecretErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelRotateSecretError {
fn code(&self) -> Option<&str> {
CancelRotateSecretError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelRotateSecretError {
pub fn new(kind: CancelRotateSecretErrorKind, 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: CancelRotateSecretErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelRotateSecretErrorKind::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_service_error(&self) -> bool {
matches!(
&self.kind,
CancelRotateSecretErrorKind::InternalServiceError(_)
)
}
pub fn is_invalid_parameter_exception(&self) -> bool {
matches!(
&self.kind,
CancelRotateSecretErrorKind::InvalidParameterException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CancelRotateSecretErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelRotateSecretErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for CancelRotateSecretError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelRotateSecretErrorKind::InternalServiceError(_inner) => Some(_inner),
CancelRotateSecretErrorKind::InvalidParameterException(_inner) => Some(_inner),
CancelRotateSecretErrorKind::InvalidRequestException(_inner) => Some(_inner),
CancelRotateSecretErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelRotateSecretErrorKind::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 _)
}
}