Struct aws_sdk_ec2::model::ScheduledInstanceRecurrence
source · #[non_exhaustive]pub struct ScheduledInstanceRecurrence { /* private fields */ }
Expand description
Describes the recurring schedule for a Scheduled Instance.
Implementations§
source§impl ScheduledInstanceRecurrence
impl ScheduledInstanceRecurrence
sourcepub fn interval(&self) -> Option<i32>
pub fn interval(&self) -> Option<i32>
The interval quantity. The interval unit depends on the value of frequency
. For example, every 2 weeks or every 2 months.
sourcepub fn occurrence_day_set(&self) -> Option<&[i32]>
pub fn occurrence_day_set(&self) -> Option<&[i32]>
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
sourcepub fn occurrence_relative_to_end(&self) -> Option<bool>
pub fn occurrence_relative_to_end(&self) -> Option<bool>
Indicates whether the occurrence is relative to the end of the specified week or month.
sourcepub fn occurrence_unit(&self) -> Option<&str>
pub fn occurrence_unit(&self) -> Option<&str>
The unit for occurrenceDaySet
(DayOfWeek
or DayOfMonth
).
source§impl ScheduledInstanceRecurrence
impl ScheduledInstanceRecurrence
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ScheduledInstanceRecurrence
.
Examples found in repository?
src/xml_deser.rs (line 60351)
60347 60348 60349 60350 60351 60352 60353 60354 60355 60356 60357 60358 60359 60360 60361 60362 60363 60364 60365 60366 60367 60368 60369 60370 60371 60372 60373 60374 60375 60376 60377 60378 60379 60380 60381 60382 60383 60384 60385 60386 60387 60388 60389 60390 60391 60392 60393 60394 60395 60396 60397 60398 60399 60400 60401 60402 60403 60404 60405 60406 60407 60408 60409 60410 60411 60412 60413 60414 60415 60416 60417 60418 60419 60420 60421 60422 60423 60424
pub fn deser_structure_crate_model_scheduled_instance_recurrence(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstanceRecurrence, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstanceRecurrence::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#ScheduledInstanceRecurrence$Frequency */ => {
let var_2936 =
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_frequency(var_2936);
}
,
s if s.matches("interval") /* Interval com.amazonaws.ec2#ScheduledInstanceRecurrence$Interval */ => {
let var_2937 =
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_interval(var_2937);
}
,
s if s.matches("occurrenceDaySet") /* OccurrenceDaySet com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceDaySet */ => {
let var_2938 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_occurrence_day_set(&mut tag)
?
)
;
builder = builder.set_occurrence_day_set(var_2938);
}
,
s if s.matches("occurrenceRelativeToEnd") /* OccurrenceRelativeToEnd com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceRelativeToEnd */ => {
let var_2939 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_occurrence_relative_to_end(var_2939);
}
,
s if s.matches("occurrenceUnit") /* OccurrenceUnit com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceUnit */ => {
let var_2940 =
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_occurrence_unit(var_2940);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ScheduledInstanceRecurrence
impl Clone for ScheduledInstanceRecurrence
source§fn clone(&self) -> ScheduledInstanceRecurrence
fn clone(&self) -> ScheduledInstanceRecurrence
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more