Struct aws_sdk_ec2::model::disk_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for DiskInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn size_in_gb(self, input: i64) -> Self
pub fn size_in_gb(self, input: i64) -> Self
The size of the disk in GB.
sourcepub fn set_size_in_gb(self, input: Option<i64>) -> Self
pub fn set_size_in_gb(self, input: Option<i64>) -> Self
The size of the disk in GB.
Examples found in repository?
src/xml_deser.rs (line 68872)
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())
}
sourcepub fn set_count(self, input: Option<i32>) -> Self
pub fn set_count(self, input: Option<i32>) -> Self
The number of disks with this configuration.
Examples found in repository?
src/xml_deser.rs (line 68887)
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())
}
sourcepub fn set_type(self, input: Option<DiskType>) -> Self
pub fn set_type(self, input: Option<DiskType>) -> Self
The type of disk.
Examples found in repository?
src/xml_deser.rs (line 68901)
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())
}
sourcepub fn build(self) -> DiskInfo
pub fn build(self) -> DiskInfo
Consumes the builder and constructs a DiskInfo
.
Examples found in repository?
src/xml_deser.rs (line 68907)
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())
}