Struct aws_sdk_ec2::model::purchase::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Purchase
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn currency_code(self, input: CurrencyCodeValues) -> Self
pub fn currency_code(self, input: CurrencyCodeValues) -> Self
The currency in which the UpfrontPrice
and HourlyPrice
amounts are specified. At this time, the only supported currency is USD
.
sourcepub fn set_currency_code(self, input: Option<CurrencyCodeValues>) -> Self
pub fn set_currency_code(self, input: Option<CurrencyCodeValues>) -> Self
The currency in which the UpfrontPrice
and HourlyPrice
amounts are specified. At this time, the only supported currency is USD
.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_duration(self, input: Option<i32>) -> Self
pub fn set_duration(self, input: Option<i32>) -> Self
The duration of the reservation's term in seconds.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn host_id_set(self, input: impl Into<String>) -> Self
pub fn host_id_set(self, input: impl Into<String>) -> Self
Appends an item to host_id_set
.
To override the contents of this collection use set_host_id_set
.
The IDs of the Dedicated Hosts associated with the reservation.
sourcepub fn set_host_id_set(self, input: Option<Vec<String>>) -> Self
pub fn set_host_id_set(self, input: Option<Vec<String>>) -> Self
The IDs of the Dedicated Hosts associated with the reservation.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn host_reservation_id(self, input: impl Into<String>) -> Self
pub fn host_reservation_id(self, input: impl Into<String>) -> Self
The ID of the reservation.
sourcepub fn set_host_reservation_id(self, input: Option<String>) -> Self
pub fn set_host_reservation_id(self, input: Option<String>) -> Self
The ID of the reservation.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn hourly_price(self, input: impl Into<String>) -> Self
pub fn hourly_price(self, input: impl Into<String>) -> Self
The hourly price of the reservation per hour.
sourcepub fn set_hourly_price(self, input: Option<String>) -> Self
pub fn set_hourly_price(self, input: Option<String>) -> Self
The hourly price of the reservation per hour.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_family(self, input: impl Into<String>) -> Self
pub fn instance_family(self, input: impl Into<String>) -> Self
The instance family on the Dedicated Host that the reservation can be associated with.
sourcepub fn set_instance_family(self, input: Option<String>) -> Self
pub fn set_instance_family(self, input: Option<String>) -> Self
The instance family on the Dedicated Host that the reservation can be associated with.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn payment_option(self, input: PaymentOption) -> Self
pub fn payment_option(self, input: PaymentOption) -> Self
The payment option for the reservation.
sourcepub fn set_payment_option(self, input: Option<PaymentOption>) -> Self
pub fn set_payment_option(self, input: Option<PaymentOption>) -> Self
The payment option for the reservation.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn upfront_price(self, input: impl Into<String>) -> Self
pub fn upfront_price(self, input: impl Into<String>) -> Self
The upfront price of the reservation.
sourcepub fn set_upfront_price(self, input: Option<String>) -> Self
pub fn set_upfront_price(self, input: Option<String>) -> Self
The upfront price of the reservation.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Purchase
pub fn build(self) -> Purchase
Consumes the builder and constructs a Purchase
.
Examples found in repository?
52291 52292 52293 52294 52295 52296 52297 52298 52299 52300 52301 52302 52303 52304 52305 52306 52307 52308 52309 52310 52311 52312 52313 52314 52315 52316 52317 52318 52319 52320 52321 52322 52323 52324 52325 52326 52327 52328 52329 52330 52331 52332 52333 52334 52335 52336 52337 52338 52339 52340 52341 52342 52343 52344 52345 52346 52347 52348 52349 52350 52351 52352 52353 52354 52355 52356 52357 52358 52359 52360 52361 52362 52363 52364 52365 52366 52367 52368 52369 52370 52371 52372 52373 52374 52375 52376 52377 52378 52379 52380 52381 52382 52383 52384 52385 52386 52387 52388 52389 52390 52391 52392 52393 52394 52395 52396 52397 52398 52399 52400 52401 52402 52403 52404 52405 52406 52407
pub fn deser_structure_crate_model_purchase(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2493 =
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_2493);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2494 =
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_2494);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2495 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2495);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2496 =
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_host_reservation_id(var_2496);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2497 =
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_2497);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2498 =
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_2498);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2499 =
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_2499);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2500 =
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_2500);
}
,
_ => {}
}
}
Ok(builder.build())
}