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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Service {
/// <p>Identifier for the service. Unique within the service map.</p>
pub reference_id: ::std::option::Option<i32>,
/// <p>The canonical name of the service.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>A list of names for the service, including the canonical name.</p>
pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Indicates that the service was the first service to process a request.</p>
pub root: ::std::option::Option<bool>,
/// <p>Identifier of the Amazon Web Services account in which the service runs.</p>
pub account_id: ::std::option::Option<::std::string::String>,
/// <p>The type of service.</p>
/// <ul>
/// <li>
/// <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p></li>
/// <li>
/// <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p></li>
/// <li>
/// <p><code>client</code> - Represents the clients that sent requests to a root service.</p></li>
/// <li>
/// <p><code>remote</code> - A downstream service of indeterminate type.</p></li>
/// </ul>
pub r#type: ::std::option::Option<::std::string::String>,
/// <p>The service's state.</p>
pub state: ::std::option::Option<::std::string::String>,
/// <p>The start time of the first segment that the service generated.</p>
pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The end time of the last segment that the service generated.</p>
pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Connections to downstream services.</p>
pub edges: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>,
/// <p>Aggregated statistics for the service.</p>
pub summary_statistics: ::std::option::Option<crate::types::ServiceStatistics>,
/// <p>A histogram that maps the spread of service durations.</p>
pub duration_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
/// <p>A histogram that maps the spread of service response times.</p>
pub response_time_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
}
impl Service {
/// <p>Identifier for the service. Unique within the service map.</p>
pub fn reference_id(&self) -> ::std::option::Option<i32> {
self.reference_id
}
/// <p>The canonical name of the service.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>A list of names for the service, including the canonical name.</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 `.names.is_none()`.
pub fn names(&self) -> &[::std::string::String] {
self.names.as_deref().unwrap_or_default()
}
/// <p>Indicates that the service was the first service to process a request.</p>
pub fn root(&self) -> ::std::option::Option<bool> {
self.root
}
/// <p>Identifier of the Amazon Web Services account in which the service runs.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>The type of service.</p>
/// <ul>
/// <li>
/// <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p></li>
/// <li>
/// <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p></li>
/// <li>
/// <p><code>client</code> - Represents the clients that sent requests to a root service.</p></li>
/// <li>
/// <p><code>remote</code> - A downstream service of indeterminate type.</p></li>
/// </ul>
pub fn r#type(&self) -> ::std::option::Option<&str> {
self.r#type.as_deref()
}
/// <p>The service's state.</p>
pub fn state(&self) -> ::std::option::Option<&str> {
self.state.as_deref()
}
/// <p>The start time of the first segment that the service generated.</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 that the service generated.</p>
pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
/// <p>Connections to downstream services.</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 `.edges.is_none()`.
pub fn edges(&self) -> &[crate::types::Edge] {
self.edges.as_deref().unwrap_or_default()
}
/// <p>Aggregated statistics for the service.</p>
pub fn summary_statistics(&self) -> ::std::option::Option<&crate::types::ServiceStatistics> {
self.summary_statistics.as_ref()
}
/// <p>A histogram that maps the spread of service durations.</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 `.duration_histogram.is_none()`.
pub fn duration_histogram(&self) -> &[crate::types::HistogramEntry] {
self.duration_histogram.as_deref().unwrap_or_default()
}
/// <p>A histogram that maps the spread of service response times.</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()
}
}
impl Service {
/// Creates a new builder-style object to manufacture [`Service`](crate::types::Service).
pub fn builder() -> crate::types::builders::ServiceBuilder {
crate::types::builders::ServiceBuilder::default()
}
}
/// A builder for [`Service`](crate::types::Service).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ServiceBuilder {
pub(crate) reference_id: ::std::option::Option<i32>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) root: ::std::option::Option<bool>,
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<::std::string::String>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) edges: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>,
pub(crate) summary_statistics: ::std::option::Option<crate::types::ServiceStatistics>,
pub(crate) duration_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
pub(crate) response_time_histogram: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>,
}
impl ServiceBuilder {
/// <p>Identifier for the service. Unique within the service map.</p>
pub fn reference_id(mut self, input: i32) -> Self {
self.reference_id = ::std::option::Option::Some(input);
self
}
/// <p>Identifier for the service. Unique within the service map.</p>
pub fn set_reference_id(mut self, input: ::std::option::Option<i32>) -> Self {
self.reference_id = input;
self
}
/// <p>Identifier for the service. Unique within the service map.</p>
pub fn get_reference_id(&self) -> &::std::option::Option<i32> {
&self.reference_id
}
/// <p>The canonical name of the service.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The canonical name of the service.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The canonical name of the service.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// Appends an item to `names`.
///
/// To override the contents of this collection use [`set_names`](Self::set_names).
///
/// <p>A list of names for the service, including the canonical name.</p>
pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.names.unwrap_or_default();
v.push(input.into());
self.names = ::std::option::Option::Some(v);
self
}
/// <p>A list of names for the service, including the canonical name.</p>
pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.names = input;
self
}
/// <p>A list of names for the service, including the canonical name.</p>
pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.names
}
/// <p>Indicates that the service was the first service to process a request.</p>
pub fn root(mut self, input: bool) -> Self {
self.root = ::std::option::Option::Some(input);
self
}
/// <p>Indicates that the service was the first service to process a request.</p>
pub fn set_root(mut self, input: ::std::option::Option<bool>) -> Self {
self.root = input;
self
}
/// <p>Indicates that the service was the first service to process a request.</p>
pub fn get_root(&self) -> &::std::option::Option<bool> {
&self.root
}
/// <p>Identifier of the Amazon Web Services account in which the service runs.</p>
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Identifier of the Amazon Web Services account in which the service runs.</p>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>Identifier of the Amazon Web Services account in which the service runs.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// <p>The type of service.</p>
/// <ul>
/// <li>
/// <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p></li>
/// <li>
/// <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p></li>
/// <li>
/// <p><code>client</code> - Represents the clients that sent requests to a root service.</p></li>
/// <li>
/// <p><code>remote</code> - A downstream service of indeterminate type.</p></li>
/// </ul>
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of service.</p>
/// <ul>
/// <li>
/// <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p></li>
/// <li>
/// <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p></li>
/// <li>
/// <p><code>client</code> - Represents the clients that sent requests to a root service.</p></li>
/// <li>
/// <p><code>remote</code> - A downstream service of indeterminate type.</p></li>
/// </ul>
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
/// <p>The type of service.</p>
/// <ul>
/// <li>
/// <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p></li>
/// <li>
/// <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p></li>
/// <li>
/// <p><code>client</code> - Represents the clients that sent requests to a root service.</p></li>
/// <li>
/// <p><code>remote</code> - A downstream service of indeterminate type.</p></li>
/// </ul>
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
/// <p>The service's state.</p>
pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.state = ::std::option::Option::Some(input.into());
self
}
/// <p>The service's state.</p>
pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.state = input;
self
}
/// <p>The service's state.</p>
pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
&self.state
}
/// <p>The start time of the first segment that the service generated.</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 that the service generated.</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 that the service generated.</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 that the service generated.</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 that the service generated.</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 that the service generated.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
/// Appends an item to `edges`.
///
/// To override the contents of this collection use [`set_edges`](Self::set_edges).
///
/// <p>Connections to downstream services.</p>
pub fn edges(mut self, input: crate::types::Edge) -> Self {
let mut v = self.edges.unwrap_or_default();
v.push(input);
self.edges = ::std::option::Option::Some(v);
self
}
/// <p>Connections to downstream services.</p>
pub fn set_edges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Edge>>) -> Self {
self.edges = input;
self
}
/// <p>Connections to downstream services.</p>
pub fn get_edges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Edge>> {
&self.edges
}
/// <p>Aggregated statistics for the service.</p>
pub fn summary_statistics(mut self, input: crate::types::ServiceStatistics) -> Self {
self.summary_statistics = ::std::option::Option::Some(input);
self
}
/// <p>Aggregated statistics for the service.</p>
pub fn set_summary_statistics(mut self, input: ::std::option::Option<crate::types::ServiceStatistics>) -> Self {
self.summary_statistics = input;
self
}
/// <p>Aggregated statistics for the service.</p>
pub fn get_summary_statistics(&self) -> &::std::option::Option<crate::types::ServiceStatistics> {
&self.summary_statistics
}
/// Appends an item to `duration_histogram`.
///
/// To override the contents of this collection use [`set_duration_histogram`](Self::set_duration_histogram).
///
/// <p>A histogram that maps the spread of service durations.</p>
pub fn duration_histogram(mut self, input: crate::types::HistogramEntry) -> Self {
let mut v = self.duration_histogram.unwrap_or_default();
v.push(input);
self.duration_histogram = ::std::option::Option::Some(v);
self
}
/// <p>A histogram that maps the spread of service durations.</p>
pub fn set_duration_histogram(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>>) -> Self {
self.duration_histogram = input;
self
}
/// <p>A histogram that maps the spread of service durations.</p>
pub fn get_duration_histogram(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>> {
&self.duration_histogram
}
/// 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 service response times.</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 service response times.</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 service response times.</p>
pub fn get_response_time_histogram(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HistogramEntry>> {
&self.response_time_histogram
}
/// Consumes the builder and constructs a [`Service`](crate::types::Service).
pub fn build(self) -> crate::types::Service {
crate::types::Service {
reference_id: self.reference_id,
name: self.name,
names: self.names,
root: self.root,
account_id: self.account_id,
r#type: self.r#type,
state: self.state,
start_time: self.start_time,
end_time: self.end_time,
edges: self.edges,
summary_statistics: self.summary_statistics,
duration_histogram: self.duration_histogram,
response_time_histogram: self.response_time_histogram,
}
}
}