Struct aws_sdk_ec2::model::recurring_charge::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for RecurringCharge
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_amount(self, input: Option<f64>) -> Self
pub fn set_amount(self, input: Option<f64>) -> Self
The amount of the recurring charge.
Examples found in repository?
src/xml_deser.rs (line 65675)
65656 65657 65658 65659 65660 65661 65662 65663 65664 65665 65666 65667 65668 65669 65670 65671 65672 65673 65674 65675 65676 65677 65678 65679 65680 65681 65682 65683 65684 65685 65686 65687 65688 65689 65690 65691 65692 65693 65694 65695 65696
pub fn deser_structure_crate_model_recurring_charge(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RecurringCharge, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::RecurringCharge::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amount") /* Amount com.amazonaws.ec2#RecurringCharge$Amount */ => {
let var_3230 =
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#Double`)"))
}
?
)
;
builder = builder.set_amount(var_3230);
}
,
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#RecurringCharge$Frequency */ => {
let var_3231 =
Some(
Result::<crate::model::RecurringChargeFrequency, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::RecurringChargeFrequency::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_frequency(var_3231);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn frequency(self, input: RecurringChargeFrequency) -> Self
pub fn frequency(self, input: RecurringChargeFrequency) -> Self
The frequency of the recurring charge.
sourcepub fn set_frequency(self, input: Option<RecurringChargeFrequency>) -> Self
pub fn set_frequency(self, input: Option<RecurringChargeFrequency>) -> Self
The frequency of the recurring charge.
Examples found in repository?
src/xml_deser.rs (line 65689)
65656 65657 65658 65659 65660 65661 65662 65663 65664 65665 65666 65667 65668 65669 65670 65671 65672 65673 65674 65675 65676 65677 65678 65679 65680 65681 65682 65683 65684 65685 65686 65687 65688 65689 65690 65691 65692 65693 65694 65695 65696
pub fn deser_structure_crate_model_recurring_charge(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RecurringCharge, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::RecurringCharge::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amount") /* Amount com.amazonaws.ec2#RecurringCharge$Amount */ => {
let var_3230 =
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#Double`)"))
}
?
)
;
builder = builder.set_amount(var_3230);
}
,
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#RecurringCharge$Frequency */ => {
let var_3231 =
Some(
Result::<crate::model::RecurringChargeFrequency, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::RecurringChargeFrequency::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_frequency(var_3231);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> RecurringCharge
pub fn build(self) -> RecurringCharge
Consumes the builder and constructs a RecurringCharge
.
Examples found in repository?
src/xml_deser.rs (line 65695)
65656 65657 65658 65659 65660 65661 65662 65663 65664 65665 65666 65667 65668 65669 65670 65671 65672 65673 65674 65675 65676 65677 65678 65679 65680 65681 65682 65683 65684 65685 65686 65687 65688 65689 65690 65691 65692 65693 65694 65695 65696
pub fn deser_structure_crate_model_recurring_charge(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RecurringCharge, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::RecurringCharge::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amount") /* Amount com.amazonaws.ec2#RecurringCharge$Amount */ => {
let var_3230 =
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#Double`)"))
}
?
)
;
builder = builder.set_amount(var_3230);
}
,
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#RecurringCharge$Frequency */ => {
let var_3231 =
Some(
Result::<crate::model::RecurringChargeFrequency, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::RecurringChargeFrequency::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_frequency(var_3231);
}
,
_ => {}
}
}
Ok(builder.build())
}