Struct aws_sdk_ec2::model::DiskInfo
source · #[non_exhaustive]pub struct DiskInfo { /* private fields */ }
Expand description
Describes a disk.
Implementations§
source§impl DiskInfo
impl DiskInfo
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DiskInfo
.
Examples found in repository?
src/xml_deser.rs (line 68857)
68853 68854 68855 68856 68857 68858 68859 68860 68861 68862 68863 68864 68865 68866 68867 68868 68869 68870 68871 68872 68873 68874 68875 68876 68877 68878 68879 68880 68881 68882 68883 68884 68885 68886 68887 68888 68889 68890 68891 68892 68893 68894 68895 68896 68897 68898 68899 68900 68901 68902 68903 68904 68905 68906 68907 68908
pub fn deser_structure_crate_model_disk_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInGB") /* SizeInGB com.amazonaws.ec2#DiskInfo$SizeInGB */ => {
let var_3394 =
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#DiskSize`)"))
}
?
)
;
builder = builder.set_size_in_gb(var_3394);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#DiskInfo$Count */ => {
let var_3395 =
Some(
{
<i32 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 (integer: `com.amazonaws.ec2#DiskCount`)"))
}
?
)
;
builder = builder.set_count(var_3395);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#DiskInfo$Type */ => {
let var_3396 =
Some(
Result::<crate::model::DiskType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DiskType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_3396);
}
,
_ => {}
}
}
Ok(builder.build())
}