pub struct Builder { /* private fields */ }Expand description
A builder for NameAlreadyExistsException.
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 770)
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
pub fn deser_structure_crate_error_name_already_exists_exception_xml_err(
inp: &[u8],
mut builder: crate::error::name_already_exists_exception::Builder,
) -> Result<
crate::error::name_already_exists_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#NameAlreadyExistsException$Message */ => {
let var_22 =
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_22);
}
,
_ => {}
}
}
Ok(builder)
}sourcepub fn build(self) -> NameAlreadyExistsException
pub fn build(self) -> NameAlreadyExistsException
Consumes the builder and constructs a NameAlreadyExistsException.
Examples found in repository?
src/operation_deser.rs (line 639)
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),
})
}