-
Notifications
You must be signed in to change notification settings - Fork 242
/
shape_describe_events_input.rs
73 lines (73 loc) · 2.76 KB
/
shape_describe_events_input.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn ser_describe_events_input_input_input(
input: &crate::operation::describe_events::DescribeEventsInput,
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = ::aws_smithy_query::QueryWriter::new(&mut out, "DescribeEvents", "2014-10-31");
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("SourceIdentifier");
if let Some(var_2) = &input.source_identifier {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("SourceType");
if let Some(var_4) = &input.source_type {
scope_3.string(var_4.as_str());
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("StartTime");
if let Some(var_6) = &input.start_time {
scope_5.date_time(var_6, ::aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_7 = writer.prefix("EndTime");
if let Some(var_8) = &input.end_time {
scope_7.date_time(var_8, ::aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_9 = writer.prefix("Duration");
if let Some(var_10) = &input.duration {
scope_9.number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*var_10).into()),
);
}
#[allow(unused_mut)]
let mut scope_11 = writer.prefix("EventCategories");
if let Some(var_12) = &input.event_categories {
let mut list_14 = scope_11.start_list(false, Some("EventCategory"));
for item_13 in var_12 {
#[allow(unused_mut)]
let mut entry_15 = list_14.entry();
entry_15.string(item_13);
}
list_14.finish();
}
#[allow(unused_mut)]
let mut scope_16 = writer.prefix("Filters");
if let Some(var_17) = &input.filters {
let mut list_19 = scope_16.start_list(false, Some("Filter"));
for item_18 in var_17 {
#[allow(unused_mut)]
let mut entry_20 = list_19.entry();
crate::protocol_serde::shape_filter::ser_filter(entry_20, item_18)?;
}
list_19.finish();
}
#[allow(unused_mut)]
let mut scope_21 = writer.prefix("MaxRecords");
if let Some(var_22) = &input.max_records {
scope_21.number(
#[allow(clippy::useless_conversion)]
::aws_smithy_types::Number::NegInt((*var_22).into()),
);
}
#[allow(unused_mut)]
let mut scope_23 = writer.prefix("Marker");
if let Some(var_24) = &input.marker {
scope_23.string(var_24);
}
writer.finish();
Ok(::aws_smithy_types::body::SdkBody::from(out))
}