Struct aws_sdk_ec2::model::memory_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for MemoryInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn size_in_mi_b(self, input: i64) -> Self
pub fn size_in_mi_b(self, input: i64) -> Self
The size of the memory, in MiB.
sourcepub fn set_size_in_mi_b(self, input: Option<i64>) -> Self
pub fn set_size_in_mi_b(self, input: Option<i64>) -> Self
The size of the memory, in MiB.
Examples found in repository?
src/xml_deser.rs (line 59741)
59722 59723 59724 59725 59726 59727 59728 59729 59730 59731 59732 59733 59734 59735 59736 59737 59738 59739 59740 59741 59742 59743 59744 59745 59746 59747 59748
pub fn deser_structure_crate_model_memory_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MemoryInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MemoryInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInMiB") /* SizeInMiB com.amazonaws.ec2#MemoryInfo$SizeInMiB */ => {
let var_2909 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ec2#MemorySize`)"))
}
?
)
;
builder = builder.set_size_in_mi_b(var_2909);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> MemoryInfo
pub fn build(self) -> MemoryInfo
Consumes the builder and constructs a MemoryInfo
.
Examples found in repository?
src/xml_deser.rs (line 59747)
59722 59723 59724 59725 59726 59727 59728 59729 59730 59731 59732 59733 59734 59735 59736 59737 59738 59739 59740 59741 59742 59743 59744 59745 59746 59747 59748
pub fn deser_structure_crate_model_memory_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MemoryInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::MemoryInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInMiB") /* SizeInMiB com.amazonaws.ec2#MemoryInfo$SizeInMiB */ => {
let var_2909 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ec2#MemorySize`)"))
}
?
)
;
builder = builder.set_size_in_mi_b(var_2909);
}
,
_ => {}
}
}
Ok(builder.build())
}