Struct aws_sdk_ec2::model::PricingDetail
source · #[non_exhaustive]pub struct PricingDetail { /* private fields */ }
Expand description
Describes a Reserved Instance offering.
Implementations§
source§impl PricingDetail
impl PricingDetail
source§impl PricingDetail
impl PricingDetail
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture PricingDetail
.
Examples found in repository?
src/xml_deser.rs (line 65765)
65761 65762 65763 65764 65765 65766 65767 65768 65769 65770 65771 65772 65773 65774 65775 65776 65777 65778 65779 65780 65781 65782 65783 65784 65785 65786 65787 65788 65789 65790 65791 65792 65793 65794 65795 65796 65797 65798 65799 65800 65801 65802
pub fn deser_structure_crate_model_pricing_detail(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PricingDetail, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PricingDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("count") /* Count com.amazonaws.ec2#PricingDetail$Count */ => {
let var_3235 =
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_count(var_3235);
}
,
s if s.matches("price") /* Price com.amazonaws.ec2#PricingDetail$Price */ => {
let var_3236 =
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_price(var_3236);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for PricingDetail
impl Clone for PricingDetail
source§fn clone(&self) -> PricingDetail
fn clone(&self) -> PricingDetail
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more