Struct aws_sdk_ec2::model::v_cpu_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for VCpuInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn default_v_cpus(self, input: i32) -> Self
pub fn default_v_cpus(self, input: i32) -> Self
The default number of vCPUs for the instance type.
sourcepub fn set_default_v_cpus(self, input: Option<i32>) -> Self
pub fn set_default_v_cpus(self, input: Option<i32>) -> Self
The default number of vCPUs for the instance type.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn default_cores(self, input: i32) -> Self
pub fn default_cores(self, input: i32) -> Self
The default number of cores for the instance type.
sourcepub fn set_default_cores(self, input: Option<i32>) -> Self
pub fn set_default_cores(self, input: Option<i32>) -> Self
The default number of cores for the instance type.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn default_threads_per_core(self, input: i32) -> Self
pub fn default_threads_per_core(self, input: i32) -> Self
The default number of threads per core for the instance type.
sourcepub fn set_default_threads_per_core(self, input: Option<i32>) -> Self
pub fn set_default_threads_per_core(self, input: Option<i32>) -> Self
The default number of threads per core for the instance type.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn valid_cores(self, input: i32) -> Self
pub fn valid_cores(self, input: i32) -> Self
Appends an item to valid_cores
.
To override the contents of this collection use set_valid_cores
.
The valid number of cores that can be configured for the instance type.
sourcepub fn set_valid_cores(self, input: Option<Vec<i32>>) -> Self
pub fn set_valid_cores(self, input: Option<Vec<i32>>) -> Self
The valid number of cores that can be configured for the instance type.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn valid_threads_per_core(self, input: i32) -> Self
pub fn valid_threads_per_core(self, input: i32) -> Self
Appends an item to valid_threads_per_core
.
To override the contents of this collection use set_valid_threads_per_core
.
The valid number of threads per core that can be configured for the instance type.
sourcepub fn set_valid_threads_per_core(self, input: Option<Vec<i32>>) -> Self
pub fn set_valid_threads_per_core(self, input: Option<Vec<i32>>) -> Self
The valid number of threads per core that can be configured for the instance type.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> VCpuInfo
pub fn build(self) -> VCpuInfo
Consumes the builder and constructs a VCpuInfo
.
Examples found in repository?
59644 59645 59646 59647 59648 59649 59650 59651 59652 59653 59654 59655 59656 59657 59658 59659 59660 59661 59662 59663 59664 59665 59666 59667 59668 59669 59670 59671 59672 59673 59674 59675 59676 59677 59678 59679 59680 59681 59682 59683 59684 59685 59686 59687 59688 59689 59690 59691 59692 59693 59694 59695 59696 59697 59698 59699 59700 59701 59702 59703 59704 59705 59706 59707 59708 59709 59710 59711 59712 59713 59714 59715 59716 59717 59718 59719 59720
pub fn deser_structure_crate_model_v_cpu_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2904 =
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#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2904);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2905 =
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#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2905);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2906 =
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#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2906);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2907 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2907);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2908 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2908);
}
,
_ => {}
}
}
Ok(builder.build())
}