Struct aws_sdk_ec2::model::target_capacity_specification::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for TargetCapacitySpecification
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn total_target_capacity(self, input: i32) -> Self
pub fn total_target_capacity(self, input: i32) -> Self
The number of units to request, filled using DefaultTargetCapacityType
.
sourcepub fn set_total_target_capacity(self, input: Option<i32>) -> Self
pub fn set_total_target_capacity(self, input: Option<i32>) -> Self
The number of units to request, filled using DefaultTargetCapacityType
.
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn on_demand_target_capacity(self, input: i32) -> Self
pub fn on_demand_target_capacity(self, input: i32) -> Self
The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.
sourcepub fn set_on_demand_target_capacity(self, input: Option<i32>) -> Self
pub fn set_on_demand_target_capacity(self, input: Option<i32>) -> Self
The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn spot_target_capacity(self, input: i32) -> Self
pub fn spot_target_capacity(self, input: i32) -> Self
The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.
sourcepub fn set_spot_target_capacity(self, input: Option<i32>) -> Self
pub fn set_spot_target_capacity(self, input: Option<i32>) -> Self
The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn default_target_capacity_type(
self,
input: DefaultTargetCapacityType
) -> Self
pub fn default_target_capacity_type(
self,
input: DefaultTargetCapacityType
) -> Self
The default TotalTargetCapacity
, which is either Spot
or On-Demand
.
sourcepub fn set_default_target_capacity_type(
self,
input: Option<DefaultTargetCapacityType>
) -> Self
pub fn set_default_target_capacity_type(
self,
input: Option<DefaultTargetCapacityType>
) -> Self
The default TotalTargetCapacity
, which is either Spot
or On-Demand
.
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn target_capacity_unit_type(self, input: TargetCapacityUnitType) -> Self
pub fn target_capacity_unit_type(self, input: TargetCapacityUnitType) -> Self
The unit for the target capacity.
Default: units
(translates to number of instances)
sourcepub fn set_target_capacity_unit_type(
self,
input: Option<TargetCapacityUnitType>
) -> Self
pub fn set_target_capacity_unit_type(
self,
input: Option<TargetCapacityUnitType>
) -> Self
The unit for the target capacity.
Default: units
(translates to number of instances)
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> TargetCapacitySpecification
pub fn build(self) -> TargetCapacitySpecification
Consumes the builder and constructs a TargetCapacitySpecification
.
Examples found in repository?
58515 58516 58517 58518 58519 58520 58521 58522 58523 58524 58525 58526 58527 58528 58529 58530 58531 58532 58533 58534 58535 58536 58537 58538 58539 58540 58541 58542 58543 58544 58545 58546 58547 58548 58549 58550 58551 58552 58553 58554 58555 58556 58557 58558 58559 58560 58561 58562 58563 58564 58565 58566 58567 58568 58569 58570 58571 58572 58573 58574 58575 58576 58577 58578 58579 58580 58581 58582 58583 58584 58585 58586 58587 58588 58589 58590 58591 58592 58593 58594 58595 58596 58597 58598 58599
pub fn deser_structure_crate_model_target_capacity_specification(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2848 =
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_total_target_capacity(var_2848);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2849 =
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_on_demand_target_capacity(var_2849);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2850 =
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_spot_target_capacity(var_2850);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2851 =
Some(
Result::<crate::model::DefaultTargetCapacityType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::DefaultTargetCapacityType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2851);
}
,
s if s.matches("targetCapacityUnitType") /* TargetCapacityUnitType com.amazonaws.ec2#TargetCapacitySpecification$TargetCapacityUnitType */ => {
let var_2852 =
Some(
Result::<crate::model::TargetCapacityUnitType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::TargetCapacityUnitType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_capacity_unit_type(var_2852);
}
,
_ => {}
}
}
Ok(builder.build())
}