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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about a connection between two services. An edge can be a synchronous connection, such as typical call between client and service, or an asynchronous link, such as a Lambda function which retrieves an event from an SNS queue.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Edge {
/// <p>Identifier of the edge. Unique within a service map.</p>
pub reference_id: ::std::option::Option<i32>,
/// <p>The start time of the first segment on the edge.</p>
pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The end time of the last segment on the edge.</p>
pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Response statistics for segments on the edge.</p>
pub summary_statistics: ::std::option::Option<crate::types::EdgeStatistics>,
/// <p>A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.</p>
pub response_time_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
/// <p>Aliases for the edge.</p>
pub aliases: ::std::option::Option<::std::vec::Vec<crate::types::Alias>>,
/// <p>Describes an asynchronous connection, with a value of <code>link</code>.</p>
pub edge_type: ::std::option::Option<::std::string::String>,
/// <p>A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when <i>EdgeType</i> is <code>link</code>.</p>
pub received_event_age_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
}
impl Edge {
/// <p>Identifier of the edge. Unique within a service map.</p>
pub fn reference_id(&self) -> ::std::option::Option<i32> {
self.reference_id
}
/// <p>The start time of the first segment on the edge.</p>
pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
/// <p>The end time of the last segment on the edge.</p>
pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
/// <p>Response statistics for segments on the edge.</p>
pub fn summary_statistics(&self) -> ::std::option::Option<&crate::types::EdgeStatistics> {
self.summary_statistics.as_ref()
}
/// <p>A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.response_time_histogram.is_none()`.
pub fn response_time_histogram(&self) -> &[crate::types::HistogramEntry] {
self.response_time_histogram.as_deref().unwrap_or_default()
}
/// <p>Aliases for the edge.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aliases.is_none()`.
pub fn aliases(&self) -> &[crate::types::Alias] {
self.aliases.as_deref().unwrap_or_default()
}
/// <p>Describes an asynchronous connection, with a value of <code>link</code>.</p>
pub fn edge_type(&self) -> ::std::option::Option<&str> {
self.edge_type.as_deref()
}
/// <p>A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when <i>EdgeType</i> is <code>link</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.received_event_age_histogram.is_none()`.
pub fn received_event_age_histogram(&self) -> &[crate::types::HistogramEntry] {
self.received_event_age_histogram.as_deref().unwrap_or_default()
}
}
impl Edge {
/// Creates a new builder-style object to manufacture [`Edge`](crate::types::Edge).
pub fn builder() -> crate::types::builders::EdgeBuilder {
crate::types::builders::EdgeBuilder::default()
}
}
/// A builder for [`Edge`](crate::types::Edge).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EdgeBuilder {
pub(crate) reference_id: ::std::option::Option<i32>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) summary_statistics: ::std::option::Option<crate::types::EdgeStatistics>,
pub(crate) response_time_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
pub(crate) aliases: ::std::option::Option<::std::vec::Vec<crate::types::Alias>>,
pub(crate) edge_type: ::std::option::Option<::std::string::String>,
pub(crate) received_event_age_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
}
impl EdgeBuilder {
/// <p>Identifier of the edge. Unique within a service map.</p>
pub fn reference_id(mut self, input: i32) -> Self {
self.reference_id = ::std::option::Option::Some(input);
self
}
/// <p>Identifier of the edge. Unique within a service map.</p>
pub fn set_reference_id(mut self, input: ::std::option::Option<i32>) -> Self {
self.reference_id = input;
self
}
/// <p>Identifier of the edge. Unique within a service map.</p>
pub fn get_reference_id(&self) -> &::std::option::Option<i32> {
&self.reference_id
}
/// <p>The start time of the first segment on the edge.</p>
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
/// <p>The start time of the first segment on the edge.</p>
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
/// <p>The start time of the first segment on the edge.</p>
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
/// <p>The end time of the last segment on the edge.</p>
pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_time = ::std::option::Option::Some(input);
self
}
/// <p>The end time of the last segment on the edge.</p>
pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_time = input;
self
}
/// <p>The end time of the last segment on the edge.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
/// <p>Response statistics for segments on the edge.</p>
pub fn summary_statistics(mut self, input: crate::types::EdgeStatistics) -> Self {
self.summary_statistics = ::std::option::Option::Some(input);
self
}
/// <p>Response statistics for segments on the edge.</p>
pub fn set_summary_statistics(mut self, input: ::std::option::Option<crate::types::EdgeStatistics>) -> Self {
self.summary_statistics = input;
self
}
/// <p>Response statistics for segments on the edge.</p>
pub fn get_summary_statistics(&self) -> &::std::option::Option<crate::types::EdgeStatistics> {
&self.summary_statistics
}
/// Appends an item to `response_time_histogram`.
///
/// To override the contents of this collection use [`set_response_time_histogram`](Self::set_response_time_histogram).
///
/// <p>A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.</p>
pub fn response_time_histogram(mut self, input: crate::types::HistogramEntry) -> Self {
let mut v = self.response_time_histogram.unwrap_or_default();
v.push(input);
self.response_time_histogram = ::std::option::Option::Some(v);
self
}
/// <p>A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.</p>
pub fn set_response_time_histogram(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>) -> Self {
self.response_time_histogram = input;
self
}
/// <p>A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.</p>
pub fn get_response_time_histogram(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>> {
&self.response_time_histogram
}
/// Appends an item to `aliases`.
///
/// To override the contents of this collection use [`set_aliases`](Self::set_aliases).
///
/// <p>Aliases for the edge.</p>
pub fn aliases(mut self, input: crate::types::Alias) -> Self {
let mut v = self.aliases.unwrap_or_default();
v.push(input);
self.aliases = ::std::option::Option::Some(v);
self
}
/// <p>Aliases for the edge.</p>
pub fn set_aliases(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Alias>>) -> Self {
self.aliases = input;
self
}
/// <p>Aliases for the edge.</p>
pub fn get_aliases(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Alias>> {
&self.aliases
}
/// <p>Describes an asynchronous connection, with a value of <code>link</code>.</p>
pub fn edge_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.edge_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Describes an asynchronous connection, with a value of <code>link</code>.</p>
pub fn set_edge_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.edge_type = input;
self
}
/// <p>Describes an asynchronous connection, with a value of <code>link</code>.</p>
pub fn get_edge_type(&self) -> &::std::option::Option<::std::string::String> {
&self.edge_type
}
/// Appends an item to `received_event_age_histogram`.
///
/// To override the contents of this collection use [`set_received_event_age_histogram`](Self::set_received_event_age_histogram).
///
/// <p>A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when <i>EdgeType</i> is <code>link</code>.</p>
pub fn received_event_age_histogram(mut self, input: crate::types::HistogramEntry) -> Self {
let mut v = self.received_event_age_histogram.unwrap_or_default();
v.push(input);
self.received_event_age_histogram = ::std::option::Option::Some(v);
self
}
/// <p>A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when <i>EdgeType</i> is <code>link</code>.</p>
pub fn set_received_event_age_histogram(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>) -> Self {
self.received_event_age_histogram = input;
self
}
/// <p>A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when <i>EdgeType</i> is <code>link</code>.</p>
pub fn get_received_event_age_histogram(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>> {
&self.received_event_age_histogram
}
/// Consumes the builder and constructs a [`Edge`](crate::types::Edge).
pub fn build(self) -> crate::types::Edge {
crate::types::Edge {
reference_id: self.reference_id,
start_time: self.start_time,
end_time: self.end_time,
summary_statistics: self.summary_statistics,
response_time_histogram: self.response_time_histogram,
aliases: self.aliases,
edge_type: self.edge_type,
received_event_age_histogram: self.received_event_age_histogram,
}
}
}