Struct aws_sdk_cloudfront::error::test_function_failed::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for TestFunctionFailed
.
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 4738)
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
pub fn deser_structure_crate_error_test_function_failed_xml_err(
inp: &[u8],
mut builder: crate::error::test_function_failed::Builder,
) -> Result<crate::error::test_function_failed::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#TestFunctionFailed$Message */ => {
let var_139 =
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_139);
}
,
_ => {}
}
}
Ok(builder)
}
sourcepub fn build(self) -> TestFunctionFailed
pub fn build(self) -> TestFunctionFailed
Consumes the builder and constructs a TestFunctionFailed
.
Examples found in repository?
src/operation_deser.rs (line 10381)
10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409
pub fn parse_test_function_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::TestFunctionOutput, crate::error::TestFunctionError> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::TestFunctionError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::TestFunctionError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InvalidArgument" => crate::error::TestFunctionError {
meta: generic,
kind: crate::error::TestFunctionErrorKind::InvalidArgument({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_argument::Builder::default();
let _ = response;
output =
crate::xml_deser::deser_structure_crate_error_invalid_argument_xml_err(
response.body().as_ref(),
output,
)
.map_err(crate::error::TestFunctionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidIfMatchVersion" => crate::error::TestFunctionError {
meta: generic,
kind: crate::error::TestFunctionErrorKind::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::TestFunctionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NoSuchFunctionExists" => crate::error::TestFunctionError {
meta: generic,
kind: crate::error::TestFunctionErrorKind::NoSuchFunctionExists({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::no_such_function_exists::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_no_such_function_exists_xml_err(response.body().as_ref(), output).map_err(crate::error::TestFunctionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"TestFunctionFailed" => {
crate::error::TestFunctionError {
meta: generic,
kind: crate::error::TestFunctionErrorKind::TestFunctionFailed({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::test_function_failed::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_test_function_failed_xml_err(response.body().as_ref(), output).map_err(crate::error::TestFunctionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"UnsupportedOperation" => crate::error::TestFunctionError {
meta: generic,
kind: crate::error::TestFunctionErrorKind::UnsupportedOperation({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::unsupported_operation::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_unsupported_operation_xml_err(response.body().as_ref(), output).map_err(crate::error::TestFunctionError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::TestFunctionError::generic(generic),
})
}