pub struct Builder { /* private fields */ }Expand description
A builder for CreatedButModifiedException.
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 735)
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742
pub fn deser_structure_crate_error_created_but_modified_exception_xml_err(
inp: &[u8],
mut builder: crate::error::created_but_modified_exception::Builder,
) -> Result<
crate::error::created_but_modified_exception::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.cloudformation#CreatedButModifiedException$Message */ => {
let var_21 =
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_21);
}
,
_ => {}
}
}
Ok(builder)
}sourcepub fn build(self) -> CreatedButModifiedException
pub fn build(self) -> CreatedButModifiedException
Consumes the builder and constructs a CreatedButModifiedException.
Examples found in repository?
src/operation_deser.rs (line 604)
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649
pub fn parse_create_stack_set_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateStackSetOutput, crate::error::CreateStackSetError> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::CreateStackSetError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::CreateStackSetError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"CreatedButModifiedException" => crate::error::CreateStackSetError {
meta: generic,
kind: crate::error::CreateStackSetErrorKind::CreatedButModifiedException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::created_but_modified_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_created_but_modified_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"LimitExceededException" => crate::error::CreateStackSetError {
meta: generic,
kind: crate::error::CreateStackSetErrorKind::LimitExceededException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::limit_exceeded_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_limit_exceeded_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NameAlreadyExistsException" => crate::error::CreateStackSetError {
meta: generic,
kind: crate::error::CreateStackSetErrorKind::NameAlreadyExistsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::name_already_exists_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_name_already_exists_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::CreateStackSetError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::CreateStackSetError::generic(generic),
})
}