Struct aws_sdk_ec2::model::disk_image_volume_description::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for DiskImageVolumeDescription
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The volume identifier.
Examples found in repository?
src/xml_deser.rs (line 62584)
62567 62568 62569 62570 62571 62572 62573 62574 62575 62576 62577 62578 62579 62580 62581 62582 62583 62584 62585 62586 62587 62588 62589 62590 62591 62592 62593 62594 62595 62596 62597 62598 62599 62600 62601 62602 62603 62604 62605 62606
pub fn deser_structure_crate_model_disk_image_volume_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskImageVolumeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskImageVolumeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("id") /* Id com.amazonaws.ec2#DiskImageVolumeDescription$Id */ => {
let var_3053 =
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_id(var_3053);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#DiskImageVolumeDescription$Size */ => {
let var_3054 =
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#Long`)"))
}
?
)
;
builder = builder.set_size(var_3054);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_size(self, input: Option<i64>) -> Self
pub fn set_size(self, input: Option<i64>) -> Self
The size of the volume, in GiB.
Examples found in repository?
src/xml_deser.rs (line 62599)
62567 62568 62569 62570 62571 62572 62573 62574 62575 62576 62577 62578 62579 62580 62581 62582 62583 62584 62585 62586 62587 62588 62589 62590 62591 62592 62593 62594 62595 62596 62597 62598 62599 62600 62601 62602 62603 62604 62605 62606
pub fn deser_structure_crate_model_disk_image_volume_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskImageVolumeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskImageVolumeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("id") /* Id com.amazonaws.ec2#DiskImageVolumeDescription$Id */ => {
let var_3053 =
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_id(var_3053);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#DiskImageVolumeDescription$Size */ => {
let var_3054 =
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#Long`)"))
}
?
)
;
builder = builder.set_size(var_3054);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> DiskImageVolumeDescription
pub fn build(self) -> DiskImageVolumeDescription
Consumes the builder and constructs a DiskImageVolumeDescription
.
Examples found in repository?
src/xml_deser.rs (line 62605)
62567 62568 62569 62570 62571 62572 62573 62574 62575 62576 62577 62578 62579 62580 62581 62582 62583 62584 62585 62586 62587 62588 62589 62590 62591 62592 62593 62594 62595 62596 62597 62598 62599 62600 62601 62602 62603 62604 62605 62606
pub fn deser_structure_crate_model_disk_image_volume_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskImageVolumeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskImageVolumeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("id") /* Id com.amazonaws.ec2#DiskImageVolumeDescription$Id */ => {
let var_3053 =
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_id(var_3053);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#DiskImageVolumeDescription$Size */ => {
let var_3054 =
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#Long`)"))
}
?
)
;
builder = builder.set_size(var_3054);
}
,
_ => {}
}
}
Ok(builder.build())
}