Struct aws_sdk_ec2::model::processor_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ProcessorInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn supported_architectures(self, input: ArchitectureType) -> Self
pub fn supported_architectures(self, input: ArchitectureType) -> Self
Appends an item to supported_architectures
.
To override the contents of this collection use set_supported_architectures
.
The architectures supported by the instance type.
sourcepub fn set_supported_architectures(
self,
input: Option<Vec<ArchitectureType>>
) -> Self
pub fn set_supported_architectures(
self,
input: Option<Vec<ArchitectureType>>
) -> Self
The architectures supported by the instance type.
Examples found in repository?
src/xml_deser.rs (line 59620)
59606 59607 59608 59609 59610 59611 59612 59613 59614 59615 59616 59617 59618 59619 59620 59621 59622 59623 59624 59625 59626 59627 59628 59629 59630 59631 59632 59633 59634 59635 59636 59637 59638 59639 59640 59641 59642
pub fn deser_structure_crate_model_processor_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProcessorInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProcessorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedArchitectures") /* SupportedArchitectures com.amazonaws.ec2#ProcessorInfo$SupportedArchitectures */ => {
let var_2902 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_architecture_type_list(&mut tag)
?
)
;
builder = builder.set_supported_architectures(var_2902);
}
,
s if s.matches("sustainedClockSpeedInGhz") /* SustainedClockSpeedInGhz com.amazonaws.ec2#ProcessorInfo$SustainedClockSpeedInGhz */ => {
let var_2903 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
}
?
)
;
builder = builder.set_sustained_clock_speed_in_ghz(var_2903);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn sustained_clock_speed_in_ghz(self, input: f64) -> Self
pub fn sustained_clock_speed_in_ghz(self, input: f64) -> Self
The speed of the processor, in GHz.
sourcepub fn set_sustained_clock_speed_in_ghz(self, input: Option<f64>) -> Self
pub fn set_sustained_clock_speed_in_ghz(self, input: Option<f64>) -> Self
The speed of the processor, in GHz.
Examples found in repository?
src/xml_deser.rs (line 59635)
59606 59607 59608 59609 59610 59611 59612 59613 59614 59615 59616 59617 59618 59619 59620 59621 59622 59623 59624 59625 59626 59627 59628 59629 59630 59631 59632 59633 59634 59635 59636 59637 59638 59639 59640 59641 59642
pub fn deser_structure_crate_model_processor_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProcessorInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProcessorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedArchitectures") /* SupportedArchitectures com.amazonaws.ec2#ProcessorInfo$SupportedArchitectures */ => {
let var_2902 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_architecture_type_list(&mut tag)
?
)
;
builder = builder.set_supported_architectures(var_2902);
}
,
s if s.matches("sustainedClockSpeedInGhz") /* SustainedClockSpeedInGhz com.amazonaws.ec2#ProcessorInfo$SustainedClockSpeedInGhz */ => {
let var_2903 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
}
?
)
;
builder = builder.set_sustained_clock_speed_in_ghz(var_2903);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ProcessorInfo
pub fn build(self) -> ProcessorInfo
Consumes the builder and constructs a ProcessorInfo
.
Examples found in repository?
src/xml_deser.rs (line 59641)
59606 59607 59608 59609 59610 59611 59612 59613 59614 59615 59616 59617 59618 59619 59620 59621 59622 59623 59624 59625 59626 59627 59628 59629 59630 59631 59632 59633 59634 59635 59636 59637 59638 59639 59640 59641 59642
pub fn deser_structure_crate_model_processor_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProcessorInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProcessorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedArchitectures") /* SupportedArchitectures com.amazonaws.ec2#ProcessorInfo$SupportedArchitectures */ => {
let var_2902 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_architecture_type_list(&mut tag)
?
)
;
builder = builder.set_supported_architectures(var_2902);
}
,
s if s.matches("sustainedClockSpeedInGhz") /* SustainedClockSpeedInGhz com.amazonaws.ec2#ProcessorInfo$SustainedClockSpeedInGhz */ => {
let var_2903 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
}
?
)
;
builder = builder.set_sustained_clock_speed_in_ghz(var_2903);
}
,
_ => {}
}
}
Ok(builder.build())
}