Struct aws_sdk_elasticache::model::recurring_charge::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for RecurringCharge
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn recurring_charge_amount(self, input: f64) -> Self
pub fn recurring_charge_amount(self, input: f64) -> Self
The monetary amount of the recurring charge.
sourcepub fn set_recurring_charge_amount(self, input: Option<f64>) -> Self
pub fn set_recurring_charge_amount(self, input: Option<f64>) -> Self
The monetary amount of the recurring charge.
Examples found in repository?
src/xml_deser.rs (line 11441)
11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461
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("RecurringChargeAmount") /* RecurringChargeAmount com.amazonaws.elasticache#RecurringCharge$RecurringChargeAmount */ => {
let var_489 =
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.elasticache#Double`)"))
}
?
)
;
builder = builder.set_recurring_charge_amount(var_489);
}
,
s if s.matches("RecurringChargeFrequency") /* RecurringChargeFrequency com.amazonaws.elasticache#RecurringCharge$RecurringChargeFrequency */ => {
let var_490 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_recurring_charge_frequency(var_490);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn recurring_charge_frequency(self, input: impl Into<String>) -> Self
pub fn recurring_charge_frequency(self, input: impl Into<String>) -> Self
The frequency of the recurring charge.
sourcepub fn set_recurring_charge_frequency(self, input: Option<String>) -> Self
pub fn set_recurring_charge_frequency(self, input: Option<String>) -> Self
The frequency of the recurring charge.
Examples found in repository?
src/xml_deser.rs (line 11454)
11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461
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("RecurringChargeAmount") /* RecurringChargeAmount com.amazonaws.elasticache#RecurringCharge$RecurringChargeAmount */ => {
let var_489 =
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.elasticache#Double`)"))
}
?
)
;
builder = builder.set_recurring_charge_amount(var_489);
}
,
s if s.matches("RecurringChargeFrequency") /* RecurringChargeFrequency com.amazonaws.elasticache#RecurringCharge$RecurringChargeFrequency */ => {
let var_490 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_recurring_charge_frequency(var_490);
}
,
_ => {}
}
}
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 11460)
11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461
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("RecurringChargeAmount") /* RecurringChargeAmount com.amazonaws.elasticache#RecurringCharge$RecurringChargeAmount */ => {
let var_489 =
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.elasticache#Double`)"))
}
?
)
;
builder = builder.set_recurring_charge_amount(var_489);
}
,
s if s.matches("RecurringChargeFrequency") /* RecurringChargeFrequency com.amazonaws.elasticache#RecurringCharge$RecurringChargeFrequency */ => {
let var_490 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_recurring_charge_frequency(var_490);
}
,
_ => {}
}
}
Ok(builder.build())
}