Struct aws_sdk_ec2::model::launch_template_cpu_options::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for LaunchTemplateCpuOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn core_count(self, input: i32) -> Self
pub fn core_count(self, input: i32) -> Self
The number of CPU cores for the instance.
sourcepub fn set_core_count(self, input: Option<i32>) -> Self
pub fn set_core_count(self, input: Option<i32>) -> Self
The number of CPU cores for the instance.
Examples found in repository?
src/xml_deser.rs (line 52982)
52963 52964 52965 52966 52967 52968 52969 52970 52971 52972 52973 52974 52975 52976 52977 52978 52979 52980 52981 52982 52983 52984 52985 52986 52987 52988 52989 52990 52991 52992 52993 52994 52995 52996 52997 52998 52999 53000 53001 53002 53003 53004
pub fn deser_structure_crate_model_launch_template_cpu_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateCpuOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateCpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#LaunchTemplateCpuOptions$CoreCount */ => {
let var_2527 =
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#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2527);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#LaunchTemplateCpuOptions$ThreadsPerCore */ => {
let var_2528 =
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#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2528);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn threads_per_core(self, input: i32) -> Self
pub fn threads_per_core(self, input: i32) -> Self
The number of threads per CPU core.
sourcepub fn set_threads_per_core(self, input: Option<i32>) -> Self
pub fn set_threads_per_core(self, input: Option<i32>) -> Self
The number of threads per CPU core.
Examples found in repository?
src/xml_deser.rs (line 52997)
52963 52964 52965 52966 52967 52968 52969 52970 52971 52972 52973 52974 52975 52976 52977 52978 52979 52980 52981 52982 52983 52984 52985 52986 52987 52988 52989 52990 52991 52992 52993 52994 52995 52996 52997 52998 52999 53000 53001 53002 53003 53004
pub fn deser_structure_crate_model_launch_template_cpu_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateCpuOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateCpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#LaunchTemplateCpuOptions$CoreCount */ => {
let var_2527 =
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#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2527);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#LaunchTemplateCpuOptions$ThreadsPerCore */ => {
let var_2528 =
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#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2528);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> LaunchTemplateCpuOptions
pub fn build(self) -> LaunchTemplateCpuOptions
Consumes the builder and constructs a LaunchTemplateCpuOptions
.
Examples found in repository?
src/xml_deser.rs (line 53003)
52963 52964 52965 52966 52967 52968 52969 52970 52971 52972 52973 52974 52975 52976 52977 52978 52979 52980 52981 52982 52983 52984 52985 52986 52987 52988 52989 52990 52991 52992 52993 52994 52995 52996 52997 52998 52999 53000 53001 53002 53003 53004
pub fn deser_structure_crate_model_launch_template_cpu_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateCpuOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateCpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#LaunchTemplateCpuOptions$CoreCount */ => {
let var_2527 =
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#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2527);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#LaunchTemplateCpuOptions$ThreadsPerCore */ => {
let var_2528 =
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#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2528);
}
,
_ => {}
}
}
Ok(builder.build())
}