Struct aws_sdk_ec2::model::HostOffering
source · #[non_exhaustive]pub struct HostOffering { /* private fields */ }
Expand description
Details about the Dedicated Host Reservation offering.
Implementations§
source§impl HostOffering
impl HostOffering
sourcepub fn currency_code(&self) -> Option<&CurrencyCodeValues>
pub fn currency_code(&self) -> Option<&CurrencyCodeValues>
The currency of the offering.
sourcepub fn hourly_price(&self) -> Option<&str>
pub fn hourly_price(&self) -> Option<&str>
The hourly price of the offering.
sourcepub fn instance_family(&self) -> Option<&str>
pub fn instance_family(&self) -> Option<&str>
The instance family of the offering.
sourcepub fn offering_id(&self) -> Option<&str>
pub fn offering_id(&self) -> Option<&str>
The ID of the offering.
sourcepub fn payment_option(&self) -> Option<&PaymentOption>
pub fn payment_option(&self) -> Option<&PaymentOption>
The available payment option.
sourcepub fn upfront_price(&self) -> Option<&str>
pub fn upfront_price(&self) -> Option<&str>
The upfront price of the offering. Does not apply to No Upfront offerings.
source§impl HostOffering
impl HostOffering
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture HostOffering
.
Examples found in repository?
src/xml_deser.rs (line 45546)
45542 45543 45544 45545 45546 45547 45548 45549 45550 45551 45552 45553 45554 45555 45556 45557 45558 45559 45560 45561 45562 45563 45564 45565 45566 45567 45568 45569 45570 45571 45572 45573 45574 45575 45576 45577 45578 45579 45580 45581 45582 45583 45584 45585 45586 45587 45588 45589 45590 45591 45592 45593 45594 45595 45596 45597 45598 45599 45600 45601 45602 45603 45604 45605 45606 45607 45608 45609 45610 45611 45612 45613 45614 45615 45616 45617 45618 45619 45620 45621 45622 45623 45624 45625 45626 45627 45628 45629 45630 45631 45632 45633 45634 45635 45636 45637 45638 45639 45640 45641 45642 45643 45644 45645 45646 45647 45648
pub fn deser_structure_crate_model_host_offering(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostOffering, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostOffering::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#HostOffering$CurrencyCode */ => {
let var_2030 =
Some(
Result::<crate::model::CurrencyCodeValues, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CurrencyCodeValues::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_2030);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#HostOffering$Duration */ => {
let var_2031 =
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_duration(var_2031);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#HostOffering$HourlyPrice */ => {
let var_2032 =
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_hourly_price(var_2032);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostOffering$InstanceFamily */ => {
let var_2033 =
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_instance_family(var_2033);
}
,
s if s.matches("offeringId") /* OfferingId com.amazonaws.ec2#HostOffering$OfferingId */ => {
let var_2034 =
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_offering_id(var_2034);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#HostOffering$PaymentOption */ => {
let var_2035 =
Some(
Result::<crate::model::PaymentOption, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::PaymentOption::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_payment_option(var_2035);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#HostOffering$UpfrontPrice */ => {
let var_2036 =
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_upfront_price(var_2036);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for HostOffering
impl Clone for HostOffering
source§fn clone(&self) -> HostOffering
fn clone(&self) -> HostOffering
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