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
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>This structure contains information about one of your services that was discovered by Application Signals.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Service {
/// <p>This is a string-to-string map. It can include the following fields.</p>
/// <ul>
/// <li>
/// <p><code>Type</code> designates the type of object this is.</p></li>
/// <li>
/// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
/// <li>
/// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
/// </ul>
pub key_attributes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
/// <p>This structure contains one or more string-to-string maps that help identify this service. It can include <i>platform attributes</i>, <i>application attributes</i>, and <i>telemetry attributes</i>.</p>
/// <p>Platform attributes contain information the service's platform.</p>
/// <ul>
/// <li>
/// <p><code>PlatformType</code> defines the hosted-in platform.</p></li>
/// <li>
/// <p><code>EKS.Cluster</code> is the name of the Amazon EKS cluster.</p></li>
/// <li>
/// <p><code>K8s.Cluster</code> is the name of the self-hosted Kubernetes cluster.</p></li>
/// <li>
/// <p><code>K8s.Namespace</code> is the name of the Kubernetes namespace in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Workload</code> is the name of the Kubernetes workload in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Node</code> is the name of the Kubernetes node in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Pod</code> is the name of the Kubernetes pod in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>EC2.AutoScalingGroup</code> is the name of the Amazon EC2 Auto Scaling group.</p></li>
/// <li>
/// <p><code>EC2.InstanceId</code> is the ID of the Amazon EC2 instance.</p></li>
/// <li>
/// <p><code>Host</code> is the name of the host, for all platform types.</p></li>
/// </ul>
/// <p>Application attributes contain information about the application.</p>
/// <ul>
/// <li>
/// <p><code>AWS.Application</code> is the application's name in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// <li>
/// <p><code>AWS.Application.ARN</code> is the application's ARN in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// </ul>
/// <p>Telemetry attributes contain telemetry information.</p>
/// <ul>
/// <li>
/// <p><code>Telemetry.SDK</code> is the fingerprint of the OpenTelemetry SDK version for instrumented services.</p></li>
/// <li>
/// <p><code>Telemetry.Agent</code> is the fingerprint of the agent used to collect and send telemetry data.</p></li>
/// <li>
/// <p><code>Telemetry.Source</code> Specifies the point of application where the telemetry was collected or specifies what was used for the source of telemetry data.</p></li>
/// </ul>
pub attribute_maps: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
/// <p>An array of service groups that this service belongs to, based on the configured grouping attributes.</p>
pub service_groups: ::std::option::Option<::std::vec::Vec<crate::types::ServiceGroup>>,
/// <p>An array of structures that each contain information about one metric associated with this service.</p>
pub metric_references: ::std::vec::Vec<crate::types::MetricReference>,
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub log_group_references: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
}
impl Service {
/// <p>This is a string-to-string map. It can include the following fields.</p>
/// <ul>
/// <li>
/// <p><code>Type</code> designates the type of object this is.</p></li>
/// <li>
/// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
/// <li>
/// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
/// </ul>
pub fn key_attributes(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
&self.key_attributes
}
/// <p>This structure contains one or more string-to-string maps that help identify this service. It can include <i>platform attributes</i>, <i>application attributes</i>, and <i>telemetry attributes</i>.</p>
/// <p>Platform attributes contain information the service's platform.</p>
/// <ul>
/// <li>
/// <p><code>PlatformType</code> defines the hosted-in platform.</p></li>
/// <li>
/// <p><code>EKS.Cluster</code> is the name of the Amazon EKS cluster.</p></li>
/// <li>
/// <p><code>K8s.Cluster</code> is the name of the self-hosted Kubernetes cluster.</p></li>
/// <li>
/// <p><code>K8s.Namespace</code> is the name of the Kubernetes namespace in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Workload</code> is the name of the Kubernetes workload in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Node</code> is the name of the Kubernetes node in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Pod</code> is the name of the Kubernetes pod in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>EC2.AutoScalingGroup</code> is the name of the Amazon EC2 Auto Scaling group.</p></li>
/// <li>
/// <p><code>EC2.InstanceId</code> is the ID of the Amazon EC2 instance.</p></li>
/// <li>
/// <p><code>Host</code> is the name of the host, for all platform types.</p></li>
/// </ul>
/// <p>Application attributes contain information about the application.</p>
/// <ul>
/// <li>
/// <p><code>AWS.Application</code> is the application's name in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// <li>
/// <p><code>AWS.Application.ARN</code> is the application's ARN in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// </ul>
/// <p>Telemetry attributes contain telemetry information.</p>
/// <ul>
/// <li>
/// <p><code>Telemetry.SDK</code> is the fingerprint of the OpenTelemetry SDK version for instrumented services.</p></li>
/// <li>
/// <p><code>Telemetry.Agent</code> is the fingerprint of the agent used to collect and send telemetry data.</p></li>
/// <li>
/// <p><code>Telemetry.Source</code> Specifies the point of application where the telemetry was collected or specifies what was used for the source of telemetry data.</p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attribute_maps.is_none()`.
pub fn attribute_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
self.attribute_maps.as_deref().unwrap_or_default()
}
/// <p>An array of service groups that this service belongs to, based on the configured grouping attributes.</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 `.service_groups.is_none()`.
pub fn service_groups(&self) -> &[crate::types::ServiceGroup] {
self.service_groups.as_deref().unwrap_or_default()
}
/// <p>An array of structures that each contain information about one metric associated with this service.</p>
pub fn metric_references(&self) -> &[crate::types::MetricReference] {
use std::ops::Deref;
self.metric_references.deref()
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.log_group_references.is_none()`.
pub fn log_group_references(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
self.log_group_references.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) key_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) attribute_maps: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
pub(crate) service_groups: ::std::option::Option<::std::vec::Vec<crate::types::ServiceGroup>>,
pub(crate) metric_references: ::std::option::Option<::std::vec::Vec<crate::types::MetricReference>>,
pub(crate) log_group_references:
::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
}
impl ServiceBuilder {
/// Adds a key-value pair to `key_attributes`.
///
/// To override the contents of this collection use [`set_key_attributes`](Self::set_key_attributes).
///
/// <p>This is a string-to-string map. It can include the following fields.</p>
/// <ul>
/// <li>
/// <p><code>Type</code> designates the type of object this is.</p></li>
/// <li>
/// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
/// <li>
/// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
/// </ul>
pub fn key_attributes(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.key_attributes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.key_attributes = ::std::option::Option::Some(hash_map);
self
}
/// <p>This is a string-to-string map. It can include the following fields.</p>
/// <ul>
/// <li>
/// <p><code>Type</code> designates the type of object this is.</p></li>
/// <li>
/// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
/// <li>
/// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
/// </ul>
pub fn set_key_attributes(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.key_attributes = input;
self
}
/// <p>This is a string-to-string map. It can include the following fields.</p>
/// <ul>
/// <li>
/// <p><code>Type</code> designates the type of object this is.</p></li>
/// <li>
/// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
/// <li>
/// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
/// <li>
/// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
/// </ul>
pub fn get_key_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.key_attributes
}
/// Appends an item to `attribute_maps`.
///
/// To override the contents of this collection use [`set_attribute_maps`](Self::set_attribute_maps).
///
/// <p>This structure contains one or more string-to-string maps that help identify this service. It can include <i>platform attributes</i>, <i>application attributes</i>, and <i>telemetry attributes</i>.</p>
/// <p>Platform attributes contain information the service's platform.</p>
/// <ul>
/// <li>
/// <p><code>PlatformType</code> defines the hosted-in platform.</p></li>
/// <li>
/// <p><code>EKS.Cluster</code> is the name of the Amazon EKS cluster.</p></li>
/// <li>
/// <p><code>K8s.Cluster</code> is the name of the self-hosted Kubernetes cluster.</p></li>
/// <li>
/// <p><code>K8s.Namespace</code> is the name of the Kubernetes namespace in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Workload</code> is the name of the Kubernetes workload in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Node</code> is the name of the Kubernetes node in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Pod</code> is the name of the Kubernetes pod in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>EC2.AutoScalingGroup</code> is the name of the Amazon EC2 Auto Scaling group.</p></li>
/// <li>
/// <p><code>EC2.InstanceId</code> is the ID of the Amazon EC2 instance.</p></li>
/// <li>
/// <p><code>Host</code> is the name of the host, for all platform types.</p></li>
/// </ul>
/// <p>Application attributes contain information about the application.</p>
/// <ul>
/// <li>
/// <p><code>AWS.Application</code> is the application's name in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// <li>
/// <p><code>AWS.Application.ARN</code> is the application's ARN in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// </ul>
/// <p>Telemetry attributes contain telemetry information.</p>
/// <ul>
/// <li>
/// <p><code>Telemetry.SDK</code> is the fingerprint of the OpenTelemetry SDK version for instrumented services.</p></li>
/// <li>
/// <p><code>Telemetry.Agent</code> is the fingerprint of the agent used to collect and send telemetry data.</p></li>
/// <li>
/// <p><code>Telemetry.Source</code> Specifies the point of application where the telemetry was collected or specifies what was used for the source of telemetry data.</p></li>
/// </ul>
pub fn attribute_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut v = self.attribute_maps.unwrap_or_default();
v.push(input);
self.attribute_maps = ::std::option::Option::Some(v);
self
}
/// <p>This structure contains one or more string-to-string maps that help identify this service. It can include <i>platform attributes</i>, <i>application attributes</i>, and <i>telemetry attributes</i>.</p>
/// <p>Platform attributes contain information the service's platform.</p>
/// <ul>
/// <li>
/// <p><code>PlatformType</code> defines the hosted-in platform.</p></li>
/// <li>
/// <p><code>EKS.Cluster</code> is the name of the Amazon EKS cluster.</p></li>
/// <li>
/// <p><code>K8s.Cluster</code> is the name of the self-hosted Kubernetes cluster.</p></li>
/// <li>
/// <p><code>K8s.Namespace</code> is the name of the Kubernetes namespace in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Workload</code> is the name of the Kubernetes workload in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Node</code> is the name of the Kubernetes node in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Pod</code> is the name of the Kubernetes pod in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>EC2.AutoScalingGroup</code> is the name of the Amazon EC2 Auto Scaling group.</p></li>
/// <li>
/// <p><code>EC2.InstanceId</code> is the ID of the Amazon EC2 instance.</p></li>
/// <li>
/// <p><code>Host</code> is the name of the host, for all platform types.</p></li>
/// </ul>
/// <p>Application attributes contain information about the application.</p>
/// <ul>
/// <li>
/// <p><code>AWS.Application</code> is the application's name in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// <li>
/// <p><code>AWS.Application.ARN</code> is the application's ARN in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// </ul>
/// <p>Telemetry attributes contain telemetry information.</p>
/// <ul>
/// <li>
/// <p><code>Telemetry.SDK</code> is the fingerprint of the OpenTelemetry SDK version for instrumented services.</p></li>
/// <li>
/// <p><code>Telemetry.Agent</code> is the fingerprint of the agent used to collect and send telemetry data.</p></li>
/// <li>
/// <p><code>Telemetry.Source</code> Specifies the point of application where the telemetry was collected or specifies what was used for the source of telemetry data.</p></li>
/// </ul>
pub fn set_attribute_maps(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
) -> Self {
self.attribute_maps = input;
self
}
/// <p>This structure contains one or more string-to-string maps that help identify this service. It can include <i>platform attributes</i>, <i>application attributes</i>, and <i>telemetry attributes</i>.</p>
/// <p>Platform attributes contain information the service's platform.</p>
/// <ul>
/// <li>
/// <p><code>PlatformType</code> defines the hosted-in platform.</p></li>
/// <li>
/// <p><code>EKS.Cluster</code> is the name of the Amazon EKS cluster.</p></li>
/// <li>
/// <p><code>K8s.Cluster</code> is the name of the self-hosted Kubernetes cluster.</p></li>
/// <li>
/// <p><code>K8s.Namespace</code> is the name of the Kubernetes namespace in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Workload</code> is the name of the Kubernetes workload in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Node</code> is the name of the Kubernetes node in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>K8s.Pod</code> is the name of the Kubernetes pod in either Amazon EKS or Kubernetes clusters.</p></li>
/// <li>
/// <p><code>EC2.AutoScalingGroup</code> is the name of the Amazon EC2 Auto Scaling group.</p></li>
/// <li>
/// <p><code>EC2.InstanceId</code> is the ID of the Amazon EC2 instance.</p></li>
/// <li>
/// <p><code>Host</code> is the name of the host, for all platform types.</p></li>
/// </ul>
/// <p>Application attributes contain information about the application.</p>
/// <ul>
/// <li>
/// <p><code>AWS.Application</code> is the application's name in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// <li>
/// <p><code>AWS.Application.ARN</code> is the application's ARN in Amazon Web Services Service Catalog AppRegistry.</p></li>
/// </ul>
/// <p>Telemetry attributes contain telemetry information.</p>
/// <ul>
/// <li>
/// <p><code>Telemetry.SDK</code> is the fingerprint of the OpenTelemetry SDK version for instrumented services.</p></li>
/// <li>
/// <p><code>Telemetry.Agent</code> is the fingerprint of the agent used to collect and send telemetry data.</p></li>
/// <li>
/// <p><code>Telemetry.Source</code> Specifies the point of application where the telemetry was collected or specifies what was used for the source of telemetry data.</p></li>
/// </ul>
pub fn get_attribute_maps(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
&self.attribute_maps
}
/// Appends an item to `service_groups`.
///
/// To override the contents of this collection use [`set_service_groups`](Self::set_service_groups).
///
/// <p>An array of service groups that this service belongs to, based on the configured grouping attributes.</p>
pub fn service_groups(mut self, input: crate::types::ServiceGroup) -> Self {
let mut v = self.service_groups.unwrap_or_default();
v.push(input);
self.service_groups = ::std::option::Option::Some(v);
self
}
/// <p>An array of service groups that this service belongs to, based on the configured grouping attributes.</p>
pub fn set_service_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ServiceGroup>>) -> Self {
self.service_groups = input;
self
}
/// <p>An array of service groups that this service belongs to, based on the configured grouping attributes.</p>
pub fn get_service_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ServiceGroup>> {
&self.service_groups
}
/// Appends an item to `metric_references`.
///
/// To override the contents of this collection use [`set_metric_references`](Self::set_metric_references).
///
/// <p>An array of structures that each contain information about one metric associated with this service.</p>
pub fn metric_references(mut self, input: crate::types::MetricReference) -> Self {
let mut v = self.metric_references.unwrap_or_default();
v.push(input);
self.metric_references = ::std::option::Option::Some(v);
self
}
/// <p>An array of structures that each contain information about one metric associated with this service.</p>
pub fn set_metric_references(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetricReference>>) -> Self {
self.metric_references = input;
self
}
/// <p>An array of structures that each contain information about one metric associated with this service.</p>
pub fn get_metric_references(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetricReference>> {
&self.metric_references
}
/// Appends an item to `log_group_references`.
///
/// To override the contents of this collection use [`set_log_group_references`](Self::set_log_group_references).
///
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn log_group_references(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut v = self.log_group_references.unwrap_or_default();
v.push(input);
self.log_group_references = ::std::option::Option::Some(v);
self
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn set_log_group_references(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
) -> Self {
self.log_group_references = input;
self
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn get_log_group_references(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
&self.log_group_references
}
/// Consumes the builder and constructs a [`Service`](crate::types::Service).
/// This method will fail if any of the following fields are not set:
/// - [`key_attributes`](crate::types::builders::ServiceBuilder::key_attributes)
/// - [`metric_references`](crate::types::builders::ServiceBuilder::metric_references)
pub fn build(self) -> ::std::result::Result<crate::types::Service, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Service {
key_attributes: self.key_attributes.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"key_attributes",
"key_attributes was not specified but it is required when building Service",
)
})?,
attribute_maps: self.attribute_maps,
service_groups: self.service_groups,
metric_references: self.metric_references.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"metric_references",
"metric_references was not specified but it is required when building Service",
)
})?,
log_group_references: self.log_group_references,
})
}
}