Struct aws_sdk_ec2::model::fleet_capacity_reservation::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for FleetCapacityReservation.
Implementations§
source§impl Builder
impl Builder
sourcepub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn availability_zone_id(self, input: impl Into<String>) -> Self
pub fn availability_zone_id(self, input: impl Into<String>) -> Self
The ID of the Availability Zone in which the Capacity Reservation reserves capacity.
sourcepub fn set_availability_zone_id(self, input: Option<String>) -> Self
pub fn set_availability_zone_id(self, input: Option<String>) -> Self
The ID of the Availability Zone in which the Capacity Reservation reserves capacity.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn instance_type(self, input: InstanceType) -> Self
pub fn instance_type(self, input: InstanceType) -> Self
The instance type for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_type(self, input: Option<InstanceType>) -> Self
pub fn set_instance_type(self, input: Option<InstanceType>) -> Self
The instance type for which the Capacity Reservation reserves capacity.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn instance_platform(
self,
input: CapacityReservationInstancePlatform
) -> Self
pub fn instance_platform(
self,
input: CapacityReservationInstancePlatform
) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
sourcepub fn set_instance_platform(
self,
input: Option<CapacityReservationInstancePlatform>
) -> Self
pub fn set_instance_platform(
self,
input: Option<CapacityReservationInstancePlatform>
) -> Self
The type of operating system for which the Capacity Reservation reserves capacity.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which the Capacity Reservation reserves capacity.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which the Capacity Reservation reserves capacity.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn total_instance_count(self, input: i32) -> Self
pub fn total_instance_count(self, input: i32) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn set_total_instance_count(self, input: Option<i32>) -> Self
pub fn set_total_instance_count(self, input: Option<i32>) -> Self
The total number of instances for which the Capacity Reservation reserves capacity.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn fulfilled_capacity(self, input: f64) -> Self
pub fn fulfilled_capacity(self, input: f64) -> Self
The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.
sourcepub fn set_fulfilled_capacity(self, input: Option<f64>) -> Self
pub fn set_fulfilled_capacity(self, input: Option<f64>) -> Self
The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn ebs_optimized(self, input: bool) -> Self
pub fn ebs_optimized(self, input: bool) -> Self
Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.
sourcepub fn set_ebs_optimized(self, input: Option<bool>) -> Self
pub fn set_ebs_optimized(self, input: Option<bool>) -> Self
Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn create_date(self, input: DateTime) -> Self
pub fn create_date(self, input: DateTime) -> Self
The date and time at which the Capacity Reservation was created.
sourcepub fn set_create_date(self, input: Option<DateTime>) -> Self
pub fn set_create_date(self, input: Option<DateTime>) -> Self
The date and time at which the Capacity Reservation was created.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn weight(self, input: f64) -> Self
pub fn weight(self, input: f64) -> Self
The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.
sourcepub fn set_weight(self, input: Option<f64>) -> Self
pub fn set_weight(self, input: Option<f64>) -> Self
The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn priority(self, input: i32) -> Self
pub fn priority(self, input: i32) -> Self
The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.
sourcepub fn set_priority(self, input: Option<i32>) -> Self
pub fn set_priority(self, input: Option<i32>) -> Self
The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> FleetCapacityReservation
pub fn build(self) -> FleetCapacityReservation
Consumes the builder and constructs a FleetCapacityReservation.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_total_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
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_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
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#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}