aws-sdk-pi 1.100.0

AWS SDK for AWS Performance Insights
Documentation
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
502
503
504
505
506
507
508
509
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDimensionKeysInput {
    /// <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:</p>
    /// <ul>
    /// <li>
    /// <p><code>RDS</code></p></li>
    /// <li>
    /// <p><code>DOCDB</code></p></li>
    /// </ul>
    pub service_type: ::std::option::Option<crate::types::ServiceType>,
    /// <p>An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.</p>
    /// <p>To use an Amazon RDS instance as a data source, you specify its <code>DbiResourceId</code> value. For example, specify <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The date and time specifying the beginning of the requested time series data. You must specify a <code>StartTime</code> within the past 7 days. The value specified is <i>inclusive</i>, which means that data points equal to or greater than <code>StartTime</code> are returned.</p>
    /// <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time specifying the end of the requested time series data. The value specified is <i>exclusive</i>, which means that data points less than (but not equal to) <code>EndTime</code> are returned.</p>
    /// <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The name of a Performance Insights metric to be measured.</p>
    /// <p>Valid values for <code>Metric</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p></li>
    /// <li>
    /// <p><code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p></li>
    /// </ul>
    /// <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>
    pub metric: ::std::option::Option<::std::string::String>,
    /// <p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>1</code> (one second)</p></li>
    /// <li>
    /// <p><code>60</code> (one minute)</p></li>
    /// <li>
    /// <p><code>300</code> (five minutes)</p></li>
    /// <li>
    /// <p><code>3600</code> (one hour)</p></li>
    /// <li>
    /// <p><code>86400</code> (twenty-four hours)</p></li>
    /// </ul>
    /// <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.</p>
    pub period_in_seconds: ::std::option::Option<i32>,
    /// <p>A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.</p>
    pub group_by: ::std::option::Option<crate::types::DimensionGroup>,
    /// <p>Additional metrics for the top <code>N</code> dimension keys. If the specified dimension group in the <code>GroupBy</code> parameter is <code>db.sql_tokenized</code>, you can specify per-SQL metrics to get the values for the top <code>N</code> SQL digests. The response syntax is as follows: <code>"AdditionalMetrics" : { "<i>string</i>" : "<i>string</i>" }</code>.</p>
    /// <p>The only supported statistic function is <code>.avg</code>.</p>
    pub additional_metrics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>For each dimension specified in <code>GroupBy</code>, specify a secondary dimension to further subdivide the partition keys in the response.</p>
    pub partition_by: ::std::option::Option<crate::types::DimensionGroup>,
    /// <p>One or more filters to apply in the request. Restrictions:</p>
    /// <ul>
    /// <li>
    /// <p>Any number of filters by the same dimension, as specified in the <code>GroupBy</code> or <code>Partition</code> parameters.</p></li>
    /// <li>
    /// <p>A single filter for any other dimension in this dimension group.</p></li>
    /// </ul><note>
    /// <p>The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.</p>
    /// </note>
    pub filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeDimensionKeysInput {
    /// <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:</p>
    /// <ul>
    /// <li>
    /// <p><code>RDS</code></p></li>
    /// <li>
    /// <p><code>DOCDB</code></p></li>
    /// </ul>
    pub fn service_type(&self) -> ::std::option::Option<&crate::types::ServiceType> {
        self.service_type.as_ref()
    }
    /// <p>An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.</p>
    /// <p>To use an Amazon RDS instance as a data source, you specify its <code>DbiResourceId</code> value. For example, specify <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The date and time specifying the beginning of the requested time series data. You must specify a <code>StartTime</code> within the past 7 days. The value specified is <i>inclusive</i>, which means that data points equal to or greater than <code>StartTime</code> are returned.</p>
    /// <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The date and time specifying the end of the requested time series data. The value specified is <i>exclusive</i>, which means that data points less than (but not equal to) <code>EndTime</code> are returned.</p>
    /// <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The name of a Performance Insights metric to be measured.</p>
    /// <p>Valid values for <code>Metric</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p></li>
    /// <li>
    /// <p><code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p></li>
    /// </ul>
    /// <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>
    pub fn metric(&self) -> ::std::option::Option<&str> {
        self.metric.as_deref()
    }
    /// <p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>1</code> (one second)</p></li>
    /// <li>
    /// <p><code>60</code> (one minute)</p></li>
    /// <li>
    /// <p><code>300</code> (five minutes)</p></li>
    /// <li>
    /// <p><code>3600</code> (one hour)</p></li>
    /// <li>
    /// <p><code>86400</code> (twenty-four hours)</p></li>
    /// </ul>
    /// <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.</p>
    pub fn period_in_seconds(&self) -> ::std::option::Option<i32> {
        self.period_in_seconds
    }
    /// <p>A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.</p>
    pub fn group_by(&self) -> ::std::option::Option<&crate::types::DimensionGroup> {
        self.group_by.as_ref()
    }
    /// <p>Additional metrics for the top <code>N</code> dimension keys. If the specified dimension group in the <code>GroupBy</code> parameter is <code>db.sql_tokenized</code>, you can specify per-SQL metrics to get the values for the top <code>N</code> SQL digests. The response syntax is as follows: <code>"AdditionalMetrics" : { "<i>string</i>" : "<i>string</i>" }</code>.</p>
    /// <p>The only supported statistic function is <code>.avg</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 `.additional_metrics.is_none()`.
    pub fn additional_metrics(&self) -> &[::std::string::String] {
        self.additional_metrics.as_deref().unwrap_or_default()
    }
    /// <p>For each dimension specified in <code>GroupBy</code>, specify a secondary dimension to further subdivide the partition keys in the response.</p>
    pub fn partition_by(&self) -> ::std::option::Option<&crate::types::DimensionGroup> {
        self.partition_by.as_ref()
    }
    /// <p>One or more filters to apply in the request. Restrictions:</p>
    /// <ul>
    /// <li>
    /// <p>Any number of filters by the same dimension, as specified in the <code>GroupBy</code> or <code>Partition</code> parameters.</p></li>
    /// <li>
    /// <p>A single filter for any other dimension in this dimension group.</p></li>
    /// </ul><note>
    /// <p>The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.</p>
    /// </note>
    pub fn filter(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.filter.as_ref()
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl DescribeDimensionKeysInput {
    /// Creates a new builder-style object to manufacture [`DescribeDimensionKeysInput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysInput).
    pub fn builder() -> crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysInputBuilder {
        crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysInputBuilder::default()
    }
}

/// A builder for [`DescribeDimensionKeysInput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDimensionKeysInputBuilder {
    pub(crate) service_type: ::std::option::Option<crate::types::ServiceType>,
    pub(crate) identifier: ::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) metric: ::std::option::Option<::std::string::String>,
    pub(crate) period_in_seconds: ::std::option::Option<i32>,
    pub(crate) group_by: ::std::option::Option<crate::types::DimensionGroup>,
    pub(crate) additional_metrics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) partition_by: ::std::option::Option<crate::types::DimensionGroup>,
    pub(crate) filter: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeDimensionKeysInputBuilder {
    /// <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:</p>
    /// <ul>
    /// <li>
    /// <p><code>RDS</code></p></li>
    /// <li>
    /// <p><code>DOCDB</code></p></li>
    /// </ul>
    /// This field is required.
    pub fn service_type(mut self, input: crate::types::ServiceType) -> Self {
        self.service_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:</p>
    /// <ul>
    /// <li>
    /// <p><code>RDS</code></p></li>
    /// <li>
    /// <p><code>DOCDB</code></p></li>
    /// </ul>
    pub fn set_service_type(mut self, input: ::std::option::Option<crate::types::ServiceType>) -> Self {
        self.service_type = input;
        self
    }
    /// <p>The Amazon Web Services service for which Performance Insights will return metrics. Valid values are as follows:</p>
    /// <ul>
    /// <li>
    /// <p><code>RDS</code></p></li>
    /// <li>
    /// <p><code>DOCDB</code></p></li>
    /// </ul>
    pub fn get_service_type(&self) -> &::std::option::Option<crate::types::ServiceType> {
        &self.service_type
    }
    /// <p>An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.</p>
    /// <p>To use an Amazon RDS instance as a data source, you specify its <code>DbiResourceId</code> value. For example, specify <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.</p>
    /// <p>To use an Amazon RDS instance as a data source, you specify its <code>DbiResourceId</code> value. For example, specify <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.</p>
    /// <p>To use an Amazon RDS instance as a data source, you specify its <code>DbiResourceId</code> value. For example, specify <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The date and time specifying the beginning of the requested time series data. You must specify a <code>StartTime</code> within the past 7 days. The value specified is <i>inclusive</i>, which means that data points equal to or greater than <code>StartTime</code> are returned.</p>
    /// <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p>
    /// This field is required.
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time specifying the beginning of the requested time series data. You must specify a <code>StartTime</code> within the past 7 days. The value specified is <i>inclusive</i>, which means that data points equal to or greater than <code>StartTime</code> are returned.</p>
    /// <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The date and time specifying the beginning of the requested time series data. You must specify a <code>StartTime</code> within the past 7 days. The value specified is <i>inclusive</i>, which means that data points equal to or greater than <code>StartTime</code> are returned.</p>
    /// <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The date and time specifying the end of the requested time series data. The value specified is <i>exclusive</i>, which means that data points less than (but not equal to) <code>EndTime</code> are returned.</p>
    /// <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p>
    /// This field is required.
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time specifying the end of the requested time series data. The value specified is <i>exclusive</i>, which means that data points less than (but not equal to) <code>EndTime</code> are returned.</p>
    /// <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The date and time specifying the end of the requested time series data. The value specified is <i>exclusive</i>, which means that data points less than (but not equal to) <code>EndTime</code> are returned.</p>
    /// <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>The name of a Performance Insights metric to be measured.</p>
    /// <p>Valid values for <code>Metric</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p></li>
    /// <li>
    /// <p><code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p></li>
    /// </ul>
    /// <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>
    /// This field is required.
    pub fn metric(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metric = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a Performance Insights metric to be measured.</p>
    /// <p>Valid values for <code>Metric</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p></li>
    /// <li>
    /// <p><code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p></li>
    /// </ul>
    /// <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>
    pub fn set_metric(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metric = input;
        self
    }
    /// <p>The name of a Performance Insights metric to be measured.</p>
    /// <p>Valid values for <code>Metric</code> are:</p>
    /// <ul>
    /// <li>
    /// <p><code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p></li>
    /// <li>
    /// <p><code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p></li>
    /// </ul>
    /// <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>
    pub fn get_metric(&self) -> &::std::option::Option<::std::string::String> {
        &self.metric
    }
    /// <p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>1</code> (one second)</p></li>
    /// <li>
    /// <p><code>60</code> (one minute)</p></li>
    /// <li>
    /// <p><code>300</code> (five minutes)</p></li>
    /// <li>
    /// <p><code>3600</code> (one hour)</p></li>
    /// <li>
    /// <p><code>86400</code> (twenty-four hours)</p></li>
    /// </ul>
    /// <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.</p>
    pub fn period_in_seconds(mut self, input: i32) -> Self {
        self.period_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>1</code> (one second)</p></li>
    /// <li>
    /// <p><code>60</code> (one minute)</p></li>
    /// <li>
    /// <p><code>300</code> (five minutes)</p></li>
    /// <li>
    /// <p><code>3600</code> (one hour)</p></li>
    /// <li>
    /// <p><code>86400</code> (twenty-four hours)</p></li>
    /// </ul>
    /// <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.</p>
    pub fn set_period_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.period_in_seconds = input;
        self
    }
    /// <p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>1</code> (one second)</p></li>
    /// <li>
    /// <p><code>60</code> (one minute)</p></li>
    /// <li>
    /// <p><code>300</code> (five minutes)</p></li>
    /// <li>
    /// <p><code>3600</code> (one hour)</p></li>
    /// <li>
    /// <p><code>86400</code> (twenty-four hours)</p></li>
    /// </ul>
    /// <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights chooses a value for you, with a goal of returning roughly 100-200 data points in the response.</p>
    pub fn get_period_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.period_in_seconds
    }
    /// <p>A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.</p>
    /// This field is required.
    pub fn group_by(mut self, input: crate::types::DimensionGroup) -> Self {
        self.group_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.</p>
    pub fn set_group_by(mut self, input: ::std::option::Option<crate::types::DimensionGroup>) -> Self {
        self.group_by = input;
        self
    }
    /// <p>A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights returns all dimensions within this group, unless you provide the names of specific dimensions within this group. You can also request that Performance Insights return a limited number of values for a dimension.</p>
    pub fn get_group_by(&self) -> &::std::option::Option<crate::types::DimensionGroup> {
        &self.group_by
    }
    /// Appends an item to `additional_metrics`.
    ///
    /// To override the contents of this collection use [`set_additional_metrics`](Self::set_additional_metrics).
    ///
    /// <p>Additional metrics for the top <code>N</code> dimension keys. If the specified dimension group in the <code>GroupBy</code> parameter is <code>db.sql_tokenized</code>, you can specify per-SQL metrics to get the values for the top <code>N</code> SQL digests. The response syntax is as follows: <code>"AdditionalMetrics" : { "<i>string</i>" : "<i>string</i>" }</code>.</p>
    /// <p>The only supported statistic function is <code>.avg</code>.</p>
    pub fn additional_metrics(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.additional_metrics.unwrap_or_default();
        v.push(input.into());
        self.additional_metrics = ::std::option::Option::Some(v);
        self
    }
    /// <p>Additional metrics for the top <code>N</code> dimension keys. If the specified dimension group in the <code>GroupBy</code> parameter is <code>db.sql_tokenized</code>, you can specify per-SQL metrics to get the values for the top <code>N</code> SQL digests. The response syntax is as follows: <code>"AdditionalMetrics" : { "<i>string</i>" : "<i>string</i>" }</code>.</p>
    /// <p>The only supported statistic function is <code>.avg</code>.</p>
    pub fn set_additional_metrics(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.additional_metrics = input;
        self
    }
    /// <p>Additional metrics for the top <code>N</code> dimension keys. If the specified dimension group in the <code>GroupBy</code> parameter is <code>db.sql_tokenized</code>, you can specify per-SQL metrics to get the values for the top <code>N</code> SQL digests. The response syntax is as follows: <code>"AdditionalMetrics" : { "<i>string</i>" : "<i>string</i>" }</code>.</p>
    /// <p>The only supported statistic function is <code>.avg</code>.</p>
    pub fn get_additional_metrics(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.additional_metrics
    }
    /// <p>For each dimension specified in <code>GroupBy</code>, specify a secondary dimension to further subdivide the partition keys in the response.</p>
    pub fn partition_by(mut self, input: crate::types::DimensionGroup) -> Self {
        self.partition_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>For each dimension specified in <code>GroupBy</code>, specify a secondary dimension to further subdivide the partition keys in the response.</p>
    pub fn set_partition_by(mut self, input: ::std::option::Option<crate::types::DimensionGroup>) -> Self {
        self.partition_by = input;
        self
    }
    /// <p>For each dimension specified in <code>GroupBy</code>, specify a secondary dimension to further subdivide the partition keys in the response.</p>
    pub fn get_partition_by(&self) -> &::std::option::Option<crate::types::DimensionGroup> {
        &self.partition_by
    }
    /// Adds a key-value pair to `filter`.
    ///
    /// To override the contents of this collection use [`set_filter`](Self::set_filter).
    ///
    /// <p>One or more filters to apply in the request. Restrictions:</p>
    /// <ul>
    /// <li>
    /// <p>Any number of filters by the same dimension, as specified in the <code>GroupBy</code> or <code>Partition</code> parameters.</p></li>
    /// <li>
    /// <p>A single filter for any other dimension in this dimension group.</p></li>
    /// </ul><note>
    /// <p>The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.</p>
    /// </note>
    pub fn filter(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.filter.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.filter = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>One or more filters to apply in the request. Restrictions:</p>
    /// <ul>
    /// <li>
    /// <p>Any number of filters by the same dimension, as specified in the <code>GroupBy</code> or <code>Partition</code> parameters.</p></li>
    /// <li>
    /// <p>A single filter for any other dimension in this dimension group.</p></li>
    /// </ul><note>
    /// <p>The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.</p>
    /// </note>
    pub fn set_filter(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.filter = input;
        self
    }
    /// <p>One or more filters to apply in the request. Restrictions:</p>
    /// <ul>
    /// <li>
    /// <p>Any number of filters by the same dimension, as specified in the <code>GroupBy</code> or <code>Partition</code> parameters.</p></li>
    /// <li>
    /// <p>A single filter for any other dimension in this dimension group.</p></li>
    /// </ul><note>
    /// <p>The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.</p>
    /// </note>
    pub fn get_filter(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.filter
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`DescribeDimensionKeysInput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_dimension_keys::DescribeDimensionKeysInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_dimension_keys::DescribeDimensionKeysInput {
            service_type: self.service_type,
            identifier: self.identifier,
            start_time: self.start_time,
            end_time: self.end_time,
            metric: self.metric,
            period_in_seconds: self.period_in_seconds,
            group_by: self.group_by,
            additional_metrics: self.additional_metrics,
            partition_by: self.partition_by,
            filter: self.filter,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}