Struct aws_sdk_ec2::model::InstanceEventWindowTimeRange
source · #[non_exhaustive]pub struct InstanceEventWindowTimeRange { /* private fields */ }
Expand description
The start day and time and the end day and time of the time range, in UTC.
Implementations§
source§impl InstanceEventWindowTimeRange
impl InstanceEventWindowTimeRange
sourcepub fn start_week_day(&self) -> Option<&WeekDay>
pub fn start_week_day(&self) -> Option<&WeekDay>
The day on which the time range begins.
sourcepub fn start_hour(&self) -> Option<i32>
pub fn start_hour(&self) -> Option<i32>
The hour when the time range begins.
sourcepub fn end_week_day(&self) -> Option<&WeekDay>
pub fn end_week_day(&self) -> Option<&WeekDay>
The day on which the time range ends.
source§impl InstanceEventWindowTimeRange
impl InstanceEventWindowTimeRange
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceEventWindowTimeRange
.
Examples found in repository?
src/xml_deser.rs (line 56253)
56249 56250 56251 56252 56253 56254 56255 56256 56257 56258 56259 56260 56261 56262 56263 56264 56265 56266 56267 56268 56269 56270 56271 56272 56273 56274 56275 56276 56277 56278 56279 56280 56281 56282 56283 56284 56285 56286 56287 56288 56289 56290 56291 56292 56293 56294 56295 56296 56297 56298 56299 56300 56301 56302 56303 56304 56305 56306 56307 56308 56309 56310 56311 56312 56313 56314 56315 56316 56317 56318
pub fn deser_structure_crate_model_instance_event_window_time_range(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceEventWindowTimeRange, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceEventWindowTimeRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("startWeekDay") /* StartWeekDay com.amazonaws.ec2#InstanceEventWindowTimeRange$StartWeekDay */ => {
let var_2733 =
Some(
Result::<crate::model::WeekDay, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::WeekDay::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_start_week_day(var_2733);
}
,
s if s.matches("startHour") /* StartHour com.amazonaws.ec2#InstanceEventWindowTimeRange$StartHour */ => {
let var_2734 =
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#Hour`)"))
}
?
)
;
builder = builder.set_start_hour(var_2734);
}
,
s if s.matches("endWeekDay") /* EndWeekDay com.amazonaws.ec2#InstanceEventWindowTimeRange$EndWeekDay */ => {
let var_2735 =
Some(
Result::<crate::model::WeekDay, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::WeekDay::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_week_day(var_2735);
}
,
s if s.matches("endHour") /* EndHour com.amazonaws.ec2#InstanceEventWindowTimeRange$EndHour */ => {
let var_2736 =
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#Hour`)"))
}
?
)
;
builder = builder.set_end_hour(var_2736);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceEventWindowTimeRange
impl Clone for InstanceEventWindowTimeRange
source§fn clone(&self) -> InstanceEventWindowTimeRange
fn clone(&self) -> InstanceEventWindowTimeRange
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