#[non_exhaustive]pub struct DeleteFieldLevelEncryptionProfileError {
pub kind: DeleteFieldLevelEncryptionProfileErrorKind,
/* private fields */
}
Expand description
Error type for the DeleteFieldLevelEncryptionProfile
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: DeleteFieldLevelEncryptionProfileErrorKind
Kind of error that occurred.
Implementations§
source§impl DeleteFieldLevelEncryptionProfileError
impl DeleteFieldLevelEncryptionProfileError
sourcepub fn new(kind: DeleteFieldLevelEncryptionProfileErrorKind, meta: Error) -> Self
pub fn new(kind: DeleteFieldLevelEncryptionProfileErrorKind, meta: Error) -> Self
Creates a new DeleteFieldLevelEncryptionProfileError
.
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the DeleteFieldLevelEncryptionProfileError::Unhandled
variant from any error type.
Examples found in repository?
4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886
pub fn parse_delete_field_level_encryption_profile_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DeleteFieldLevelEncryptionProfileOutput,
crate::error::DeleteFieldLevelEncryptionProfileError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"FieldLevelEncryptionProfileInUse" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::FieldLevelEncryptionProfileInUse({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::field_level_encryption_profile_in_use::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_field_level_encryption_profile_in_use_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidIfMatchVersion" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::InvalidIfMatchVersion({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_if_match_version::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_if_match_version_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchFieldLevelEncryptionProfile" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::NoSuchFieldLevelEncryptionProfile({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_field_level_encryption_profile::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_field_level_encryption_profile_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"PreconditionFailed" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::PreconditionFailed({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::precondition_failed::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_precondition_failed_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DeleteFieldLevelEncryptionProfileError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DeleteFieldLevelEncryptionProfileError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886
pub fn parse_delete_field_level_encryption_profile_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DeleteFieldLevelEncryptionProfileOutput,
crate::error::DeleteFieldLevelEncryptionProfileError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::AccessDenied({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::access_denied::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_access_denied_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"FieldLevelEncryptionProfileInUse" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::FieldLevelEncryptionProfileInUse({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::field_level_encryption_profile_in_use::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_field_level_encryption_profile_in_use_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidIfMatchVersion" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::InvalidIfMatchVersion({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_if_match_version::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_if_match_version_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchFieldLevelEncryptionProfile" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::NoSuchFieldLevelEncryptionProfile({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_field_level_encryption_profile::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_field_level_encryption_profile_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"PreconditionFailed" => crate::error::DeleteFieldLevelEncryptionProfileError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionProfileErrorKind::PreconditionFailed({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::precondition_failed::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_precondition_failed_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionProfileError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DeleteFieldLevelEncryptionProfileError::generic(generic)
})
}
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_access_denied(&self) -> bool
pub fn is_access_denied(&self) -> bool
Returns true
if the error kind is DeleteFieldLevelEncryptionProfileErrorKind::AccessDenied
.
sourcepub fn is_field_level_encryption_profile_in_use(&self) -> bool
pub fn is_field_level_encryption_profile_in_use(&self) -> bool
Returns true
if the error kind is DeleteFieldLevelEncryptionProfileErrorKind::FieldLevelEncryptionProfileInUse
.
sourcepub fn is_invalid_if_match_version(&self) -> bool
pub fn is_invalid_if_match_version(&self) -> bool
Returns true
if the error kind is DeleteFieldLevelEncryptionProfileErrorKind::InvalidIfMatchVersion
.
sourcepub fn is_no_such_field_level_encryption_profile(&self) -> bool
pub fn is_no_such_field_level_encryption_profile(&self) -> bool
Returns true
if the error kind is DeleteFieldLevelEncryptionProfileErrorKind::NoSuchFieldLevelEncryptionProfile
.
sourcepub fn is_precondition_failed(&self) -> bool
pub fn is_precondition_failed(&self) -> bool
Returns true
if the error kind is DeleteFieldLevelEncryptionProfileErrorKind::PreconditionFailed
.