File: api.go

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.44.133-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 245,296 kB
  • sloc: makefile: 120
file content (3015 lines) | stat: -rw-r--r-- 108,293 bytes parent folder | download
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
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package pi

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/private/protocol"
)

const opDescribeDimensionKeys = "DescribeDimensionKeys"

// DescribeDimensionKeysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDimensionKeys operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeDimensionKeys for more information on using the DescribeDimensionKeys
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DescribeDimensionKeysRequest method.
//	req, resp := client.DescribeDimensionKeysRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys
func (c *PI) DescribeDimensionKeysRequest(input *DescribeDimensionKeysInput) (req *request.Request, output *DescribeDimensionKeysOutput) {
	op := &request.Operation{
		Name:       opDescribeDimensionKeys,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &DescribeDimensionKeysInput{}
	}

	output = &DescribeDimensionKeysOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DescribeDimensionKeys API operation for AWS Performance Insights.
//
// For a specific time period, retrieve the top N dimension keys for a metric.
//
// Each response element returns a maximum of 500 bytes. For larger elements,
// such as SQL statements, only the first 500 bytes are returned.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation DescribeDimensionKeys for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys
func (c *PI) DescribeDimensionKeys(input *DescribeDimensionKeysInput) (*DescribeDimensionKeysOutput, error) {
	req, out := c.DescribeDimensionKeysRequest(input)
	return out, req.Send()
}

// DescribeDimensionKeysWithContext is the same as DescribeDimensionKeys with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeDimensionKeys for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) DescribeDimensionKeysWithContext(ctx aws.Context, input *DescribeDimensionKeysInput, opts ...request.Option) (*DescribeDimensionKeysOutput, error) {
	req, out := c.DescribeDimensionKeysRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// DescribeDimensionKeysPages iterates over the pages of a DescribeDimensionKeys operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeDimensionKeys method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a DescribeDimensionKeys operation.
//	pageNum := 0
//	err := client.DescribeDimensionKeysPages(params,
//	    func(page *pi.DescribeDimensionKeysOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *PI) DescribeDimensionKeysPages(input *DescribeDimensionKeysInput, fn func(*DescribeDimensionKeysOutput, bool) bool) error {
	return c.DescribeDimensionKeysPagesWithContext(aws.BackgroundContext(), input, fn)
}

// DescribeDimensionKeysPagesWithContext same as DescribeDimensionKeysPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) DescribeDimensionKeysPagesWithContext(ctx aws.Context, input *DescribeDimensionKeysInput, fn func(*DescribeDimensionKeysOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *DescribeDimensionKeysInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.DescribeDimensionKeysRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*DescribeDimensionKeysOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opGetDimensionKeyDetails = "GetDimensionKeyDetails"

// GetDimensionKeyDetailsRequest generates a "aws/request.Request" representing the
// client's request for the GetDimensionKeyDetails operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDimensionKeyDetails for more information on using the GetDimensionKeyDetails
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetDimensionKeyDetailsRequest method.
//	req, resp := client.GetDimensionKeyDetailsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails
func (c *PI) GetDimensionKeyDetailsRequest(input *GetDimensionKeyDetailsInput) (req *request.Request, output *GetDimensionKeyDetailsOutput) {
	op := &request.Operation{
		Name:       opGetDimensionKeyDetails,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetDimensionKeyDetailsInput{}
	}

	output = &GetDimensionKeyDetailsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetDimensionKeyDetails API operation for AWS Performance Insights.
//
// Get the attributes of the specified dimension group for a DB instance or
// data source. For example, if you specify a SQL ID, GetDimensionKeyDetails
// retrieves the full text of the dimension db.sql.statement associated with
// this ID. This operation is useful because GetResourceMetrics and DescribeDimensionKeys
// don't support retrieval of large SQL statement text.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation GetDimensionKeyDetails for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails
func (c *PI) GetDimensionKeyDetails(input *GetDimensionKeyDetailsInput) (*GetDimensionKeyDetailsOutput, error) {
	req, out := c.GetDimensionKeyDetailsRequest(input)
	return out, req.Send()
}

// GetDimensionKeyDetailsWithContext is the same as GetDimensionKeyDetails with the addition of
// the ability to pass a context and additional request options.
//
// See GetDimensionKeyDetails for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) GetDimensionKeyDetailsWithContext(ctx aws.Context, input *GetDimensionKeyDetailsInput, opts ...request.Option) (*GetDimensionKeyDetailsOutput, error) {
	req, out := c.GetDimensionKeyDetailsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetResourceMetadata = "GetResourceMetadata"

// GetResourceMetadataRequest generates a "aws/request.Request" representing the
// client's request for the GetResourceMetadata operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetResourceMetadata for more information on using the GetResourceMetadata
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetResourceMetadataRequest method.
//	req, resp := client.GetResourceMetadataRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetadata
func (c *PI) GetResourceMetadataRequest(input *GetResourceMetadataInput) (req *request.Request, output *GetResourceMetadataOutput) {
	op := &request.Operation{
		Name:       opGetResourceMetadata,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetResourceMetadataInput{}
	}

	output = &GetResourceMetadataOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetResourceMetadata API operation for AWS Performance Insights.
//
// Retrieve the metadata for different features. For example, the metadata might
// indicate that a feature is turned on or off on a specific DB instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation GetResourceMetadata for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetadata
func (c *PI) GetResourceMetadata(input *GetResourceMetadataInput) (*GetResourceMetadataOutput, error) {
	req, out := c.GetResourceMetadataRequest(input)
	return out, req.Send()
}

// GetResourceMetadataWithContext is the same as GetResourceMetadata with the addition of
// the ability to pass a context and additional request options.
//
// See GetResourceMetadata for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) GetResourceMetadataWithContext(ctx aws.Context, input *GetResourceMetadataInput, opts ...request.Option) (*GetResourceMetadataOutput, error) {
	req, out := c.GetResourceMetadataRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetResourceMetrics = "GetResourceMetrics"

// GetResourceMetricsRequest generates a "aws/request.Request" representing the
// client's request for the GetResourceMetrics operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetResourceMetrics for more information on using the GetResourceMetrics
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetResourceMetricsRequest method.
//	req, resp := client.GetResourceMetricsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics
func (c *PI) GetResourceMetricsRequest(input *GetResourceMetricsInput) (req *request.Request, output *GetResourceMetricsOutput) {
	op := &request.Operation{
		Name:       opGetResourceMetrics,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &GetResourceMetricsInput{}
	}

	output = &GetResourceMetricsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetResourceMetrics API operation for AWS Performance Insights.
//
// Retrieve Performance Insights metrics for a set of data sources over a time
// period. You can provide specific dimension groups and dimensions, and provide
// aggregation and filtering criteria for each group.
//
// Each response element returns a maximum of 500 bytes. For larger elements,
// such as SQL statements, only the first 500 bytes are returned.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation GetResourceMetrics for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics
func (c *PI) GetResourceMetrics(input *GetResourceMetricsInput) (*GetResourceMetricsOutput, error) {
	req, out := c.GetResourceMetricsRequest(input)
	return out, req.Send()
}

// GetResourceMetricsWithContext is the same as GetResourceMetrics with the addition of
// the ability to pass a context and additional request options.
//
// See GetResourceMetrics for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) GetResourceMetricsWithContext(ctx aws.Context, input *GetResourceMetricsInput, opts ...request.Option) (*GetResourceMetricsOutput, error) {
	req, out := c.GetResourceMetricsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// GetResourceMetricsPages iterates over the pages of a GetResourceMetrics operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetResourceMetrics method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a GetResourceMetrics operation.
//	pageNum := 0
//	err := client.GetResourceMetricsPages(params,
//	    func(page *pi.GetResourceMetricsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *PI) GetResourceMetricsPages(input *GetResourceMetricsInput, fn func(*GetResourceMetricsOutput, bool) bool) error {
	return c.GetResourceMetricsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// GetResourceMetricsPagesWithContext same as GetResourceMetricsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) GetResourceMetricsPagesWithContext(ctx aws.Context, input *GetResourceMetricsInput, fn func(*GetResourceMetricsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *GetResourceMetricsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetResourceMetricsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*GetResourceMetricsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListAvailableResourceDimensions = "ListAvailableResourceDimensions"

// ListAvailableResourceDimensionsRequest generates a "aws/request.Request" representing the
// client's request for the ListAvailableResourceDimensions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAvailableResourceDimensions for more information on using the ListAvailableResourceDimensions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListAvailableResourceDimensionsRequest method.
//	req, resp := client.ListAvailableResourceDimensionsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/ListAvailableResourceDimensions
func (c *PI) ListAvailableResourceDimensionsRequest(input *ListAvailableResourceDimensionsInput) (req *request.Request, output *ListAvailableResourceDimensionsOutput) {
	op := &request.Operation{
		Name:       opListAvailableResourceDimensions,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListAvailableResourceDimensionsInput{}
	}

	output = &ListAvailableResourceDimensionsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListAvailableResourceDimensions API operation for AWS Performance Insights.
//
// Retrieve the dimensions that can be queried for each specified metric type
// on a specified DB instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation ListAvailableResourceDimensions for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/ListAvailableResourceDimensions
func (c *PI) ListAvailableResourceDimensions(input *ListAvailableResourceDimensionsInput) (*ListAvailableResourceDimensionsOutput, error) {
	req, out := c.ListAvailableResourceDimensionsRequest(input)
	return out, req.Send()
}

// ListAvailableResourceDimensionsWithContext is the same as ListAvailableResourceDimensions with the addition of
// the ability to pass a context and additional request options.
//
// See ListAvailableResourceDimensions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) ListAvailableResourceDimensionsWithContext(ctx aws.Context, input *ListAvailableResourceDimensionsInput, opts ...request.Option) (*ListAvailableResourceDimensionsOutput, error) {
	req, out := c.ListAvailableResourceDimensionsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListAvailableResourceDimensionsPages iterates over the pages of a ListAvailableResourceDimensions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAvailableResourceDimensions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListAvailableResourceDimensions operation.
//	pageNum := 0
//	err := client.ListAvailableResourceDimensionsPages(params,
//	    func(page *pi.ListAvailableResourceDimensionsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *PI) ListAvailableResourceDimensionsPages(input *ListAvailableResourceDimensionsInput, fn func(*ListAvailableResourceDimensionsOutput, bool) bool) error {
	return c.ListAvailableResourceDimensionsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListAvailableResourceDimensionsPagesWithContext same as ListAvailableResourceDimensionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) ListAvailableResourceDimensionsPagesWithContext(ctx aws.Context, input *ListAvailableResourceDimensionsInput, fn func(*ListAvailableResourceDimensionsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListAvailableResourceDimensionsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListAvailableResourceDimensionsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListAvailableResourceDimensionsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListAvailableResourceMetrics = "ListAvailableResourceMetrics"

// ListAvailableResourceMetricsRequest generates a "aws/request.Request" representing the
// client's request for the ListAvailableResourceMetrics operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAvailableResourceMetrics for more information on using the ListAvailableResourceMetrics
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListAvailableResourceMetricsRequest method.
//	req, resp := client.ListAvailableResourceMetricsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/ListAvailableResourceMetrics
func (c *PI) ListAvailableResourceMetricsRequest(input *ListAvailableResourceMetricsInput) (req *request.Request, output *ListAvailableResourceMetricsOutput) {
	op := &request.Operation{
		Name:       opListAvailableResourceMetrics,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListAvailableResourceMetricsInput{}
	}

	output = &ListAvailableResourceMetricsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListAvailableResourceMetrics API operation for AWS Performance Insights.
//
// Retrieve metrics of the specified types that can be queried for a specified
// DB instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Performance Insights's
// API operation ListAvailableResourceMetrics for usage and error information.
//
// Returned Error Types:
//
//   - InvalidArgumentException
//     One of the arguments provided is invalid for this request.
//
//   - InternalServiceError
//     The request failed due to an unknown error.
//
//   - NotAuthorizedException
//     The user is not authorized to perform this request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/ListAvailableResourceMetrics
func (c *PI) ListAvailableResourceMetrics(input *ListAvailableResourceMetricsInput) (*ListAvailableResourceMetricsOutput, error) {
	req, out := c.ListAvailableResourceMetricsRequest(input)
	return out, req.Send()
}

// ListAvailableResourceMetricsWithContext is the same as ListAvailableResourceMetrics with the addition of
// the ability to pass a context and additional request options.
//
// See ListAvailableResourceMetrics for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) ListAvailableResourceMetricsWithContext(ctx aws.Context, input *ListAvailableResourceMetricsInput, opts ...request.Option) (*ListAvailableResourceMetricsOutput, error) {
	req, out := c.ListAvailableResourceMetricsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListAvailableResourceMetricsPages iterates over the pages of a ListAvailableResourceMetrics operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListAvailableResourceMetrics method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListAvailableResourceMetrics operation.
//	pageNum := 0
//	err := client.ListAvailableResourceMetricsPages(params,
//	    func(page *pi.ListAvailableResourceMetricsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *PI) ListAvailableResourceMetricsPages(input *ListAvailableResourceMetricsInput, fn func(*ListAvailableResourceMetricsOutput, bool) bool) error {
	return c.ListAvailableResourceMetricsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListAvailableResourceMetricsPagesWithContext same as ListAvailableResourceMetricsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *PI) ListAvailableResourceMetricsPagesWithContext(ctx aws.Context, input *ListAvailableResourceMetricsInput, fn func(*ListAvailableResourceMetricsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListAvailableResourceMetricsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListAvailableResourceMetricsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListAvailableResourceMetricsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

// A timestamp, and a single numerical value, which together represent a measurement
// at a particular point in time.
type DataPoint struct {
	_ struct{} `type:"structure"`

	// The time, in epoch format, associated with a particular Value.
	//
	// Timestamp is a required field
	Timestamp *time.Time `type:"timestamp" required:"true"`

	// The actual value associated with a particular Timestamp.
	//
	// Value is a required field
	Value *float64 `type:"double" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DataPoint) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DataPoint) GoString() string {
	return s.String()
}

// SetTimestamp sets the Timestamp field's value.
func (s *DataPoint) SetTimestamp(v time.Time) *DataPoint {
	s.Timestamp = &v
	return s
}

// SetValue sets the Value field's value.
func (s *DataPoint) SetValue(v float64) *DataPoint {
	s.Value = &v
	return s
}

type DescribeDimensionKeysInput struct {
	_ struct{} `type:"structure"`

	// Additional metrics for the top N dimension keys. If the specified dimension
	// group in the GroupBy parameter is db.sql_tokenized, you can specify per-SQL
	// metrics to get the values for the top N SQL digests. The response syntax
	// is as follows: "AdditionalMetrics" : { "string" : "string" }.
	AdditionalMetrics []*string `min:"1" type:"list"`

	// The date and time specifying the end of the requested time series data. The
	// value specified is exclusive, which means that data points less than (but
	// not equal to) EndTime are returned.
	//
	// The value for EndTime must be later than the value for StartTime.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" required:"true"`

	// One or more filters to apply in the request. Restrictions:
	//
	//    * Any number of filters by the same dimension, as specified in the GroupBy
	//    or Partition parameters.
	//
	//    * A single filter for any other dimension in this dimension group.
	Filter map[string]*string `type:"map"`

	// 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.
	//
	// GroupBy is a required field
	GroupBy *DimensionGroup `type:"structure" required:"true"`

	// An immutable, Amazon Web Services Region-unique identifier for a data source.
	// Performance Insights gathers metrics from this data source.
	//
	// To use an Amazon RDS instance as a data source, you specify its DbiResourceId
	// value. For example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return in the response. If more items exist
	// than the specified MaxRecords value, a pagination token is included in the
	// response so that the remaining results can be retrieved.
	MaxResults *int64 `type:"integer"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - A scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - The raw number of active sessions for the database
	//    engine.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// For each dimension specified in GroupBy, specify a secondary dimension to
	// further subdivide the partition keys in the response.
	PartitionBy *DimensionGroup `type:"structure"`

	// 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:
	//
	//    * 1 (one second)
	//
	//    * 60 (one minute)
	//
	//    * 300 (five minutes)
	//
	//    * 3600 (one hour)
	//
	//    * 86400 (twenty-four hours)
	//
	// If you don't specify PeriodInSeconds, then Performance Insights chooses a
	// value for you, with a goal of returning roughly 100-200 data points in the
	// response.
	PeriodInSeconds *int64 `type:"integer"`

	// The Amazon Web Services service for which Performance Insights will return
	// metrics. Valid values are as follows:
	//
	//    * RDS
	//
	//    * DOCDB
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`

	// The date and time specifying the beginning of the requested time series data.
	// You must specify a StartTime within the past 7 days. The value specified
	// is inclusive, which means that data points equal to or greater than StartTime
	// are returned.
	//
	// The value for StartTime must be earlier than the value for EndTime.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeDimensionKeysInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeDimensionKeysInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeDimensionKeysInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DescribeDimensionKeysInput"}
	if s.AdditionalMetrics != nil && len(s.AdditionalMetrics) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("AdditionalMetrics", 1))
	}
	if s.EndTime == nil {
		invalidParams.Add(request.NewErrParamRequired("EndTime"))
	}
	if s.GroupBy == nil {
		invalidParams.Add(request.NewErrParamRequired("GroupBy"))
	}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.Metric == nil {
		invalidParams.Add(request.NewErrParamRequired("Metric"))
	}
	if s.NextToken != nil && len(*s.NextToken) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}
	if s.StartTime == nil {
		invalidParams.Add(request.NewErrParamRequired("StartTime"))
	}
	if s.GroupBy != nil {
		if err := s.GroupBy.Validate(); err != nil {
			invalidParams.AddNested("GroupBy", err.(request.ErrInvalidParams))
		}
	}
	if s.PartitionBy != nil {
		if err := s.PartitionBy.Validate(); err != nil {
			invalidParams.AddNested("PartitionBy", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAdditionalMetrics sets the AdditionalMetrics field's value.
func (s *DescribeDimensionKeysInput) SetAdditionalMetrics(v []*string) *DescribeDimensionKeysInput {
	s.AdditionalMetrics = v
	return s
}

// SetEndTime sets the EndTime field's value.
func (s *DescribeDimensionKeysInput) SetEndTime(v time.Time) *DescribeDimensionKeysInput {
	s.EndTime = &v
	return s
}

// SetFilter sets the Filter field's value.
func (s *DescribeDimensionKeysInput) SetFilter(v map[string]*string) *DescribeDimensionKeysInput {
	s.Filter = v
	return s
}

// SetGroupBy sets the GroupBy field's value.
func (s *DescribeDimensionKeysInput) SetGroupBy(v *DimensionGroup) *DescribeDimensionKeysInput {
	s.GroupBy = v
	return s
}

// SetIdentifier sets the Identifier field's value.
func (s *DescribeDimensionKeysInput) SetIdentifier(v string) *DescribeDimensionKeysInput {
	s.Identifier = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *DescribeDimensionKeysInput) SetMaxResults(v int64) *DescribeDimensionKeysInput {
	s.MaxResults = &v
	return s
}

// SetMetric sets the Metric field's value.
func (s *DescribeDimensionKeysInput) SetMetric(v string) *DescribeDimensionKeysInput {
	s.Metric = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *DescribeDimensionKeysInput) SetNextToken(v string) *DescribeDimensionKeysInput {
	s.NextToken = &v
	return s
}

// SetPartitionBy sets the PartitionBy field's value.
func (s *DescribeDimensionKeysInput) SetPartitionBy(v *DimensionGroup) *DescribeDimensionKeysInput {
	s.PartitionBy = v
	return s
}

// SetPeriodInSeconds sets the PeriodInSeconds field's value.
func (s *DescribeDimensionKeysInput) SetPeriodInSeconds(v int64) *DescribeDimensionKeysInput {
	s.PeriodInSeconds = &v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *DescribeDimensionKeysInput) SetServiceType(v string) *DescribeDimensionKeysInput {
	s.ServiceType = &v
	return s
}

// SetStartTime sets the StartTime field's value.
func (s *DescribeDimensionKeysInput) SetStartTime(v time.Time) *DescribeDimensionKeysInput {
	s.StartTime = &v
	return s
}

type DescribeDimensionKeysOutput struct {
	_ struct{} `type:"structure"`

	// The end time for the returned dimension keys, after alignment to a granular
	// boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater
	// than or equal to the value of the user-specified Endtime.
	AlignedEndTime *time.Time `type:"timestamp"`

	// The start time for the returned dimension keys, after alignment to a granular
	// boundary (as specified by PeriodInSeconds). AlignedStartTime will be less
	// than or equal to the value of the user-specified StartTime.
	AlignedStartTime *time.Time `type:"timestamp"`

	// The dimension keys that were requested.
	Keys []*DimensionKeyDescription `type:"list"`

	// A pagination token that indicates the response didn’t return all available
	// records because MaxRecords was specified in the previous request. To get
	// the remaining records, specify NextToken in a separate request with this
	// value.
	NextToken *string `min:"1" type:"string"`

	// If PartitionBy was present in the request, PartitionKeys contains the breakdown
	// of dimension keys by the specified partitions.
	PartitionKeys []*ResponsePartitionKey `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeDimensionKeysOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeDimensionKeysOutput) GoString() string {
	return s.String()
}

// SetAlignedEndTime sets the AlignedEndTime field's value.
func (s *DescribeDimensionKeysOutput) SetAlignedEndTime(v time.Time) *DescribeDimensionKeysOutput {
	s.AlignedEndTime = &v
	return s
}

// SetAlignedStartTime sets the AlignedStartTime field's value.
func (s *DescribeDimensionKeysOutput) SetAlignedStartTime(v time.Time) *DescribeDimensionKeysOutput {
	s.AlignedStartTime = &v
	return s
}

// SetKeys sets the Keys field's value.
func (s *DescribeDimensionKeysOutput) SetKeys(v []*DimensionKeyDescription) *DescribeDimensionKeysOutput {
	s.Keys = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *DescribeDimensionKeysOutput) SetNextToken(v string) *DescribeDimensionKeysOutput {
	s.NextToken = &v
	return s
}

// SetPartitionKeys sets the PartitionKeys field's value.
func (s *DescribeDimensionKeysOutput) SetPartitionKeys(v []*ResponsePartitionKey) *DescribeDimensionKeysOutput {
	s.PartitionKeys = v
	return s
}

// The information about a dimension.
type DimensionDetail struct {
	_ struct{} `type:"structure"`

	// The identifier of a dimension.
	Identifier *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionDetail) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionDetail) GoString() string {
	return s.String()
}

// SetIdentifier sets the Identifier field's value.
func (s *DimensionDetail) SetIdentifier(v string) *DimensionDetail {
	s.Identifier = &v
	return s
}

// A logical grouping of Performance Insights metrics for a related subject
// area. For example, the db.sql dimension group consists of the following dimensions:
//
//   - db.sql.id - The hash of a running SQL statement, generated by Performance
//     Insights.
//
//   - db.sql.db_id - Either the SQL ID generated by the database engine, or
//     a value generated by Performance Insights that begins with pi-.
//
//   - db.sql.statement - The full text of the SQL statement that is running,
//     for example, SELECT * FROM employees.
//
//   - db.sql_tokenized.id - The hash of the SQL digest generated by Performance
//     Insights.
//
// Each response element returns a maximum of 500 bytes. For larger elements,
// such as SQL statements, only the first 500 bytes are returned.
type DimensionGroup struct {
	_ struct{} `type:"structure"`

	// A list of specific dimensions from a dimension group. If this parameter is
	// not present, then it signifies that all of the dimensions in the group were
	// requested, or are present in the response.
	//
	// Valid values for elements in the Dimensions array are:
	//
	//    * db.application.name - The name of the application that is connected
	//    to the database. Valid values are as follows: Aurora PostgreSQL Amazon
	//    RDS PostgreSQL Amazon DocumentDB
	//
	//    * db.host.id - The host ID of the connected client (all engines).
	//
	//    * db.host.name - The host name of the connected client (all engines).
	//
	//    * db.name - The name of the database to which the client is connected.
	//    Valid values are as follows: Aurora PostgreSQL Amazon RDS PostgreSQL Aurora
	//    MySQL Amazon RDS MySQL Amazon RDS MariaDB Amazon DocumentDB
	//
	//    * db.query.id - The query ID generated by Performance Insights (only Amazon
	//    DocumentDB).
	//
	//    * db.query.db_id - The query ID generated by the database (only Amazon
	//    DocumentDB).
	//
	//    * db.query.statement - The text of the query that is being run (only Amazon
	//    DocumentDB).
	//
	//    * db.query.tokenized_id
	//
	//    * db.query.tokenized.id - The query digest ID generated by Performance
	//    Insights (only Amazon DocumentDB).
	//
	//    * db.query.tokenized.db_id - The query digest ID generated by Performance
	//    Insights (only Amazon DocumentDB).
	//
	//    * db.query.tokenized.statement - The text of the query digest (only Amazon
	//    DocumentDB).
	//
	//    * db.session_type.name - The type of the current session (only Amazon
	//    DocumentDB).
	//
	//    * db.sql.id - The hash of the full, non-tokenized SQL statement generated
	//    by Performance Insights (all engines except Amazon DocumentDB).
	//
	//    * db.sql.db_id - Either the SQL ID generated by the database engine, or
	//    a value generated by Performance Insights that begins with pi- (all engines
	//    except Amazon DocumentDB).
	//
	//    * db.sql.statement - The full text of the SQL statement that is running,
	//    as in SELECT * FROM employees (all engines except Amazon DocumentDB)
	//
	//    * db.sql.tokenized_id
	//
	//    * db.sql_tokenized.id - The hash of the SQL digest generated by Performance
	//    Insights (all engines except Amazon DocumentDB). In the console, db.sql_tokenized.id
	//    is called the Support ID because Amazon Web Services Support can look
	//    at this data to help you troubleshoot database issues.
	//
	//    * db.sql_tokenized.db_id - Either the native database ID used to refer
	//    to the SQL statement, or a synthetic ID such as pi-2372568224 that Performance
	//    Insights generates if the native database ID isn't available (all engines
	//    except Amazon DocumentDB).
	//
	//    * db.sql_tokenized.statement - The text of the SQL digest, as in SELECT
	//    * FROM employees WHERE employee_id = ? (all engines except Amazon DocumentDB)
	//
	//    * db.user.id - The ID of the user logged in to the database (all engines
	//    except Amazon DocumentDB).
	//
	//    * db.user.name - The name of the user logged in to the database (all engines
	//    except Amazon DocumentDB).
	//
	//    * db.wait_event.name - The event for which the backend is waiting (all
	//    engines except Amazon DocumentDB).
	//
	//    * db.wait_event.type - The type of event for which the backend is waiting
	//    (all engines except Amazon DocumentDB).
	//
	//    * db.wait_event_type.name - The name of the event type for which the backend
	//    is waiting (all engines except Amazon DocumentDB).
	//
	//    * db.wait_state.name - The event for which the backend is waiting (only
	//    Amazon DocumentDB).
	Dimensions []*string `min:"1" type:"list"`

	// The name of the dimension group. Valid values are as follows:
	//
	//    * db - The name of the database to which the client is connected. The
	//    following values are permitted: Aurora PostgreSQL Amazon RDS PostgreSQL
	//    Aurora MySQL Amazon RDS MySQL Amazon RDS MariaDB Amazon DocumentDB
	//
	//    * db.application - The name of the application that is connected to the
	//    database. The following values are permitted: Aurora PostgreSQL Amazon
	//    RDS PostgreSQL Amazon DocumentDB
	//
	//    * db.host - The host name of the connected client (all engines).
	//
	//    * db.query - The query that is currently running (only Amazon DocumentDB).
	//
	//    * db.query_tokenized - The digest query (only Amazon DocumentDB).
	//
	//    * db.session_type - The type of the current session (only Aurora PostgreSQL
	//    and RDS PostgreSQL).
	//
	//    * db.sql - The text of the SQL statement that is currently running (all
	//    engines except Amazon DocumentDB).
	//
	//    * db.sql_tokenized - The SQL digest (all engines except Amazon DocumentDB).
	//
	//    * db.user - The user logged in to the database (all engines except Amazon
	//    DocumentDB).
	//
	//    * db.wait_event - The event for which the database backend is waiting
	//    (all engines except Amazon DocumentDB).
	//
	//    * db.wait_event_type - The type of event for which the database backend
	//    is waiting (all engines except Amazon DocumentDB).
	//
	//    * db.wait_state - The event for which the database backend is waiting
	//    (only Amazon DocumentDB).
	//
	// Group is a required field
	Group *string `type:"string" required:"true"`

	// The maximum number of items to fetch for this dimension group.
	Limit *int64 `min:"1" type:"integer"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionGroup) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionGroup) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DimensionGroup) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DimensionGroup"}
	if s.Dimensions != nil && len(s.Dimensions) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Dimensions", 1))
	}
	if s.Group == nil {
		invalidParams.Add(request.NewErrParamRequired("Group"))
	}
	if s.Limit != nil && *s.Limit < 1 {
		invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDimensions sets the Dimensions field's value.
func (s *DimensionGroup) SetDimensions(v []*string) *DimensionGroup {
	s.Dimensions = v
	return s
}

// SetGroup sets the Group field's value.
func (s *DimensionGroup) SetGroup(v string) *DimensionGroup {
	s.Group = &v
	return s
}

// SetLimit sets the Limit field's value.
func (s *DimensionGroup) SetLimit(v int64) *DimensionGroup {
	s.Limit = &v
	return s
}

// Information about dimensions within a dimension group.
type DimensionGroupDetail struct {
	_ struct{} `type:"structure"`

	// The dimensions within a dimension group.
	Dimensions []*DimensionDetail `type:"list"`

	// The name of the dimension group.
	Group *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionGroupDetail) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionGroupDetail) GoString() string {
	return s.String()
}

// SetDimensions sets the Dimensions field's value.
func (s *DimensionGroupDetail) SetDimensions(v []*DimensionDetail) *DimensionGroupDetail {
	s.Dimensions = v
	return s
}

// SetGroup sets the Group field's value.
func (s *DimensionGroupDetail) SetGroup(v string) *DimensionGroupDetail {
	s.Group = &v
	return s
}

// An object that includes the requested dimension key values and aggregated
// metric values within a dimension group.
type DimensionKeyDescription struct {
	_ struct{} `type:"structure"`

	// A map that contains the value for each additional metric.
	AdditionalMetrics map[string]*float64 `type:"map"`

	// A map of name-value pairs for the dimensions in the group.
	Dimensions map[string]*string `type:"map"`

	// If PartitionBy was specified, PartitionKeys contains the dimensions that
	// were.
	Partitions []*float64 `type:"list"`

	// The aggregated metric value for the dimensions, over the requested time range.
	Total *float64 `type:"double"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionKeyDescription) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionKeyDescription) GoString() string {
	return s.String()
}

// SetAdditionalMetrics sets the AdditionalMetrics field's value.
func (s *DimensionKeyDescription) SetAdditionalMetrics(v map[string]*float64) *DimensionKeyDescription {
	s.AdditionalMetrics = v
	return s
}

// SetDimensions sets the Dimensions field's value.
func (s *DimensionKeyDescription) SetDimensions(v map[string]*string) *DimensionKeyDescription {
	s.Dimensions = v
	return s
}

// SetPartitions sets the Partitions field's value.
func (s *DimensionKeyDescription) SetPartitions(v []*float64) *DimensionKeyDescription {
	s.Partitions = v
	return s
}

// SetTotal sets the Total field's value.
func (s *DimensionKeyDescription) SetTotal(v float64) *DimensionKeyDescription {
	s.Total = &v
	return s
}

// An object that describes the details for a specified dimension.
type DimensionKeyDetail struct {
	_ struct{} `type:"structure"`

	// The full name of the dimension. The full name includes the group name and
	// key name. The following values are valid:
	//
	//    * db.query.statement (Amazon DocumentDB)
	//
	//    * db.sql.statement (Amazon RDS and Aurora)
	Dimension *string `type:"string"`

	// The status of the dimension detail data. Possible values include the following:
	//
	//    * AVAILABLE - The dimension detail data is ready to be retrieved.
	//
	//    * PROCESSING - The dimension detail data isn't ready to be retrieved because
	//    more processing time is required. If the requested detail data has the
	//    status PROCESSING, Performance Insights returns the truncated query.
	//
	//    * UNAVAILABLE - The dimension detail data could not be collected successfully.
	Status *string `type:"string" enum:"DetailStatus"`

	// The value of the dimension detail data. Depending on the return status, this
	// value is either the full or truncated SQL query for the following dimensions:
	//
	//    * db.query.statement (Amazon DocumentDB)
	//
	//    * db.sql.statement (Amazon RDS and Aurora)
	Value *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionKeyDetail) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DimensionKeyDetail) GoString() string {
	return s.String()
}

// SetDimension sets the Dimension field's value.
func (s *DimensionKeyDetail) SetDimension(v string) *DimensionKeyDetail {
	s.Dimension = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *DimensionKeyDetail) SetStatus(v string) *DimensionKeyDetail {
	s.Status = &v
	return s
}

// SetValue sets the Value field's value.
func (s *DimensionKeyDetail) SetValue(v string) *DimensionKeyDetail {
	s.Value = &v
	return s
}

// The metadata for a feature. For example, the metadata might indicate that
// a feature is turned on or off on a specific DB instance.
type FeatureMetadata struct {
	_ struct{} `type:"structure"`

	// The status of the feature on the DB instance. Possible values include the
	// following:
	//
	//    * ENABLED - The feature is enabled on the instance.
	//
	//    * DISABLED - The feature is disabled on the instance.
	//
	//    * UNSUPPORTED - The feature isn't supported on the instance.
	//
	//    * ENABLED_PENDING_REBOOT - The feature is enabled on the instance but
	//    requires a reboot to take effect.
	//
	//    * DISABLED_PENDING_REBOOT - The feature is disabled on the instance but
	//    requires a reboot to take effect.
	//
	//    * UNKNOWN - The feature status couldn't be determined.
	Status *string `type:"string" enum:"FeatureStatus"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s FeatureMetadata) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s FeatureMetadata) GoString() string {
	return s.String()
}

// SetStatus sets the Status field's value.
func (s *FeatureMetadata) SetStatus(v string) *FeatureMetadata {
	s.Status = &v
	return s
}

type GetDimensionKeyDetailsInput struct {
	_ struct{} `type:"structure"`

	// The name of the dimension group. Performance Insights searches the specified
	// group for the dimension group ID. The following group name values are valid:
	//
	//    * db.query (Amazon DocumentDB only)
	//
	//    * db.sql (Amazon RDS and Aurora only)
	//
	// Group is a required field
	Group *string `type:"string" required:"true"`

	// The ID of the dimension group from which to retrieve dimension details. For
	// dimension group db.sql, the group ID is db.sql.id. The following group ID
	// values are valid:
	//
	//    * db.sql.id for dimension group db.sql (Aurora and RDS only)
	//
	//    * db.query.id for dimension group db.query (DocumentDB only)
	//
	// GroupIdentifier is a required field
	GroupIdentifier *string `type:"string" required:"true"`

	// The ID for a data source from which to gather dimension data. This ID must
	// be immutable and unique within an Amazon Web Services Region. When a DB instance
	// is the data source, specify its DbiResourceId value. For example, specify
	// db-ABCDEFGHIJKLMNOPQRSTU1VW2X.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// A list of dimensions to retrieve the detail data for within the given dimension
	// group. If you don't specify this parameter, Performance Insights returns
	// all dimension data within the specified dimension group. Specify dimension
	// names for the following dimension groups:
	//
	//    * db.sql - Specify either the full dimension name db.sql.statement or
	//    the short dimension name statement (Aurora and RDS only).
	//
	//    * db.query - Specify either the full dimension name db.query.statement
	//    or the short dimension name statement (DocumentDB only).
	RequestedDimensions []*string `min:"1" type:"list"`

	// The Amazon Web Services service for which Performance Insights returns data.
	// The only valid value is RDS.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetDimensionKeyDetailsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetDimensionKeyDetailsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetDimensionKeyDetailsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetDimensionKeyDetailsInput"}
	if s.Group == nil {
		invalidParams.Add(request.NewErrParamRequired("Group"))
	}
	if s.GroupIdentifier == nil {
		invalidParams.Add(request.NewErrParamRequired("GroupIdentifier"))
	}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.RequestedDimensions != nil && len(s.RequestedDimensions) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("RequestedDimensions", 1))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetGroup sets the Group field's value.
func (s *GetDimensionKeyDetailsInput) SetGroup(v string) *GetDimensionKeyDetailsInput {
	s.Group = &v
	return s
}

// SetGroupIdentifier sets the GroupIdentifier field's value.
func (s *GetDimensionKeyDetailsInput) SetGroupIdentifier(v string) *GetDimensionKeyDetailsInput {
	s.GroupIdentifier = &v
	return s
}

// SetIdentifier sets the Identifier field's value.
func (s *GetDimensionKeyDetailsInput) SetIdentifier(v string) *GetDimensionKeyDetailsInput {
	s.Identifier = &v
	return s
}

// SetRequestedDimensions sets the RequestedDimensions field's value.
func (s *GetDimensionKeyDetailsInput) SetRequestedDimensions(v []*string) *GetDimensionKeyDetailsInput {
	s.RequestedDimensions = v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *GetDimensionKeyDetailsInput) SetServiceType(v string) *GetDimensionKeyDetailsInput {
	s.ServiceType = &v
	return s
}

type GetDimensionKeyDetailsOutput struct {
	_ struct{} `type:"structure"`

	// The details for the requested dimensions.
	Dimensions []*DimensionKeyDetail `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetDimensionKeyDetailsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetDimensionKeyDetailsOutput) GoString() string {
	return s.String()
}

// SetDimensions sets the Dimensions field's value.
func (s *GetDimensionKeyDetailsOutput) SetDimensions(v []*DimensionKeyDetail) *GetDimensionKeyDetailsOutput {
	s.Dimensions = v
	return s
}

type GetResourceMetadataInput struct {
	_ struct{} `type:"structure"`

	// An immutable identifier for a data source that is unique for an Amazon Web
	// Services Region. Performance Insights gathers metrics from this data source.
	// To use a DB instance as a data source, specify its DbiResourceId value. For
	// example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The Amazon Web Services service for which Performance Insights returns metrics.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetadataInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetadataInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetResourceMetadataInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetResourceMetadataInput"}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetIdentifier sets the Identifier field's value.
func (s *GetResourceMetadataInput) SetIdentifier(v string) *GetResourceMetadataInput {
	s.Identifier = &v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *GetResourceMetadataInput) SetServiceType(v string) *GetResourceMetadataInput {
	s.ServiceType = &v
	return s
}

type GetResourceMetadataOutput struct {
	_ struct{} `type:"structure"`

	// The metadata for different features. For example, the metadata might indicate
	// that a feature is turned on or off on a specific DB instance.
	Features map[string]*FeatureMetadata `type:"map"`

	// An immutable identifier for a data source that is unique for an Amazon Web
	// Services Region. Performance Insights gathers metrics from this data source.
	// To use a DB instance as a data source, specify its DbiResourceId value. For
	// example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.
	Identifier *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetadataOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetadataOutput) GoString() string {
	return s.String()
}

// SetFeatures sets the Features field's value.
func (s *GetResourceMetadataOutput) SetFeatures(v map[string]*FeatureMetadata) *GetResourceMetadataOutput {
	s.Features = v
	return s
}

// SetIdentifier sets the Identifier field's value.
func (s *GetResourceMetadataOutput) SetIdentifier(v string) *GetResourceMetadataOutput {
	s.Identifier = &v
	return s
}

type GetResourceMetricsInput struct {
	_ struct{} `type:"structure"`

	// The date and time specifying the end of the requested time series query range.
	// The value specified is exclusive. Thus, the command returns data points less
	// than (but not equal to) EndTime.
	//
	// The value for EndTime must be later than the value for StartTime.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" required:"true"`

	// An immutable identifier for a data source that is unique for an Amazon Web
	// Services Region. Performance Insights gathers metrics from this data source.
	// In the console, the identifier is shown as ResourceID. When you call DescribeDBInstances,
	// the identifier is returned as DbiResourceId.
	//
	// To use a DB instance as a data source, specify its DbiResourceId value. For
	// example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return in the response. If more items exist
	// than the specified MaxRecords value, a pagination token is included in the
	// response so that the remaining results can be retrieved.
	MaxResults *int64 `type:"integer"`

	// An array of one or more queries to perform. Each query must specify a Performance
	// Insights metric, and can optionally specify aggregation and filtering criteria.
	//
	// MetricQueries is a required field
	MetricQueries []*MetricQuery `min:"1" type:"list" required:"true"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// 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:
	//
	//    * 1 (one second)
	//
	//    * 60 (one minute)
	//
	//    * 300 (five minutes)
	//
	//    * 3600 (one hour)
	//
	//    * 86400 (twenty-four hours)
	//
	// If you don't specify PeriodInSeconds, then Performance Insights will choose
	// a value for you, with a goal of returning roughly 100-200 data points in
	// the response.
	PeriodInSeconds *int64 `type:"integer"`

	// The Amazon Web Services service for which Performance Insights returns metrics.
	// Valid values are as follows:
	//
	//    * RDS
	//
	//    * DOCDB
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`

	// The date and time specifying the beginning of the requested time series query
	// range. You can't specify a StartTime that is earlier than 7 days ago. By
	// default, Performance Insights has 7 days of retention, but you can extend
	// this range up to 2 years. The value specified is inclusive. Thus, the command
	// returns data points equal to or greater than StartTime.
	//
	// The value for StartTime must be earlier than the value for EndTime.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetricsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetricsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetResourceMetricsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetResourceMetricsInput"}
	if s.EndTime == nil {
		invalidParams.Add(request.NewErrParamRequired("EndTime"))
	}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.MetricQueries == nil {
		invalidParams.Add(request.NewErrParamRequired("MetricQueries"))
	}
	if s.MetricQueries != nil && len(s.MetricQueries) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("MetricQueries", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}
	if s.StartTime == nil {
		invalidParams.Add(request.NewErrParamRequired("StartTime"))
	}
	if s.MetricQueries != nil {
		for i, v := range s.MetricQueries {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricQueries", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEndTime sets the EndTime field's value.
func (s *GetResourceMetricsInput) SetEndTime(v time.Time) *GetResourceMetricsInput {
	s.EndTime = &v
	return s
}

// SetIdentifier sets the Identifier field's value.
func (s *GetResourceMetricsInput) SetIdentifier(v string) *GetResourceMetricsInput {
	s.Identifier = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *GetResourceMetricsInput) SetMaxResults(v int64) *GetResourceMetricsInput {
	s.MaxResults = &v
	return s
}

// SetMetricQueries sets the MetricQueries field's value.
func (s *GetResourceMetricsInput) SetMetricQueries(v []*MetricQuery) *GetResourceMetricsInput {
	s.MetricQueries = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *GetResourceMetricsInput) SetNextToken(v string) *GetResourceMetricsInput {
	s.NextToken = &v
	return s
}

// SetPeriodInSeconds sets the PeriodInSeconds field's value.
func (s *GetResourceMetricsInput) SetPeriodInSeconds(v int64) *GetResourceMetricsInput {
	s.PeriodInSeconds = &v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *GetResourceMetricsInput) SetServiceType(v string) *GetResourceMetricsInput {
	s.ServiceType = &v
	return s
}

// SetStartTime sets the StartTime field's value.
func (s *GetResourceMetricsInput) SetStartTime(v time.Time) *GetResourceMetricsInput {
	s.StartTime = &v
	return s
}

type GetResourceMetricsOutput struct {
	_ struct{} `type:"structure"`

	// The end time for the returned metrics, after alignment to a granular boundary
	// (as specified by PeriodInSeconds). AlignedEndTime will be greater than or
	// equal to the value of the user-specified Endtime.
	AlignedEndTime *time.Time `type:"timestamp"`

	// The start time for the returned metrics, after alignment to a granular boundary
	// (as specified by PeriodInSeconds). AlignedStartTime will be less than or
	// equal to the value of the user-specified StartTime.
	AlignedStartTime *time.Time `type:"timestamp"`

	// An immutable identifier for a data source that is unique for an Amazon Web
	// Services Region. Performance Insights gathers metrics from this data source.
	// In the console, the identifier is shown as ResourceID. When you call DescribeDBInstances,
	// the identifier is returned as DbiResourceId.
	Identifier *string `type:"string"`

	// An array of metric results, where each array element contains all of the
	// data points for a particular dimension.
	MetricList []*MetricKeyDataPoints `type:"list"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetricsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourceMetricsOutput) GoString() string {
	return s.String()
}

// SetAlignedEndTime sets the AlignedEndTime field's value.
func (s *GetResourceMetricsOutput) SetAlignedEndTime(v time.Time) *GetResourceMetricsOutput {
	s.AlignedEndTime = &v
	return s
}

// SetAlignedStartTime sets the AlignedStartTime field's value.
func (s *GetResourceMetricsOutput) SetAlignedStartTime(v time.Time) *GetResourceMetricsOutput {
	s.AlignedStartTime = &v
	return s
}

// SetIdentifier sets the Identifier field's value.
func (s *GetResourceMetricsOutput) SetIdentifier(v string) *GetResourceMetricsOutput {
	s.Identifier = &v
	return s
}

// SetMetricList sets the MetricList field's value.
func (s *GetResourceMetricsOutput) SetMetricList(v []*MetricKeyDataPoints) *GetResourceMetricsOutput {
	s.MetricList = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *GetResourceMetricsOutput) SetNextToken(v string) *GetResourceMetricsOutput {
	s.NextToken = &v
	return s
}

// The request failed due to an unknown error.
type InternalServiceError struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InternalServiceError) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InternalServiceError) GoString() string {
	return s.String()
}

func newErrorInternalServiceError(v protocol.ResponseMetadata) error {
	return &InternalServiceError{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InternalServiceError) Code() string {
	return "InternalServiceError"
}

// Message returns the exception's message.
func (s *InternalServiceError) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InternalServiceError) OrigErr() error {
	return nil
}

func (s *InternalServiceError) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InternalServiceError) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InternalServiceError) RequestID() string {
	return s.RespMetadata.RequestID
}

// One of the arguments provided is invalid for this request.
type InvalidArgumentException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidArgumentException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidArgumentException) GoString() string {
	return s.String()
}

func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error {
	return &InvalidArgumentException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidArgumentException) Code() string {
	return "InvalidArgumentException"
}

// Message returns the exception's message.
func (s *InvalidArgumentException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidArgumentException) OrigErr() error {
	return nil
}

func (s *InvalidArgumentException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidArgumentException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidArgumentException) RequestID() string {
	return s.RespMetadata.RequestID
}

type ListAvailableResourceDimensionsInput struct {
	_ struct{} `type:"structure"`

	// An immutable identifier for a data source that is unique within an Amazon
	// Web Services Region. Performance Insights gathers metrics from this data
	// source. To use an Amazon RDS DB instance as a data source, specify its DbiResourceId
	// value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return in the response. If more items exist
	// than the specified MaxRecords value, a pagination token is included in the
	// response so that the remaining results can be retrieved.
	MaxResults *int64 `type:"integer"`

	// The types of metrics for which to retrieve dimensions. Valid values include
	// db.load.
	//
	// Metrics is a required field
	Metrics []*string `min:"1" type:"list" required:"true"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// The Amazon Web Services service for which Performance Insights returns metrics.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceDimensionsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceDimensionsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListAvailableResourceDimensionsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListAvailableResourceDimensionsInput"}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.Metrics == nil {
		invalidParams.Add(request.NewErrParamRequired("Metrics"))
	}
	if s.Metrics != nil && len(s.Metrics) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Metrics", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetIdentifier sets the Identifier field's value.
func (s *ListAvailableResourceDimensionsInput) SetIdentifier(v string) *ListAvailableResourceDimensionsInput {
	s.Identifier = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListAvailableResourceDimensionsInput) SetMaxResults(v int64) *ListAvailableResourceDimensionsInput {
	s.MaxResults = &v
	return s
}

// SetMetrics sets the Metrics field's value.
func (s *ListAvailableResourceDimensionsInput) SetMetrics(v []*string) *ListAvailableResourceDimensionsInput {
	s.Metrics = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAvailableResourceDimensionsInput) SetNextToken(v string) *ListAvailableResourceDimensionsInput {
	s.NextToken = &v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *ListAvailableResourceDimensionsInput) SetServiceType(v string) *ListAvailableResourceDimensionsInput {
	s.ServiceType = &v
	return s
}

type ListAvailableResourceDimensionsOutput struct {
	_ struct{} `type:"structure"`

	// The dimension information returned for requested metric types.
	MetricDimensions []*MetricDimensionGroups `type:"list"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceDimensionsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceDimensionsOutput) GoString() string {
	return s.String()
}

// SetMetricDimensions sets the MetricDimensions field's value.
func (s *ListAvailableResourceDimensionsOutput) SetMetricDimensions(v []*MetricDimensionGroups) *ListAvailableResourceDimensionsOutput {
	s.MetricDimensions = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAvailableResourceDimensionsOutput) SetNextToken(v string) *ListAvailableResourceDimensionsOutput {
	s.NextToken = &v
	return s
}

type ListAvailableResourceMetricsInput struct {
	_ struct{} `type:"structure"`

	// An immutable identifier for a data source that is unique within an Amazon
	// Web Services Region. Performance Insights gathers metrics from this data
	// source. To use an Amazon RDS DB instance as a data source, specify its DbiResourceId
	// value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return. If the MaxRecords value is less than
	// the number of existing items, the response includes a pagination token.
	MaxResults *int64 `type:"integer"`

	// The types of metrics to return in the response. Valid values in the array
	// include the following:
	//
	//    * os (OS counter metrics) - All engines
	//
	//    * db (DB load metrics) - All engines except for Amazon DocumentDB
	//
	//    * db.sql.stats (per-SQL metrics) - All engines except for Amazon DocumentDB
	//
	//    * db.sql_tokenized.stats (per-SQL digest metrics) - All engines except
	//    for Amazon DocumentDB
	//
	// MetricTypes is a required field
	MetricTypes []*string `type:"list" required:"true"`

	// 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 MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// The Amazon Web Services service for which Performance Insights returns metrics.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceMetricsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceMetricsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListAvailableResourceMetricsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListAvailableResourceMetricsInput"}
	if s.Identifier == nil {
		invalidParams.Add(request.NewErrParamRequired("Identifier"))
	}
	if s.MetricTypes == nil {
		invalidParams.Add(request.NewErrParamRequired("MetricTypes"))
	}
	if s.NextToken != nil && len(*s.NextToken) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
	}
	if s.ServiceType == nil {
		invalidParams.Add(request.NewErrParamRequired("ServiceType"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetIdentifier sets the Identifier field's value.
func (s *ListAvailableResourceMetricsInput) SetIdentifier(v string) *ListAvailableResourceMetricsInput {
	s.Identifier = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListAvailableResourceMetricsInput) SetMaxResults(v int64) *ListAvailableResourceMetricsInput {
	s.MaxResults = &v
	return s
}

// SetMetricTypes sets the MetricTypes field's value.
func (s *ListAvailableResourceMetricsInput) SetMetricTypes(v []*string) *ListAvailableResourceMetricsInput {
	s.MetricTypes = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAvailableResourceMetricsInput) SetNextToken(v string) *ListAvailableResourceMetricsInput {
	s.NextToken = &v
	return s
}

// SetServiceType sets the ServiceType field's value.
func (s *ListAvailableResourceMetricsInput) SetServiceType(v string) *ListAvailableResourceMetricsInput {
	s.ServiceType = &v
	return s
}

type ListAvailableResourceMetricsOutput struct {
	_ struct{} `type:"structure"`

	// An array of metrics available to query. Each array element contains the full
	// name, description, and unit of the metric.
	Metrics []*ResponseResourceMetric `type:"list"`

	// A pagination token that indicates the response didn’t return all available
	// records because MaxRecords was specified in the previous request. To get
	// the remaining records, specify NextToken in a separate request with this
	// value.
	NextToken *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceMetricsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListAvailableResourceMetricsOutput) GoString() string {
	return s.String()
}

// SetMetrics sets the Metrics field's value.
func (s *ListAvailableResourceMetricsOutput) SetMetrics(v []*ResponseResourceMetric) *ListAvailableResourceMetricsOutput {
	s.Metrics = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListAvailableResourceMetricsOutput) SetNextToken(v string) *ListAvailableResourceMetricsOutput {
	s.NextToken = &v
	return s
}

// The available dimension information for a metric type.
type MetricDimensionGroups struct {
	_ struct{} `type:"structure"`

	// The available dimension groups for a metric type.
	Groups []*DimensionGroupDetail `type:"list"`

	// The metric type to which the dimension information belongs.
	Metric *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricDimensionGroups) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricDimensionGroups) GoString() string {
	return s.String()
}

// SetGroups sets the Groups field's value.
func (s *MetricDimensionGroups) SetGroups(v []*DimensionGroupDetail) *MetricDimensionGroups {
	s.Groups = v
	return s
}

// SetMetric sets the Metric field's value.
func (s *MetricDimensionGroups) SetMetric(v string) *MetricDimensionGroups {
	s.Metric = &v
	return s
}

// A time-ordered series of data points, corresponding to a dimension of a Performance
// Insights metric.
type MetricKeyDataPoints struct {
	_ struct{} `type:"structure"`

	// An array of timestamp-value pairs, representing measurements over a period
	// of time.
	DataPoints []*DataPoint `type:"list"`

	// The dimensions to which the data points apply.
	Key *ResponseResourceMetricKey `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricKeyDataPoints) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricKeyDataPoints) GoString() string {
	return s.String()
}

// SetDataPoints sets the DataPoints field's value.
func (s *MetricKeyDataPoints) SetDataPoints(v []*DataPoint) *MetricKeyDataPoints {
	s.DataPoints = v
	return s
}

// SetKey sets the Key field's value.
func (s *MetricKeyDataPoints) SetKey(v *ResponseResourceMetricKey) *MetricKeyDataPoints {
	s.Key = v
	return s
}

// A single query to be processed. You must provide the metric to query. If
// no other parameters are specified, Performance Insights returns all data
// points for the specified metric. Optionally, you can request that the data
// points be aggregated by dimension group (GroupBy), and return only those
// data points that match your criteria (Filter).
type MetricQuery struct {
	_ struct{} `type:"structure"`

	// One or more filters to apply in the request. Restrictions:
	//
	//    * Any number of filters by the same dimension, as specified in the GroupBy
	//    parameter.
	//
	//    * A single filter for any other dimension in this dimension group.
	Filter map[string]*string `type:"map"`

	// A specification for how to aggregate the data points from a query result.
	// You must specify a valid dimension group. Performance Insights will return
	// all of the dimensions within that group, unless you provide the names of
	// specific dimensions within that group. You can also request that Performance
	// Insights return a limited number of values for a dimension.
	GroupBy *DimensionGroup `type:"structure"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - A scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - The raw number of active sessions for the database
	//    engine.
	//
	//    * The counter metrics listed in Performance Insights operating system
	//    counters (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS)
	//    in the Amazon Aurora User Guide.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricQuery) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MetricQuery) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *MetricQuery) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "MetricQuery"}
	if s.Metric == nil {
		invalidParams.Add(request.NewErrParamRequired("Metric"))
	}
	if s.GroupBy != nil {
		if err := s.GroupBy.Validate(); err != nil {
			invalidParams.AddNested("GroupBy", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetFilter sets the Filter field's value.
func (s *MetricQuery) SetFilter(v map[string]*string) *MetricQuery {
	s.Filter = v
	return s
}

// SetGroupBy sets the GroupBy field's value.
func (s *MetricQuery) SetGroupBy(v *DimensionGroup) *MetricQuery {
	s.GroupBy = v
	return s
}

// SetMetric sets the Metric field's value.
func (s *MetricQuery) SetMetric(v string) *MetricQuery {
	s.Metric = &v
	return s
}

// The user is not authorized to perform this request.
type NotAuthorizedException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotAuthorizedException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotAuthorizedException) GoString() string {
	return s.String()
}

func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error {
	return &NotAuthorizedException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *NotAuthorizedException) Code() string {
	return "NotAuthorizedException"
}

// Message returns the exception's message.
func (s *NotAuthorizedException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NotAuthorizedException) OrigErr() error {
	return nil
}

func (s *NotAuthorizedException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *NotAuthorizedException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *NotAuthorizedException) RequestID() string {
	return s.RespMetadata.RequestID
}

// If PartitionBy was specified in a DescribeDimensionKeys request, the dimensions
// are returned in an array. Each element in the array specifies one dimension.
type ResponsePartitionKey struct {
	_ struct{} `type:"structure"`

	// A dimension map that contains the dimensions for this partition.
	//
	// Dimensions is a required field
	Dimensions map[string]*string `type:"map" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponsePartitionKey) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponsePartitionKey) GoString() string {
	return s.String()
}

// SetDimensions sets the Dimensions field's value.
func (s *ResponsePartitionKey) SetDimensions(v map[string]*string) *ResponsePartitionKey {
	s.Dimensions = v
	return s
}

// An object that contains the full name, description, and unit of a metric.
type ResponseResourceMetric struct {
	_ struct{} `type:"structure"`

	// The description of the metric.
	Description *string `min:"1" type:"string"`

	// The full name of the metric.
	Metric *string `type:"string"`

	// The unit of the metric.
	Unit *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponseResourceMetric) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponseResourceMetric) GoString() string {
	return s.String()
}

// SetDescription sets the Description field's value.
func (s *ResponseResourceMetric) SetDescription(v string) *ResponseResourceMetric {
	s.Description = &v
	return s
}

// SetMetric sets the Metric field's value.
func (s *ResponseResourceMetric) SetMetric(v string) *ResponseResourceMetric {
	s.Metric = &v
	return s
}

// SetUnit sets the Unit field's value.
func (s *ResponseResourceMetric) SetUnit(v string) *ResponseResourceMetric {
	s.Unit = &v
	return s
}

// An object describing a Performance Insights metric and one or more dimensions
// for that metric.
type ResponseResourceMetricKey struct {
	_ struct{} `type:"structure"`

	// The valid dimensions for the metric.
	Dimensions map[string]*string `type:"map"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - A scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - The raw number of active sessions for the database
	//    engine.
	//
	//    * The counter metrics listed in Performance Insights operating system
	//    counters (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS)
	//    in the Amazon Aurora User Guide.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponseResourceMetricKey) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResponseResourceMetricKey) GoString() string {
	return s.String()
}

// SetDimensions sets the Dimensions field's value.
func (s *ResponseResourceMetricKey) SetDimensions(v map[string]*string) *ResponseResourceMetricKey {
	s.Dimensions = v
	return s
}

// SetMetric sets the Metric field's value.
func (s *ResponseResourceMetricKey) SetMetric(v string) *ResponseResourceMetricKey {
	s.Metric = &v
	return s
}

const (
	// DetailStatusAvailable is a DetailStatus enum value
	DetailStatusAvailable = "AVAILABLE"

	// DetailStatusProcessing is a DetailStatus enum value
	DetailStatusProcessing = "PROCESSING"

	// DetailStatusUnavailable is a DetailStatus enum value
	DetailStatusUnavailable = "UNAVAILABLE"
)

// DetailStatus_Values returns all elements of the DetailStatus enum
func DetailStatus_Values() []string {
	return []string{
		DetailStatusAvailable,
		DetailStatusProcessing,
		DetailStatusUnavailable,
	}
}

const (
	// FeatureStatusEnabled is a FeatureStatus enum value
	FeatureStatusEnabled = "ENABLED"

	// FeatureStatusDisabled is a FeatureStatus enum value
	FeatureStatusDisabled = "DISABLED"

	// FeatureStatusUnsupported is a FeatureStatus enum value
	FeatureStatusUnsupported = "UNSUPPORTED"

	// FeatureStatusEnabledPendingReboot is a FeatureStatus enum value
	FeatureStatusEnabledPendingReboot = "ENABLED_PENDING_REBOOT"

	// FeatureStatusDisabledPendingReboot is a FeatureStatus enum value
	FeatureStatusDisabledPendingReboot = "DISABLED_PENDING_REBOOT"

	// FeatureStatusUnknown is a FeatureStatus enum value
	FeatureStatusUnknown = "UNKNOWN"
)

// FeatureStatus_Values returns all elements of the FeatureStatus enum
func FeatureStatus_Values() []string {
	return []string{
		FeatureStatusEnabled,
		FeatureStatusDisabled,
		FeatureStatusUnsupported,
		FeatureStatusEnabledPendingReboot,
		FeatureStatusDisabledPendingReboot,
		FeatureStatusUnknown,
	}
}

const (
	// ServiceTypeRds is a ServiceType enum value
	ServiceTypeRds = "RDS"

	// ServiceTypeDocdb is a ServiceType enum value
	ServiceTypeDocdb = "DOCDB"
)

// ServiceType_Values returns all elements of the ServiceType enum
func ServiceType_Values() []string {
	return []string{
		ServiceTypeRds,
		ServiceTypeDocdb,
	}
}