pub struct Builder { /* private fields */ }Expand description
A builder for FieldLevelEncryptionConfigInUse.
Implementations§
source§impl Builder
impl Builder
pub fn message(self, input: impl Into<String>) -> Self
sourcepub fn set_message(self, input: Option<String>) -> Self
pub fn set_message(self, input: Option<String>) -> Self
Examples found in repository?
src/xml_deser.rs (line 4161)
4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168
pub fn deser_structure_crate_error_field_level_encryption_config_in_use_xml_err(
inp: &[u8],
mut builder: crate::error::field_level_encryption_config_in_use::Builder,
) -> Result<
crate::error::field_level_encryption_config_in_use::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") /* Message com.amazonaws.cloudfront#FieldLevelEncryptionConfigInUse$Message */ => {
let var_122 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_122);
}
,
_ => {}
}
}
Ok(builder)
}sourcepub fn build(self) -> FieldLevelEncryptionConfigInUse
pub fn build(self) -> FieldLevelEncryptionConfigInUse
Consumes the builder and constructs a FieldLevelEncryptionConfigInUse.
Examples found in repository?
src/operation_deser.rs (line 4726)
4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778
pub fn parse_delete_field_level_encryption_config_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DeleteFieldLevelEncryptionConfigOutput,
crate::error::DeleteFieldLevelEncryptionConfigError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DeleteFieldLevelEncryptionConfigError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DeleteFieldLevelEncryptionConfigError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDenied" => crate::error::DeleteFieldLevelEncryptionConfigError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionConfigErrorKind::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::DeleteFieldLevelEncryptionConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"FieldLevelEncryptionConfigInUse" => crate::error::DeleteFieldLevelEncryptionConfigError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionConfigErrorKind::FieldLevelEncryptionConfigInUse({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::field_level_encryption_config_in_use::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_field_level_encryption_config_in_use_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidIfMatchVersion" => crate::error::DeleteFieldLevelEncryptionConfigError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionConfigErrorKind::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::DeleteFieldLevelEncryptionConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"NoSuchFieldLevelEncryptionConfig" => crate::error::DeleteFieldLevelEncryptionConfigError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionConfigErrorKind::NoSuchFieldLevelEncryptionConfig({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::no_such_field_level_encryption_config::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_field_level_encryption_config_xml_err(response.body().as_ref(), output).map_err(crate::error::DeleteFieldLevelEncryptionConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"PreconditionFailed" => crate::error::DeleteFieldLevelEncryptionConfigError { meta: generic, kind: crate::error::DeleteFieldLevelEncryptionConfigErrorKind::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::DeleteFieldLevelEncryptionConfigError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DeleteFieldLevelEncryptionConfigError::generic(generic)
})
}