Struct aws_sdk_ec2::model::scheduled_instance::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ScheduledInstance
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn create_date(self, input: DateTime) -> Self
pub fn create_date(self, input: DateTime) -> Self
The date when the Scheduled Instance was purchased.
sourcepub fn set_create_date(self, input: Option<DateTime>) -> Self
pub fn set_create_date(self, input: Option<DateTime>) -> Self
The date when the Scheduled Instance was purchased.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
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 for a single instance.
sourcepub fn set_hourly_price(self, input: Option<String>) -> Self
pub fn set_hourly_price(self, input: Option<String>) -> Self
The hourly price for a single instance.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_count(self, input: i32) -> Self
pub fn instance_count(self, input: i32) -> Self
The number of instances.
sourcepub fn set_instance_count(self, input: Option<i32>) -> Self
pub fn set_instance_count(self, input: Option<i32>) -> Self
The number of instances.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instance_type(self, input: impl Into<String>) -> Self
pub fn instance_type(self, input: impl Into<String>) -> Self
The instance type.
sourcepub fn set_instance_type(self, input: Option<String>) -> Self
pub fn set_instance_type(self, input: Option<String>) -> Self
The instance type.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn network_platform(self, input: impl Into<String>) -> Self
pub fn network_platform(self, input: impl Into<String>) -> Self
The network platform (EC2-Classic
or EC2-VPC
).
sourcepub fn set_network_platform(self, input: Option<String>) -> Self
pub fn set_network_platform(self, input: Option<String>) -> Self
The network platform (EC2-Classic
or EC2-VPC
).
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn next_slot_start_time(self, input: DateTime) -> Self
pub fn next_slot_start_time(self, input: DateTime) -> Self
The time for the next schedule to start.
sourcepub fn set_next_slot_start_time(self, input: Option<DateTime>) -> Self
pub fn set_next_slot_start_time(self, input: Option<DateTime>) -> Self
The time for the next schedule to start.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_platform(self, input: Option<String>) -> Self
pub fn set_platform(self, input: Option<String>) -> Self
The platform (Linux/UNIX
or Windows
).
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn previous_slot_end_time(self, input: DateTime) -> Self
pub fn previous_slot_end_time(self, input: DateTime) -> Self
The time that the previous schedule ended or will end.
sourcepub fn set_previous_slot_end_time(self, input: Option<DateTime>) -> Self
pub fn set_previous_slot_end_time(self, input: Option<DateTime>) -> Self
The time that the previous schedule ended or will end.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn recurrence(self, input: ScheduledInstanceRecurrence) -> Self
pub fn recurrence(self, input: ScheduledInstanceRecurrence) -> Self
The schedule recurrence.
sourcepub fn set_recurrence(self, input: Option<ScheduledInstanceRecurrence>) -> Self
pub fn set_recurrence(self, input: Option<ScheduledInstanceRecurrence>) -> Self
The schedule recurrence.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn scheduled_instance_id(self, input: impl Into<String>) -> Self
pub fn scheduled_instance_id(self, input: impl Into<String>) -> Self
The Scheduled Instance ID.
sourcepub fn set_scheduled_instance_id(self, input: Option<String>) -> Self
pub fn set_scheduled_instance_id(self, input: Option<String>) -> Self
The Scheduled Instance ID.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn slot_duration_in_hours(self, input: i32) -> Self
pub fn slot_duration_in_hours(self, input: i32) -> Self
The number of hours in the schedule.
sourcepub fn set_slot_duration_in_hours(self, input: Option<i32>) -> Self
pub fn set_slot_duration_in_hours(self, input: Option<i32>) -> Self
The number of hours in the schedule.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn term_end_date(self, input: DateTime) -> Self
pub fn term_end_date(self, input: DateTime) -> Self
The end date for the Scheduled Instance.
sourcepub fn set_term_end_date(self, input: Option<DateTime>) -> Self
pub fn set_term_end_date(self, input: Option<DateTime>) -> Self
The end date for the Scheduled Instance.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn term_start_date(self, input: DateTime) -> Self
pub fn term_start_date(self, input: DateTime) -> Self
The start date for the Scheduled Instance.
sourcepub fn set_term_start_date(self, input: Option<DateTime>) -> Self
pub fn set_term_start_date(self, input: Option<DateTime>) -> Self
The start date for the Scheduled Instance.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn total_scheduled_instance_hours(self, input: i32) -> Self
pub fn total_scheduled_instance_hours(self, input: i32) -> Self
The total number of hours for a single instance for the entire term.
sourcepub fn set_total_scheduled_instance_hours(self, input: Option<i32>) -> Self
pub fn set_total_scheduled_instance_hours(self, input: Option<i32>) -> Self
The total number of hours for a single instance for the entire term.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ScheduledInstance
pub fn build(self) -> ScheduledInstance
Consumes the builder and constructs a ScheduledInstance
.
Examples found in repository?
49099 49100 49101 49102 49103 49104 49105 49106 49107 49108 49109 49110 49111 49112 49113 49114 49115 49116 49117 49118 49119 49120 49121 49122 49123 49124 49125 49126 49127 49128 49129 49130 49131 49132 49133 49134 49135 49136 49137 49138 49139 49140 49141 49142 49143 49144 49145 49146 49147 49148 49149 49150 49151 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49162 49163 49164 49165 49166 49167 49168 49169 49170 49171 49172 49173 49174 49175 49176 49177 49178 49179 49180 49181 49182 49183 49184 49185 49186 49187 49188 49189 49190 49191 49192 49193 49194 49195 49196 49197 49198 49199 49200 49201 49202 49203 49204 49205 49206 49207 49208 49209 49210 49211 49212 49213 49214 49215 49216 49217 49218 49219 49220 49221 49222 49223 49224 49225 49226 49227 49228 49229 49230 49231 49232 49233 49234 49235 49236 49237 49238 49239 49240 49241 49242 49243 49244 49245 49246 49247 49248 49249 49250 49251 49252 49253 49254 49255 49256 49257 49258 49259 49260 49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313
pub fn deser_structure_crate_model_scheduled_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_2277 =
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_2277);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_2278 =
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#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_2278);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_2279 =
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_2279);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_2280 =
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_instance_count(var_2280);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_2281 =
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_type(var_2281);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_2282 =
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_network_platform(var_2282);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_2283 =
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#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_2283);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_2284 =
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_platform(var_2284);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_2285 =
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#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_2285);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_2286 =
Some(
crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_2286);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_2287 =
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_scheduled_instance_id(var_2287);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_2288 =
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_slot_duration_in_hours(var_2288);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_2289 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_2289);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_2290 =
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#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_2290);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_2291 =
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_scheduled_instance_hours(var_2291);
}
,
_ => {}
}
}
Ok(builder.build())
}