elastic-common-schema 1.10.0

Elastic Common Schema (ECS) for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
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
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
#![allow(unused)]

//!
//! # Elastic Common Schema
//!

/// ECS version this event conforms to. `ecs.version` is a required field and must exist in all events.
/// When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events.
///
/// # Examples
///
/// - `1.0.0`
pub const ECS_VERSION: &str = "ecs.version";

/// The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host.

/// Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken.
pub mod agent {

    /// Extended build information for the agent.
    /// This field is intended to contain any build information that a data source may provide, no specific formatting is required.
    ///
    /// # Examples
    ///
    /// - `metricbeat version 7.6.0 (amd64), libbeat 7.6.0 [6a23e8f8f30f5001ba344e4e54d8d9cb82cb107c built 2020-02-05 23:10:10 +0000 UTC]`
    pub const AGENT_BUILD_ORIGINAL: &str = "agent.build.original";

    /// Ephemeral identifier of this agent (if one exists).
    /// This id normally changes across restarts, but `agent.id` does not.
    ///
    /// # Examples
    ///
    /// - `8a4f500f`
    pub const AGENT_EPHEMERAL_ID: &str = "agent.ephemeral_id";

    /// Unique identifier of this agent (if one exists).
    /// Example: For Beats this would be beat.id.
    ///
    /// # Examples
    ///
    /// - `8a4f500d`
    pub const AGENT_ID: &str = "agent.id";

    /// Custom name of the agent.
    /// This is a name that can be given to an agent. This can be helpful if for example two Filebeat instances are running on the same host but a human readable separation is needed on which Filebeat instance data is coming from.
    /// If no name is given, the name is often left empty.
    ///
    /// # Examples
    ///
    /// - `foo`
    pub const AGENT_NAME: &str = "agent.name";

    /// Type of the agent.
    /// The agent type always stays the same and should be given by the agent used. In case of Filebeat the agent would always be Filebeat also if two Filebeat instances are run on the same machine.
    ///
    /// # Examples
    ///
    /// - `filebeat`
    pub const AGENT_TYPE: &str = "agent.type";

    /// Version of the agent.
    ///
    /// # Examples
    ///
    /// - `6.0.0-rc2`
    pub const AGENT_VERSION: &str = "agent.version";
}

/// An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain that presents a common, clearly defined routing policy to the internet.
pub mod as_ {

    /// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
    ///
    /// # Examples
    ///
    /// - `15169`
    pub const AS_NUMBER: &str = "as.number";

    /// Organization name.
    ///
    /// # Examples
    ///
    /// - `Google LLC`
    pub const AS_ORGANIZATION_NAME: &str = "as.organization.name";
}

/// The `base` field set contains all fields which are at the root of the events. These fields are common across all types of events.
pub mod base {

    /// Date/time when the event originated.
    /// This is the date/time extracted from the event, typically representing when the event was generated by the source.
    /// If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.
    /// Required field for all events.
    ///
    /// # Examples
    ///
    /// - `2016-05-23T08:05:34.853Z`
    pub const TIMESTAMP: &str = "@timestamp";

    /// Custom key/value pairs.
    /// Can be used to add meta information to events. Should not contain nested objects. All values are stored as keyword.
    /// Example: `docker` and `k8s` labels.
    ///
    /// # Examples
    ///
    /// - `{"application": "foo-bar", "env": "production"}`
    pub const LABELS: &str = "labels";

    /// For log events the message field contains the log message, optimized for viewing in a log viewer.
    /// For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event.
    /// If multiple messages exist, they can be combined into one message.
    ///
    /// # Examples
    ///
    /// - `Hello World`
    pub const MESSAGE: &str = "message";

    /// List of keywords used to tag each event.
    ///
    /// # Examples
    ///
    /// - `["production", "env2"]`
    pub const TAGS: &str = "tags";
}

/// A client is defined as the initiator of a network connection for events regarding sessions, connections, or bidirectional flow records.

/// For TCP events, the client is the initiator of the TCP connection that sends the SYN packet(s). For other protocols, the client is generally the initiator or requestor in the network transaction. Some systems use the term "originator" to refer the client in TCP connections. The client fields describe details about the system acting as the client in the network event. Client fields are usually populated in conjunction with server fields. Client fields are generally not populated for packet-level events.

/// Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
pub mod client {

    /// Some event client addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket.  You should always store the raw address in the `.address` field.
    /// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
    pub const CLIENT_ADDRESS: &str = "client.address";

    /// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
    ///
    /// # Examples
    ///
    /// - `15169`
    pub const CLIENT_AS_NUMBER: &str = "client.as.number";

    /// Organization name.
    ///
    /// # Examples
    ///
    /// - `Google LLC`
    pub const CLIENT_AS_ORGANIZATION_NAME: &str = "client.as.organization.name";

    /// Bytes sent from the client to the server.
    ///
    /// # Examples
    ///
    /// - `184`
    pub const CLIENT_BYTES: &str = "client.bytes";

    /// Client domain.
    pub const CLIENT_DOMAIN: &str = "client.domain";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const CLIENT_GEO_CITY_NAME: &str = "client.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const CLIENT_GEO_CONTINENT_CODE: &str = "client.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const CLIENT_GEO_CONTINENT_NAME: &str = "client.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const CLIENT_GEO_COUNTRY_ISO_CODE: &str = "client.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const CLIENT_GEO_COUNTRY_NAME: &str = "client.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const CLIENT_GEO_LOCATION: &str = "client.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const CLIENT_GEO_NAME: &str = "client.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const CLIENT_GEO_POSTAL_CODE: &str = "client.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const CLIENT_GEO_REGION_ISO_CODE: &str = "client.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const CLIENT_GEO_REGION_NAME: &str = "client.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const CLIENT_GEO_TIMEZONE: &str = "client.geo.timezone";

    /// IP address of the client (IPv4 or IPv6).
    pub const CLIENT_IP: &str = "client.ip";

    /// MAC address of the client.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `00-00-5E-00-53-23`
    pub const CLIENT_MAC: &str = "client.mac";

    /// Translated IP of source based NAT sessions (e.g. internal client to internet).
    /// Typically connections traversing load balancers, firewalls, or routers.
    pub const CLIENT_NAT_IP: &str = "client.nat.ip";

    /// Translated port of source based NAT sessions (e.g. internal client to internet).
    /// Typically connections traversing load balancers, firewalls, or routers.
    pub const CLIENT_NAT_PORT: &str = "client.nat.port";

    /// Packets sent from the client to the server.
    ///
    /// # Examples
    ///
    /// - `12`
    pub const CLIENT_PACKETS: &str = "client.packets";

    /// Port of the client.
    pub const CLIENT_PORT: &str = "client.port";

    /// The highest registered client domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const CLIENT_REGISTERED_DOMAIN: &str = "client.registered_domain";

    /// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.  In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
    /// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `east`
    pub const CLIENT_SUBDOMAIN: &str = "client.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const CLIENT_TOP_LEVEL_DOMAIN: &str = "client.top_level_domain";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const CLIENT_USER_DOMAIN: &str = "client.user.domain";

    /// User email address.
    pub const CLIENT_USER_EMAIL: &str = "client.user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const CLIENT_USER_FULL_NAME: &str = "client.user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const CLIENT_USER_GROUP_DOMAIN: &str = "client.user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const CLIENT_USER_GROUP_ID: &str = "client.user.group.id";

    /// Name of the group.
    pub const CLIENT_USER_GROUP_NAME: &str = "client.user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const CLIENT_USER_HASH: &str = "client.user.hash";

    /// Unique identifier of the user.
    pub const CLIENT_USER_ID: &str = "client.user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const CLIENT_USER_NAME: &str = "client.user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const CLIENT_USER_ROLES: &str = "client.user.roles";
}

/// Fields related to the cloud or infrastructure the events are coming from.
pub mod cloud {

    /// The cloud account or organization id used to identify different entities in a multi-tenant environment.
    /// Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.
    ///
    /// # Examples
    ///
    /// - `666777888999`
    pub const CLOUD_ACCOUNT_ID: &str = "cloud.account.id";

    /// The cloud account name or alias used to identify different entities in a multi-tenant environment.
    /// Examples: AWS account name, Google Cloud ORG display name.
    ///
    /// # Examples
    ///
    /// - `elastic-dev`
    pub const CLOUD_ACCOUNT_NAME: &str = "cloud.account.name";

    /// Availability zone in which this host is running.
    ///
    /// # Examples
    ///
    /// - `us-east-1c`
    pub const CLOUD_AVAILABILITY_ZONE: &str = "cloud.availability_zone";

    /// Instance ID of the host machine.
    ///
    /// # Examples
    ///
    /// - `i-1234567890abcdef0`
    pub const CLOUD_INSTANCE_ID: &str = "cloud.instance.id";

    /// Instance name of the host machine.
    pub const CLOUD_INSTANCE_NAME: &str = "cloud.instance.name";

    /// Machine type of the host machine.
    ///
    /// # Examples
    ///
    /// - `t2.medium`
    pub const CLOUD_MACHINE_TYPE: &str = "cloud.machine.type";

    /// The cloud project identifier.
    /// Examples: Google Cloud Project id, Azure Project id.
    ///
    /// # Examples
    ///
    /// - `my-project`
    pub const CLOUD_PROJECT_ID: &str = "cloud.project.id";

    /// The cloud project name.
    /// Examples: Google Cloud Project name, Azure Project name.
    ///
    /// # Examples
    ///
    /// - `my project`
    pub const CLOUD_PROJECT_NAME: &str = "cloud.project.name";

    /// Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
    ///
    /// # Examples
    ///
    /// - `aws`
    pub const CLOUD_PROVIDER: &str = "cloud.provider";

    /// Region in which this host is running.
    ///
    /// # Examples
    ///
    /// - `us-east-1`
    pub const CLOUD_REGION: &str = "cloud.region";

    /// The cloud service name is intended to distinguish services running on different platforms within a provider, eg AWS EC2 vs Lambda, GCP GCE vs App Engine, Azure VM vs App Server.
    /// Examples: app engine, app service, cloud run, fargate, lambda.
    ///
    /// # Examples
    ///
    /// - `lambda`
    pub const CLOUD_SERVICE_NAME: &str = "cloud.service.name";
}

/// These fields contain information about binary code signatures.
pub mod code_signature {

    /// Boolean to capture if a signature is present.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const CODE_SIGNATURE_EXISTS: &str = "code_signature.exists";

    /// The identifier used to sign the process.
    /// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `com.apple.xpc.proxy`
    pub const CODE_SIGNATURE_SIGNING_ID: &str = "code_signature.signing_id";

    /// Additional information about the certificate status.
    /// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `ERROR_UNTRUSTED_ROOT`
    pub const CODE_SIGNATURE_STATUS: &str = "code_signature.status";

    /// Subject name of the code signer
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const CODE_SIGNATURE_SUBJECT_NAME: &str = "code_signature.subject_name";

    /// The team identifier used to sign the process.
    /// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `EQHXZ8M8AV`
    pub const CODE_SIGNATURE_TEAM_ID: &str = "code_signature.team_id";

    /// Stores the trust status of the certificate chain.
    /// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const CODE_SIGNATURE_TRUSTED: &str = "code_signature.trusted";

    /// Boolean to capture if the digital signature is verified against the binary content.
    /// Leave unpopulated if a certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const CODE_SIGNATURE_VALID: &str = "code_signature.valid";
}

/// Container fields are used for meta information about the specific container that is the source of information.

/// These fields help correlate data based containers from any runtime.
pub mod container {

    /// Unique container id.
    pub const CONTAINER_ID: &str = "container.id";

    /// Name of the image the container was built on.
    pub const CONTAINER_IMAGE_NAME: &str = "container.image.name";

    /// Container image tags.
    pub const CONTAINER_IMAGE_TAG: &str = "container.image.tag";

    /// Image labels.
    pub const CONTAINER_LABELS: &str = "container.labels";

    /// Container name.
    pub const CONTAINER_NAME: &str = "container.name";

    /// Runtime managing this container.
    ///
    /// # Examples
    ///
    /// - `docker`
    pub const CONTAINER_RUNTIME: &str = "container.runtime";
}

/// The data_stream fields take part in defining the new data stream naming scheme.

/// In the new data stream naming scheme the value of the data stream fields combine to the name of the actual data stream in the following manner: `{data_stream.type}-{data_stream.dataset}-{data_stream.namespace}`. This means the fields can only contain characters that are valid as part of names of data streams. More details about this can be found in this https://www.elastic.co/blog/an-introduction-to-the-elastic-data-stream-naming-scheme[blog post].

/// An Elasticsearch data stream consists of one or more backing indices, and a data stream name forms part of the backing indices names. Due to this convention, data streams must also follow index naming restrictions. For example, data stream names cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`. Please see the Elasticsearch reference for additional https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params[restrictions].
pub mod data_stream {

    /// The field can contain anything that makes sense to signify the source of the data.
    /// Examples include `nginx.access`, `prometheus`, `endpoint` etc. For data streams that otherwise fit, but that do not have dataset set we use the value "generic" for the dataset value. `event.dataset` should have the same value as `data_stream.dataset`.
    /// Beyond the Elasticsearch data stream naming criteria noted above, the `dataset` value has additional restrictions:
    ///   * Must not contain `-`
    ///   * No longer than 100 characters
    ///
    /// # Examples
    ///
    /// - `nginx.access`
    pub const DATA_STREAM_DATASET: &str = "data_stream.dataset";

    /// A user defined namespace. Namespaces are useful to allow grouping of data.
    /// Many users already organize their indices this way, and the data stream naming scheme now provides this best practice as a default. Many users will populate this field with `default`. If no value is used, it falls back to `default`.
    /// Beyond the Elasticsearch index naming criteria noted above, `namespace` value has the additional restrictions:
    ///   * Must not contain `-`
    ///   * No longer than 100 characters
    ///
    /// # Examples
    ///
    /// - `production`
    pub const DATA_STREAM_NAMESPACE: &str = "data_stream.namespace";

    /// An overarching type for the data stream.
    /// Currently allowed values are "logs" and "metrics". We expect to also add "traces" and "synthetics" in the near future.
    ///
    /// # Examples
    ///
    /// - `logs`
    pub const DATA_STREAM_TYPE: &str = "data_stream.type";
}

/// Destination fields capture details about the receiver of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.

/// Destination fields are usually populated in conjunction with source fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
pub mod destination {

    /// Some event destination addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket.  You should always store the raw address in the `.address` field.
    /// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
    pub const DESTINATION_ADDRESS: &str = "destination.address";

    /// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
    ///
    /// # Examples
    ///
    /// - `15169`
    pub const DESTINATION_AS_NUMBER: &str = "destination.as.number";

    /// Organization name.
    ///
    /// # Examples
    ///
    /// - `Google LLC`
    pub const DESTINATION_AS_ORGANIZATION_NAME: &str = "destination.as.organization.name";

    /// Bytes sent from the destination to the source.
    ///
    /// # Examples
    ///
    /// - `184`
    pub const DESTINATION_BYTES: &str = "destination.bytes";

    /// Destination domain.
    pub const DESTINATION_DOMAIN: &str = "destination.domain";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const DESTINATION_GEO_CITY_NAME: &str = "destination.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const DESTINATION_GEO_CONTINENT_CODE: &str = "destination.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const DESTINATION_GEO_CONTINENT_NAME: &str = "destination.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const DESTINATION_GEO_COUNTRY_ISO_CODE: &str = "destination.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const DESTINATION_GEO_COUNTRY_NAME: &str = "destination.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const DESTINATION_GEO_LOCATION: &str = "destination.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const DESTINATION_GEO_NAME: &str = "destination.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const DESTINATION_GEO_POSTAL_CODE: &str = "destination.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const DESTINATION_GEO_REGION_ISO_CODE: &str = "destination.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const DESTINATION_GEO_REGION_NAME: &str = "destination.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const DESTINATION_GEO_TIMEZONE: &str = "destination.geo.timezone";

    /// IP address of the destination (IPv4 or IPv6).
    pub const DESTINATION_IP: &str = "destination.ip";

    /// MAC address of the destination.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `00-00-5E-00-53-23`
    pub const DESTINATION_MAC: &str = "destination.mac";

    /// Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
    /// Typically used with load balancers, firewalls, or routers.
    pub const DESTINATION_NAT_IP: &str = "destination.nat.ip";

    /// Port the source session is translated to by NAT Device.
    /// Typically used with load balancers, firewalls, or routers.
    pub const DESTINATION_NAT_PORT: &str = "destination.nat.port";

    /// Packets sent from the destination to the source.
    ///
    /// # Examples
    ///
    /// - `12`
    pub const DESTINATION_PACKETS: &str = "destination.packets";

    /// Port of the destination.
    pub const DESTINATION_PORT: &str = "destination.port";

    /// The highest registered destination domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const DESTINATION_REGISTERED_DOMAIN: &str = "destination.registered_domain";

    /// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.  In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
    /// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `east`
    pub const DESTINATION_SUBDOMAIN: &str = "destination.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const DESTINATION_TOP_LEVEL_DOMAIN: &str = "destination.top_level_domain";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const DESTINATION_USER_DOMAIN: &str = "destination.user.domain";

    /// User email address.
    pub const DESTINATION_USER_EMAIL: &str = "destination.user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const DESTINATION_USER_FULL_NAME: &str = "destination.user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const DESTINATION_USER_GROUP_DOMAIN: &str = "destination.user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const DESTINATION_USER_GROUP_ID: &str = "destination.user.group.id";

    /// Name of the group.
    pub const DESTINATION_USER_GROUP_NAME: &str = "destination.user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const DESTINATION_USER_HASH: &str = "destination.user.hash";

    /// Unique identifier of the user.
    pub const DESTINATION_USER_ID: &str = "destination.user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const DESTINATION_USER_NAME: &str = "destination.user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const DESTINATION_USER_ROLES: &str = "destination.user.roles";
}

/// These fields contain information about code libraries dynamically loaded into processes.

///

/// Many operating systems refer to "shared code libraries" with different names, but this field set refers to all of the following:

/// * Dynamic-link library (`.dll`) commonly used on Windows

/// * Shared Object (`.so`) commonly used on Unix-like operating systems

/// * Dynamic library (`.dylib`) commonly used on macOS
pub mod dll {

    /// Boolean to capture if a signature is present.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const DLL_CODE_SIGNATURE_EXISTS: &str = "dll.code_signature.exists";

    /// The identifier used to sign the process.
    /// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `com.apple.xpc.proxy`
    pub const DLL_CODE_SIGNATURE_SIGNING_ID: &str = "dll.code_signature.signing_id";

    /// Additional information about the certificate status.
    /// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `ERROR_UNTRUSTED_ROOT`
    pub const DLL_CODE_SIGNATURE_STATUS: &str = "dll.code_signature.status";

    /// Subject name of the code signer
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const DLL_CODE_SIGNATURE_SUBJECT_NAME: &str = "dll.code_signature.subject_name";

    /// The team identifier used to sign the process.
    /// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `EQHXZ8M8AV`
    pub const DLL_CODE_SIGNATURE_TEAM_ID: &str = "dll.code_signature.team_id";

    /// Stores the trust status of the certificate chain.
    /// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const DLL_CODE_SIGNATURE_TRUSTED: &str = "dll.code_signature.trusted";

    /// Boolean to capture if the digital signature is verified against the binary content.
    /// Leave unpopulated if a certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const DLL_CODE_SIGNATURE_VALID: &str = "dll.code_signature.valid";

    /// MD5 hash.
    pub const DLL_HASH_MD5: &str = "dll.hash.md5";

    /// SHA1 hash.
    pub const DLL_HASH_SHA1: &str = "dll.hash.sha1";

    /// SHA256 hash.
    pub const DLL_HASH_SHA256: &str = "dll.hash.sha256";

    /// SHA512 hash.
    pub const DLL_HASH_SHA512: &str = "dll.hash.sha512";

    /// SSDEEP hash.
    pub const DLL_HASH_SSDEEP: &str = "dll.hash.ssdeep";

    /// Name of the library.
    /// This generally maps to the name of the file on disk.
    ///
    /// # Examples
    ///
    /// - `kernel32.dll`
    pub const DLL_NAME: &str = "dll.name";

    /// Full file path of the library.
    ///
    /// # Examples
    ///
    /// - `C:\Windows\System32\kernel32.dll`
    pub const DLL_PATH: &str = "dll.path";

    /// CPU architecture target for the file.
    ///
    /// # Examples
    ///
    /// - `x64`
    pub const DLL_PE_ARCHITECTURE: &str = "dll.pe.architecture";

    /// Internal company name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const DLL_PE_COMPANY: &str = "dll.pe.company";

    /// Internal description of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Paint`
    pub const DLL_PE_DESCRIPTION: &str = "dll.pe.description";

    /// Internal version of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `6.3.9600.17415`
    pub const DLL_PE_FILE_VERSION: &str = "dll.pe.file_version";

    /// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
    /// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
    ///
    /// # Examples
    ///
    /// - `0c6803c4e922103c4dca5963aad36ddf`
    pub const DLL_PE_IMPHASH: &str = "dll.pe.imphash";

    /// Internal name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `MSPAINT.EXE`
    pub const DLL_PE_ORIGINAL_FILE_NAME: &str = "dll.pe.original_file_name";

    /// Internal product name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft® Windows® Operating System`
    pub const DLL_PE_PRODUCT: &str = "dll.pe.product";
}

/// Fields describing DNS queries and answers.

/// DNS events should either represent a single DNS query prior to getting answers (`dns.type:query`) or they should represent a full exchange and contain the query details as well as all of the answers that were provided for this query (`dns.type:answer`).
pub mod dns {

    /// An array containing an object for each answer section returned by the server.
    /// The main keys that should be present in these objects are defined by ECS. Records that have more information may contain more keys than what ECS defines.
    /// Not all DNS data sources give all details about DNS answers. At minimum, answer objects must contain the `data` key. If more information is available, map as much of it to ECS as possible, and add any additional fields to the answer objects as custom fields.
    pub const DNS_ANSWERS: &str = "dns.answers";

    /// The class of DNS data contained in this resource record.
    ///
    /// # Examples
    ///
    /// - `IN`
    pub const DNS_ANSWERS_CLASS: &str = "dns.answers.class";

    /// The data describing the resource.
    /// The meaning of this data depends on the type and class of the resource record.
    ///
    /// # Examples
    ///
    /// - `10.10.10.10`
    pub const DNS_ANSWERS_DATA: &str = "dns.answers.data";

    /// The domain name to which this resource record pertains.
    /// If a chain of CNAME is being resolved, each answer's `name` should be the one that corresponds with the answer's `data`. It should not simply be the original `question.name` repeated.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const DNS_ANSWERS_NAME: &str = "dns.answers.name";

    /// The time interval in seconds that this resource record may be cached before it should be discarded. Zero values mean that the data should not be cached.
    ///
    /// # Examples
    ///
    /// - `180`
    pub const DNS_ANSWERS_TTL: &str = "dns.answers.ttl";

    /// The type of data contained in this resource record.
    ///
    /// # Examples
    ///
    /// - `CNAME`
    pub const DNS_ANSWERS_TYPE: &str = "dns.answers.type";

    /// Array of 2 letter DNS header flags.
    /// Expected values are: AA, TC, RD, RA, AD, CD, DO.
    ///
    /// # Examples
    ///
    /// - `["RD", "RA"]`
    pub const DNS_HEADER_FLAGS: &str = "dns.header_flags";

    /// The DNS packet identifier assigned by the program that generated the query. The identifier is copied to the response.
    ///
    /// # Examples
    ///
    /// - `62111`
    pub const DNS_ID: &str = "dns.id";

    /// The DNS operation code that specifies the kind of query in the message. This value is set by the originator of a query and copied into the response.
    ///
    /// # Examples
    ///
    /// - `QUERY`
    pub const DNS_OP_CODE: &str = "dns.op_code";

    /// The class of records being queried.
    ///
    /// # Examples
    ///
    /// - `IN`
    pub const DNS_QUESTION_CLASS: &str = "dns.question.class";

    /// The name being queried.
    /// If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const DNS_QUESTION_NAME: &str = "dns.question.name";

    /// The highest registered domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const DNS_QUESTION_REGISTERED_DOMAIN: &str = "dns.question.registered_domain";

    /// The subdomain is all of the labels under the registered_domain.
    /// If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `www`
    pub const DNS_QUESTION_SUBDOMAIN: &str = "dns.question.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const DNS_QUESTION_TOP_LEVEL_DOMAIN: &str = "dns.question.top_level_domain";

    /// The type of record being queried.
    ///
    /// # Examples
    ///
    /// - `AAAA`
    pub const DNS_QUESTION_TYPE: &str = "dns.question.type";

    /// Array containing all IPs seen in `answers.data`.
    /// The `answers` array can be difficult to use, because of the variety of data formats it can contain. Extracting all IP addresses seen in there to `dns.resolved_ip` makes it possible to index them as IP addresses, and makes them easier to visualize and query for.
    ///
    /// # Examples
    ///
    /// - `["10.10.10.10", "10.10.10.11"]`
    pub const DNS_RESOLVED_IP: &str = "dns.resolved_ip";

    /// The DNS response code.
    ///
    /// # Examples
    ///
    /// - `NOERROR`
    pub const DNS_RESPONSE_CODE: &str = "dns.response_code";

    /// The type of DNS event captured, query or answer.
    /// If your source of DNS events only gives you DNS queries, you should only create dns events of type `dns.type:query`.
    /// If your source of DNS events gives you answers as well, you should create one event per query (optionally as soon as the query is seen). And a second event containing all query details as well as an array of answers.
    ///
    /// # Examples
    ///
    /// - `answer`
    pub const DNS_TYPE: &str = "dns.type";
}

/// These fields can represent errors of any kind.

/// Use them for errors that happen while fetching events or in cases where the event itself contains an error.
pub mod error {

    /// Error code describing the error.
    pub const ERROR_CODE: &str = "error.code";

    /// Unique identifier for the error.
    pub const ERROR_ID: &str = "error.id";

    /// Error message.
    pub const ERROR_MESSAGE: &str = "error.message";

    /// The stack trace of this error in plain text.
    pub const ERROR_STACK_TRACE: &str = "error.stack_trace";

    /// The type of the error, for example the class name of the exception.
    ///
    /// # Examples
    ///
    /// - `java.lang.NullPointerException`
    pub const ERROR_TYPE: &str = "error.type";
}

/// The event fields are used for context information about the log or metric event itself.

/// A log is defined as an event containing details of something that happened. Log events must include the time at which the thing happened. Examples of log events include a process starting on a host, a network packet being sent from a source to a destination, or a network connection between a client and a server being initiated or closed. A metric is defined as an event containing one or more numerical measurements and the time at which the measurement was taken. Examples of metric events include memory pressure measured on a host and device temperature. See the `event.kind` definition in this section for additional details about metric and state events.
pub mod event {

    /// The action captured by the event.
    /// This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer.
    ///
    /// # Examples
    ///
    /// - `user-password-change`
    pub const EVENT_ACTION: &str = "event.action";

    /// This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy.
    /// `event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory.
    /// This field is an array. This will allow proper categorization of some events that fall in multiple categories.
    ///
    /// # Examples
    ///
    /// - `authentication`
    pub const EVENT_CATEGORY: &str = "event.category";

    /// Identification code for this event, if one exists.
    /// Some event sources use event codes to identify messages unambiguously, regardless of message language or wording adjustments over time. An example of this is the Windows Event ID.
    ///
    /// # Examples
    ///
    /// - `4648`
    pub const EVENT_CODE: &str = "event.code";

    /// event.created contains the date/time when the event was first read by an agent, or by your pipeline.
    /// This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event.
    /// In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source.
    /// In case the two timestamps are identical, @timestamp should be used.
    ///
    /// # Examples
    ///
    /// - `2016-05-23T08:05:34.857Z`
    pub const EVENT_CREATED: &str = "event.created";

    /// Name of the dataset.
    /// If an event source publishes more than one type of log or events (e.g. access log, error log), the dataset is used to specify which one the event comes from.
    /// It's recommended but not required to start the dataset name with the module name, followed by a dot, then the dataset name.
    ///
    /// # Examples
    ///
    /// - `apache.access`
    pub const EVENT_DATASET: &str = "event.dataset";

    /// Duration of the event in nanoseconds.
    /// If event.start and event.end are known this value should be the difference between the end and start time.
    pub const EVENT_DURATION: &str = "event.duration";

    /// event.end contains the date when the event ended or when the activity was last observed.
    pub const EVENT_END: &str = "event.end";

    /// Hash (perhaps logstash fingerprint) of raw field to be able to demonstrate log integrity.
    ///
    /// # Examples
    ///
    /// - `123456789012345678901234567890ABCD`
    pub const EVENT_HASH: &str = "event.hash";

    /// Unique ID to describe the event.
    ///
    /// # Examples
    ///
    /// - `8a4f500d`
    pub const EVENT_ID: &str = "event.id";

    /// Timestamp when an event arrived in the central data store.
    /// This is different from `@timestamp`, which is when the event originally occurred.  It's also different from `event.created`, which is meant to capture the first time an agent saw the event.
    /// In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` < `event.created` < `event.ingested`.
    ///
    /// # Examples
    ///
    /// - `2016-05-23T08:05:35.101Z`
    pub const EVENT_INGESTED: &str = "event.ingested";

    /// This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy.
    /// `event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events.
    /// The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not.
    ///
    /// # Examples
    ///
    /// - `alert`
    pub const EVENT_KIND: &str = "event.kind";

    /// Name of the module this data is coming from.
    /// If your monitoring agent supports the concept of modules or plugins to process events of a given source (e.g. Apache logs), `event.module` should contain the name of this module.
    ///
    /// # Examples
    ///
    /// - `apache`
    pub const EVENT_MODULE: &str = "event.module";

    /// Raw text message of entire event. Used to demonstrate log integrity.
    /// This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, consider using the wildcard data type.
    ///
    /// # Examples
    ///
    /// - `Sep 19 08:26:10 host CEF:0&#124;Security&#124; threatmanager&#124;1.0&#124;100&#124; worm successfully stopped&#124;10&#124;src=10.0.0.1 dst=2.1.2.2spt=1232`
    pub const EVENT_ORIGINAL: &str = "event.original";

    /// This is one of four ECS Categorization Fields, and indicates the lowest level in the ECS category hierarchy.
    /// `event.outcome` simply denotes whether the event represents a success or a failure from the perspective of the entity that produced the event.
    /// Note that when a single transaction is described in multiple events, each event may populate different values of `event.outcome`, according to their perspective.
    /// Also note that in the case of a compound event (a single event that contains multiple logical events), this field should be populated with the value that best captures the overall success or failure from the perspective of the event producer.
    /// Further note that not all events will have an associated outcome. For example, this field is generally not populated for metric events, events with `event.type:info`, or any events for which an outcome does not make logical sense.
    ///
    /// # Examples
    ///
    /// - `success`
    pub const EVENT_OUTCOME: &str = "event.outcome";

    /// Source of the event.
    /// Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing).
    ///
    /// # Examples
    ///
    /// - `kernel`
    pub const EVENT_PROVIDER: &str = "event.provider";

    /// Reason why this event happened, according to the source.
    /// This describes the why of a particular action or outcome captured in the event. Where `event.action` captures the action from the event, `event.reason` describes why that action was taken. For example, a web proxy with an `event.action` which denied the request may also populate `event.reason` with the reason why (e.g. `blocked site`).
    ///
    /// # Examples
    ///
    /// - `Terminated an unexpected process`
    pub const EVENT_REASON: &str = "event.reason";

    /// Reference URL linking to additional information about this event.
    /// This URL links to a static definition of this event. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
    ///
    /// # Examples
    ///
    /// - `https://system.example.com/event/#0001234`
    pub const EVENT_REFERENCE: &str = "event.reference";

    /// Risk score or priority of the event (e.g. security solutions). Use your system's original value here.
    pub const EVENT_RISK_SCORE: &str = "event.risk_score";

    /// Normalized risk score or priority of the event, on a scale of 0 to 100.
    /// This is mainly useful if you use more than one system that assigns risk scores, and you want to see a normalized value across all systems.
    pub const EVENT_RISK_SCORE_NORM: &str = "event.risk_score_norm";

    /// Sequence number of the event.
    /// The sequence number is a value published by some event sources, to make the exact ordering of events unambiguous, regardless of the timestamp precision.
    pub const EVENT_SEQUENCE: &str = "event.sequence";

    /// The numeric severity of the event according to your event source.
    /// What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source.
    /// The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`.
    ///
    /// # Examples
    ///
    /// - `7`
    pub const EVENT_SEVERITY: &str = "event.severity";

    /// event.start contains the date when the event started or when the activity was first observed.
    pub const EVENT_START: &str = "event.start";

    /// This field should be populated when the event's timestamp does not include timezone information already (e.g. default Syslog timestamps). It's optional otherwise.
    /// Acceptable timezone formats are: a canonical ID (e.g. "Europe/Amsterdam"), abbreviated (e.g. "EST") or an HH:mm differential (e.g. "-05:00").
    pub const EVENT_TIMEZONE: &str = "event.timezone";

    /// This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy.
    /// `event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization.
    /// This field is an array. This will allow proper categorization of some events that fall in multiple event types.
    pub const EVENT_TYPE: &str = "event.type";

    /// URL linking to an external system to continue investigation of this event.
    /// This URL links to another system where in-depth investigation of the specific occurrence of this event can take place. Alert events, indicated by `event.kind:alert`, are a common use case for this field.
    ///
    /// # Examples
    ///
    /// - `https://mysystem.example.com/alert/5271dedb-f5b0-4218-87f0-4ac4870a38fe`
    pub const EVENT_URL: &str = "event.url";
}

/// A file is defined as a set of information that has been created on, or has existed on a filesystem.

/// File objects can be associated with host events, network events, and/or file events (e.g., those produced by File Integrity Monitoring [FIM] products or services). File fields provide details about the affected file associated with the event or metric.
pub mod file {

    /// Last time the file was accessed.
    /// Note that not all filesystems keep track of access time.
    pub const FILE_ACCESSED: &str = "file.accessed";

    /// Array of file attributes.
    /// Attributes names will vary by platform. Here's a non-exhaustive list of values that are expected in this field: archive, compressed, directory, encrypted, execute, hidden, read, readonly, system, write.
    ///
    /// # Examples
    ///
    /// - `["readonly", "system"]`
    pub const FILE_ATTRIBUTES: &str = "file.attributes";

    /// Boolean to capture if a signature is present.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const FILE_CODE_SIGNATURE_EXISTS: &str = "file.code_signature.exists";

    /// The identifier used to sign the process.
    /// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `com.apple.xpc.proxy`
    pub const FILE_CODE_SIGNATURE_SIGNING_ID: &str = "file.code_signature.signing_id";

    /// Additional information about the certificate status.
    /// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `ERROR_UNTRUSTED_ROOT`
    pub const FILE_CODE_SIGNATURE_STATUS: &str = "file.code_signature.status";

    /// Subject name of the code signer
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const FILE_CODE_SIGNATURE_SUBJECT_NAME: &str = "file.code_signature.subject_name";

    /// The team identifier used to sign the process.
    /// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `EQHXZ8M8AV`
    pub const FILE_CODE_SIGNATURE_TEAM_ID: &str = "file.code_signature.team_id";

    /// Stores the trust status of the certificate chain.
    /// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const FILE_CODE_SIGNATURE_TRUSTED: &str = "file.code_signature.trusted";

    /// Boolean to capture if the digital signature is verified against the binary content.
    /// Leave unpopulated if a certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const FILE_CODE_SIGNATURE_VALID: &str = "file.code_signature.valid";

    /// File creation time.
    /// Note that not all filesystems store the creation time.
    pub const FILE_CREATED: &str = "file.created";

    /// Last time the file attributes or metadata changed.
    /// Note that changes to the file content will update `mtime`. This implies `ctime` will be adjusted at the same time, since `mtime` is an attribute of the file.
    pub const FILE_CTIME: &str = "file.ctime";

    /// Device that is the source of the file.
    ///
    /// # Examples
    ///
    /// - `sda`
    pub const FILE_DEVICE: &str = "file.device";

    /// Directory where the file is located. It should include the drive letter, when appropriate.
    ///
    /// # Examples
    ///
    /// - `/home/alice`
    pub const FILE_DIRECTORY: &str = "file.directory";

    /// Drive letter where the file is located. This field is only relevant on Windows.
    /// The value should be uppercase, and not include the colon.
    ///
    /// # Examples
    ///
    /// - `C`
    pub const FILE_DRIVE_LETTER: &str = "file.drive_letter";

    /// File extension, excluding the leading dot.
    /// Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
    ///
    /// # Examples
    ///
    /// - `png`
    pub const FILE_EXTENSION: &str = "file.extension";

    /// Primary group ID (GID) of the file.
    ///
    /// # Examples
    ///
    /// - `1001`
    pub const FILE_GID: &str = "file.gid";

    /// Primary group name of the file.
    ///
    /// # Examples
    ///
    /// - `alice`
    pub const FILE_GROUP: &str = "file.group";

    /// MD5 hash.
    pub const FILE_HASH_MD5: &str = "file.hash.md5";

    /// SHA1 hash.
    pub const FILE_HASH_SHA1: &str = "file.hash.sha1";

    /// SHA256 hash.
    pub const FILE_HASH_SHA256: &str = "file.hash.sha256";

    /// SHA512 hash.
    pub const FILE_HASH_SHA512: &str = "file.hash.sha512";

    /// SSDEEP hash.
    pub const FILE_HASH_SSDEEP: &str = "file.hash.ssdeep";

    /// Inode representing the file in the filesystem.
    ///
    /// # Examples
    ///
    /// - `256383`
    pub const FILE_INODE: &str = "file.inode";

    /// MIME type should identify the format of the file or stream of bytes using https://www.iana.org/assignments/media-types/media-types.xhtml[IANA official types], where possible. When more than one type is applicable, the most specific type should be used.
    pub const FILE_MIME_TYPE: &str = "file.mime_type";

    /// Mode of the file in octal representation.
    ///
    /// # Examples
    ///
    /// - `0640`
    pub const FILE_MODE: &str = "file.mode";

    /// Last time the file content was modified.
    pub const FILE_MTIME: &str = "file.mtime";

    /// Name of the file including the extension, without the directory.
    ///
    /// # Examples
    ///
    /// - `example.png`
    pub const FILE_NAME: &str = "file.name";

    /// File owner's username.
    ///
    /// # Examples
    ///
    /// - `alice`
    pub const FILE_OWNER: &str = "file.owner";

    /// Full path to the file, including the file name. It should include the drive letter, when appropriate.
    ///
    /// # Examples
    ///
    /// - `/home/alice/example.png`
    pub const FILE_PATH: &str = "file.path";

    /// CPU architecture target for the file.
    ///
    /// # Examples
    ///
    /// - `x64`
    pub const FILE_PE_ARCHITECTURE: &str = "file.pe.architecture";

    /// Internal company name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const FILE_PE_COMPANY: &str = "file.pe.company";

    /// Internal description of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Paint`
    pub const FILE_PE_DESCRIPTION: &str = "file.pe.description";

    /// Internal version of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `6.3.9600.17415`
    pub const FILE_PE_FILE_VERSION: &str = "file.pe.file_version";

    /// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
    /// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
    ///
    /// # Examples
    ///
    /// - `0c6803c4e922103c4dca5963aad36ddf`
    pub const FILE_PE_IMPHASH: &str = "file.pe.imphash";

    /// Internal name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `MSPAINT.EXE`
    pub const FILE_PE_ORIGINAL_FILE_NAME: &str = "file.pe.original_file_name";

    /// Internal product name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft® Windows® Operating System`
    pub const FILE_PE_PRODUCT: &str = "file.pe.product";

    /// File size in bytes.
    /// Only relevant when `file.type` is "file".
    ///
    /// # Examples
    ///
    /// - `16384`
    pub const FILE_SIZE: &str = "file.size";

    /// Target path for symlinks.
    pub const FILE_TARGET_PATH: &str = "file.target_path";

    /// File type (file, dir, or symlink).
    ///
    /// # Examples
    ///
    /// - `file`
    pub const FILE_TYPE: &str = "file.type";

    /// The user ID (UID) or security identifier (SID) of the file owner.
    ///
    /// # Examples
    ///
    /// - `1001`
    pub const FILE_UID: &str = "file.uid";

    /// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
    ///
    /// # Examples
    ///
    /// - `*.elastic.co`
    pub const FILE_X509_ALTERNATIVE_NAMES: &str = "file.x509.alternative_names";

    /// List of common name (CN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example SHA2 High Assurance Server CA`
    pub const FILE_X509_ISSUER_COMMON_NAME: &str = "file.x509.issuer.common_name";

    /// List of country (C) codes
    ///
    /// # Examples
    ///
    /// - `US`
    pub const FILE_X509_ISSUER_COUNTRY: &str = "file.x509.issuer.country";

    /// Distinguished name (DN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
    pub const FILE_X509_ISSUER_DISTINGUISHED_NAME: &str = "file.x509.issuer.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `Mountain View`
    pub const FILE_X509_ISSUER_LOCALITY: &str = "file.x509.issuer.locality";

    /// List of organizations (O) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example Inc`
    pub const FILE_X509_ISSUER_ORGANIZATION: &str = "file.x509.issuer.organization";

    /// List of organizational units (OU) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const FILE_X509_ISSUER_ORGANIZATIONAL_UNIT: &str = "file.x509.issuer.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const FILE_X509_ISSUER_STATE_OR_PROVINCE: &str = "file.x509.issuer.state_or_province";

    /// Time at which the certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2020-07-16 03:15:39+00:00`
    pub const FILE_X509_NOT_AFTER: &str = "file.x509.not_after";

    /// Time at which the certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `2019-08-16 01:40:25+00:00`
    pub const FILE_X509_NOT_BEFORE: &str = "file.x509.not_before";

    /// Algorithm used to generate the public key.
    ///
    /// # Examples
    ///
    /// - `RSA`
    pub const FILE_X509_PUBLIC_KEY_ALGORITHM: &str = "file.x509.public_key_algorithm";

    /// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `nistp521`
    pub const FILE_X509_PUBLIC_KEY_CURVE: &str = "file.x509.public_key_curve";

    /// Exponent used to derive the public key. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `65537`
    pub const FILE_X509_PUBLIC_KEY_EXPONENT: &str = "file.x509.public_key_exponent";

    /// The size of the public key space in bits.
    ///
    /// # Examples
    ///
    /// - `2048`
    pub const FILE_X509_PUBLIC_KEY_SIZE: &str = "file.x509.public_key_size";

    /// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
    ///
    /// # Examples
    ///
    /// - `55FBB9C7DEBF09809D12CCAA`
    pub const FILE_X509_SERIAL_NUMBER: &str = "file.x509.serial_number";

    /// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
    ///
    /// # Examples
    ///
    /// - `SHA256-RSA`
    pub const FILE_X509_SIGNATURE_ALGORITHM: &str = "file.x509.signature_algorithm";

    /// List of common names (CN) of subject.
    ///
    /// # Examples
    ///
    /// - `shared.global.example.net`
    pub const FILE_X509_SUBJECT_COMMON_NAME: &str = "file.x509.subject.common_name";

    /// List of country (C) code
    ///
    /// # Examples
    ///
    /// - `US`
    pub const FILE_X509_SUBJECT_COUNTRY: &str = "file.x509.subject.country";

    /// Distinguished name (DN) of the certificate subject entity.
    ///
    /// # Examples
    ///
    /// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
    pub const FILE_X509_SUBJECT_DISTINGUISHED_NAME: &str = "file.x509.subject.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `San Francisco`
    pub const FILE_X509_SUBJECT_LOCALITY: &str = "file.x509.subject.locality";

    /// List of organizations (O) of subject.
    ///
    /// # Examples
    ///
    /// - `Example, Inc.`
    pub const FILE_X509_SUBJECT_ORGANIZATION: &str = "file.x509.subject.organization";

    /// List of organizational units (OU) of subject.
    pub const FILE_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str = "file.x509.subject.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const FILE_X509_SUBJECT_STATE_OR_PROVINCE: &str = "file.x509.subject.state_or_province";

    /// Version of x509 format.
    ///
    /// # Examples
    ///
    /// - `3`
    pub const FILE_X509_VERSION_NUMBER: &str = "file.x509.version_number";
}

/// Geo fields can carry data about a specific location related to an event.

/// This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.
pub mod geo {

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const GEO_CITY_NAME: &str = "geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const GEO_CONTINENT_CODE: &str = "geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const GEO_CONTINENT_NAME: &str = "geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const GEO_COUNTRY_ISO_CODE: &str = "geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const GEO_COUNTRY_NAME: &str = "geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const GEO_LOCATION: &str = "geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const GEO_NAME: &str = "geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const GEO_POSTAL_CODE: &str = "geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const GEO_REGION_ISO_CODE: &str = "geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const GEO_REGION_NAME: &str = "geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const GEO_TIMEZONE: &str = "geo.timezone";
}

/// The group fields are meant to represent groups that are relevant to the event.
pub mod group {

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const GROUP_DOMAIN: &str = "group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const GROUP_ID: &str = "group.id";

    /// Name of the group.
    pub const GROUP_NAME: &str = "group.name";
}

/// The hash fields represent different bitwise hash algorithms and their values.

/// Field names for common hashes (e.g. MD5, SHA1) are predefined. Add fields for other hashes by lowercasing the hash algorithm name and using underscore separators as appropriate (snake case, e.g. sha3_512).

/// Note that this fieldset is used for common hashes that may be computed over a range of generic bytes. Entity-specific hashes such as ja3 or imphash are placed in the fieldsets to which they relate (tls and pe, respectively).
pub mod hash {

    /// MD5 hash.
    pub const HASH_MD5: &str = "hash.md5";

    /// SHA1 hash.
    pub const HASH_SHA1: &str = "hash.sha1";

    /// SHA256 hash.
    pub const HASH_SHA256: &str = "hash.sha256";

    /// SHA512 hash.
    pub const HASH_SHA512: &str = "hash.sha512";

    /// SSDEEP hash.
    pub const HASH_SSDEEP: &str = "hash.ssdeep";
}

/// A host is defined as a general computing instance.

/// ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.
pub mod host {

    /// Operating system architecture.
    ///
    /// # Examples
    ///
    /// - `x86_64`
    pub const HOST_ARCHITECTURE: &str = "host.architecture";

    /// Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1.
    /// Scaling factor: 1000.
    /// For example: For a two core host, this value should be the average of the two cores, between 0 and 1.
    pub const HOST_CPU_USAGE: &str = "host.cpu.usage";

    /// The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.
    pub const HOST_DISK_READ_BYTES: &str = "host.disk.read.bytes";

    /// The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.
    pub const HOST_DISK_WRITE_BYTES: &str = "host.disk.write.bytes";

    /// Name of the domain of which the host is a member.
    /// For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider.
    ///
    /// # Examples
    ///
    /// - `CONTOSO`
    pub const HOST_DOMAIN: &str = "host.domain";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const HOST_GEO_CITY_NAME: &str = "host.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const HOST_GEO_CONTINENT_CODE: &str = "host.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const HOST_GEO_CONTINENT_NAME: &str = "host.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const HOST_GEO_COUNTRY_ISO_CODE: &str = "host.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const HOST_GEO_COUNTRY_NAME: &str = "host.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const HOST_GEO_LOCATION: &str = "host.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const HOST_GEO_NAME: &str = "host.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const HOST_GEO_POSTAL_CODE: &str = "host.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const HOST_GEO_REGION_ISO_CODE: &str = "host.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const HOST_GEO_REGION_NAME: &str = "host.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const HOST_GEO_TIMEZONE: &str = "host.geo.timezone";

    /// Hostname of the host.
    /// It normally contains what the `hostname` command returns on the host machine.
    pub const HOST_HOSTNAME: &str = "host.hostname";

    /// Unique host id.
    /// As hostname is not always unique, use values that are meaningful in your environment.
    /// Example: The current usage of `beat.name`.
    pub const HOST_ID: &str = "host.id";

    /// Host ip addresses.
    pub const HOST_IP: &str = "host.ip";

    /// Host MAC addresses.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `["00-00-5E-00-53-23", "00-00-5E-00-53-24"]`
    pub const HOST_MAC: &str = "host.mac";

    /// Name of the host.
    /// It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.
    pub const HOST_NAME: &str = "host.name";

    /// The number of bytes (gauge) sent out on all network interfaces by the host since the last metric collection.
    pub const HOST_NETWORK_EGRESS_BYTES: &str = "host.network.egress.bytes";

    /// The number of packets (gauge) sent out on all network interfaces by the host since the last metric collection.
    pub const HOST_NETWORK_EGRESS_PACKETS: &str = "host.network.egress.packets";

    /// The number of bytes received (gauge) on all network interfaces by the host since the last metric collection.
    pub const HOST_NETWORK_INGRESS_BYTES: &str = "host.network.ingress.bytes";

    /// The number of packets (gauge) received on all network interfaces by the host since the last metric collection.
    pub const HOST_NETWORK_INGRESS_PACKETS: &str = "host.network.ingress.packets";

    /// OS family (such as redhat, debian, freebsd, windows).
    ///
    /// # Examples
    ///
    /// - `debian`
    pub const HOST_OS_FAMILY: &str = "host.os.family";

    /// Operating system name, including the version or code name.
    ///
    /// # Examples
    ///
    /// - `Mac OS Mojave`
    pub const HOST_OS_FULL: &str = "host.os.full";

    /// Operating system kernel version as a raw string.
    ///
    /// # Examples
    ///
    /// - `4.4.0-112-generic`
    pub const HOST_OS_KERNEL: &str = "host.os.kernel";

    /// Operating system name, without the version.
    ///
    /// # Examples
    ///
    /// - `Mac OS X`
    pub const HOST_OS_NAME: &str = "host.os.name";

    /// Operating system platform (such centos, ubuntu, windows).
    ///
    /// # Examples
    ///
    /// - `darwin`
    pub const HOST_OS_PLATFORM: &str = "host.os.platform";

    /// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
    /// One of these following values should be used (lowercase): linux, macos, unix, windows.
    /// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
    ///
    /// # Examples
    ///
    /// - `macos`
    pub const HOST_OS_TYPE: &str = "host.os.type";

    /// Operating system version as a raw string.
    ///
    /// # Examples
    ///
    /// - `10.14.1`
    pub const HOST_OS_VERSION: &str = "host.os.version";

    /// Type of host.
    /// For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.
    pub const HOST_TYPE: &str = "host.type";

    /// Seconds the host has been up.
    ///
    /// # Examples
    ///
    /// - `1325`
    pub const HOST_UPTIME: &str = "host.uptime";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const HOST_USER_DOMAIN: &str = "host.user.domain";

    /// User email address.
    pub const HOST_USER_EMAIL: &str = "host.user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const HOST_USER_FULL_NAME: &str = "host.user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const HOST_USER_GROUP_DOMAIN: &str = "host.user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const HOST_USER_GROUP_ID: &str = "host.user.group.id";

    /// Name of the group.
    pub const HOST_USER_GROUP_NAME: &str = "host.user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const HOST_USER_HASH: &str = "host.user.hash";

    /// Unique identifier of the user.
    pub const HOST_USER_ID: &str = "host.user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const HOST_USER_NAME: &str = "host.user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const HOST_USER_ROLES: &str = "host.user.roles";
}

/// Fields related to HTTP activity. Use the `url` field set to store the url of the request.
pub mod http {

    /// Size in bytes of the request body.
    ///
    /// # Examples
    ///
    /// - `887`
    pub const HTTP_REQUEST_BODY_BYTES: &str = "http.request.body.bytes";

    /// The full HTTP request body.
    ///
    /// # Examples
    ///
    /// - `Hello world`
    pub const HTTP_REQUEST_BODY_CONTENT: &str = "http.request.body.content";

    /// Total size in bytes of the request (body and headers).
    ///
    /// # Examples
    ///
    /// - `1437`
    pub const HTTP_REQUEST_BYTES: &str = "http.request.bytes";

    /// A unique identifier for each HTTP request to correlate logs between clients and servers in transactions.
    /// The id may be contained in a non-standard HTTP header, such as `X-Request-ID` or `X-Correlation-ID`.
    ///
    /// # Examples
    ///
    /// - `123e4567-e89b-12d3-a456-426614174000`
    pub const HTTP_REQUEST_ID: &str = "http.request.id";

    /// HTTP request method.
    /// Prior to ECS 1.6.0 the following guidance was provided:
    /// "The field value must be normalized to lowercase for querying."
    /// As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection.  Original case will be mandated in ECS 2.0.0
    ///
    /// # Examples
    ///
    /// - `GET, POST, PUT, PoST`
    pub const HTTP_REQUEST_METHOD: &str = "http.request.method";

    /// Mime type of the body of the request.
    /// This value must only be populated based on the content of the request body, not on the `Content-Type` header. Comparing the mime type of a request with the request's Content-Type header can be helpful in detecting threats or misconfigured clients.
    ///
    /// # Examples
    ///
    /// - `image/gif`
    pub const HTTP_REQUEST_MIME_TYPE: &str = "http.request.mime_type";

    /// Referrer for this HTTP request.
    ///
    /// # Examples
    ///
    /// - `https://blog.example.com/`
    pub const HTTP_REQUEST_REFERRER: &str = "http.request.referrer";

    /// Size in bytes of the response body.
    ///
    /// # Examples
    ///
    /// - `887`
    pub const HTTP_RESPONSE_BODY_BYTES: &str = "http.response.body.bytes";

    /// The full HTTP response body.
    ///
    /// # Examples
    ///
    /// - `Hello world`
    pub const HTTP_RESPONSE_BODY_CONTENT: &str = "http.response.body.content";

    /// Total size in bytes of the response (body and headers).
    ///
    /// # Examples
    ///
    /// - `1437`
    pub const HTTP_RESPONSE_BYTES: &str = "http.response.bytes";

    /// Mime type of the body of the response.
    /// This value must only be populated based on the content of the response body, not on the `Content-Type` header. Comparing the mime type of a response with the response's Content-Type header can be helpful in detecting misconfigured servers.
    ///
    /// # Examples
    ///
    /// - `image/gif`
    pub const HTTP_RESPONSE_MIME_TYPE: &str = "http.response.mime_type";

    /// HTTP response status code.
    ///
    /// # Examples
    ///
    /// - `404`
    pub const HTTP_RESPONSE_STATUS_CODE: &str = "http.response.status_code";

    /// HTTP version.
    ///
    /// # Examples
    ///
    /// - `1.1`
    pub const HTTP_VERSION: &str = "http.version";
}

/// The interface fields are used to record ingress and egress interface information when reported by an observer (e.g. firewall, router, load balancer) in the context of the observer handling a network connection.  In the case of a single observer interface (e.g. network sensor on a span port) only the observer.ingress information should be populated.
pub mod interface {

    /// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const INTERFACE_ALIAS: &str = "interface.alias";

    /// Interface ID as reported by an observer (typically SNMP interface ID).
    ///
    /// # Examples
    ///
    /// - `10`
    pub const INTERFACE_ID: &str = "interface.id";

    /// Interface name as reported by the system.
    ///
    /// # Examples
    ///
    /// - `eth0`
    pub const INTERFACE_NAME: &str = "interface.name";
}

/// Details about the event's logging mechanism or logging transport.

/// The log.* fields are typically populated with details about the logging mechanism used to create and/or transport the event. For example, syslog details belong under `log.syslog.*`.

/// The details specific to your event source are typically not logged under `log.*`, but rather in `event.*` or in other ECS fields.
pub mod log {

    /// Full path to the log file this event came from, including the file name. It should include the drive letter, when appropriate.
    /// If the event wasn't read from a log file, do not populate this field.
    ///
    /// # Examples
    ///
    /// - `/var/log/fun-times.log`
    pub const LOG_FILE_PATH: &str = "log.file.path";

    /// Original log level of the log event.
    /// If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity).
    /// Some examples are `warn`, `err`, `i`, `informational`.
    ///
    /// # Examples
    ///
    /// - `error`
    pub const LOG_LEVEL: &str = "log.level";

    /// The name of the logger inside an application. This is usually the name of the class which initialized the logger, or can be a custom name.
    ///
    /// # Examples
    ///
    /// - `org.elasticsearch.bootstrap.Bootstrap`
    pub const LOG_LOGGER: &str = "log.logger";

    /// The line number of the file containing the source code which originated the log event.
    ///
    /// # Examples
    ///
    /// - `42`
    pub const LOG_ORIGIN_FILE_LINE: &str = "log.origin.file.line";

    /// The name of the file containing the source code which originated the log event.
    /// Note that this field is not meant to capture the log file. The correct field to capture the log file is `log.file.path`.
    ///
    /// # Examples
    ///
    /// - `Bootstrap.java`
    pub const LOG_ORIGIN_FILE_NAME: &str = "log.origin.file.name";

    /// The name of the function or method which originated the log event.
    ///
    /// # Examples
    ///
    /// - `init`
    pub const LOG_ORIGIN_FUNCTION: &str = "log.origin.function";

    /// This is the original log message and contains the full log message before splitting it up in multiple parts.
    /// In contrast to the `message` field which can contain an extracted part of the log message, this field contains the original, full log message. It can have already some modifications applied like encoding or new lines removed to clean up the log message.
    /// This field is not indexed and doc_values are disabled so it can't be queried but the value can be retrieved from `_source`.
    ///
    /// # Examples
    ///
    /// - `Sep 19 08:26:10 localhost My log`
    pub const LOG_ORIGINAL: &str = "log.original";

    /// The Syslog metadata of the event, if the event was transmitted via Syslog. Please see RFCs 5424 or 3164.
    pub const LOG_SYSLOG: &str = "log.syslog";

    /// The Syslog numeric facility of the log event, if available.
    /// According to RFCs 5424 and 3164, this value should be an integer between 0 and 23.
    ///
    /// # Examples
    ///
    /// - `23`
    pub const LOG_SYSLOG_FACILITY_CODE: &str = "log.syslog.facility.code";

    /// The Syslog text-based facility of the log event, if available.
    ///
    /// # Examples
    ///
    /// - `local7`
    pub const LOG_SYSLOG_FACILITY_NAME: &str = "log.syslog.facility.name";

    /// Syslog numeric priority of the event, if available.
    /// According to RFCs 5424 and 3164, the priority is 8 * facility + severity. This number is therefore expected to contain a value between 0 and 191.
    ///
    /// # Examples
    ///
    /// - `135`
    pub const LOG_SYSLOG_PRIORITY: &str = "log.syslog.priority";

    /// The Syslog numeric severity of the log event, if available.
    /// If the event source publishing via Syslog provides a different numeric severity value (e.g. firewall, IDS), your source's numeric severity should go to `event.severity`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `event.severity`.
    ///
    /// # Examples
    ///
    /// - `3`
    pub const LOG_SYSLOG_SEVERITY_CODE: &str = "log.syslog.severity.code";

    /// The Syslog numeric severity of the log event, if available.
    /// If the event source publishing via Syslog provides a different severity value (e.g. firewall, IDS), your source's text severity should go to `log.level`. If the event source does not specify a distinct severity, you can optionally copy the Syslog severity to `log.level`.
    ///
    /// # Examples
    ///
    /// - `Error`
    pub const LOG_SYSLOG_SEVERITY_NAME: &str = "log.syslog.severity.name";
}

/// The network is defined as the communication path over which a host or network event happens.

/// The network.* fields should be populated with details about the network activity associated with an event.
pub mod network {

    /// A name given to an application level protocol. This can be arbitrarily assigned for things like microservices, but also apply to things like skype, icq, facebook, twitter. This would be used in situations where the vendor or service can be decoded such as from the source/dest IP owners, ports, or wire format.
    /// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
    ///
    /// # Examples
    ///
    /// - `aim`
    pub const NETWORK_APPLICATION: &str = "network.application";

    /// Total bytes transferred in both directions.
    /// If `source.bytes` and `destination.bytes` are known, `network.bytes` is their sum.
    ///
    /// # Examples
    ///
    /// - `368`
    pub const NETWORK_BYTES: &str = "network.bytes";

    /// A hash of source and destination IPs and ports, as well as the protocol used in a communication. This is a tool-agnostic standard to identify flows.
    /// Learn more at https://github.com/corelight/community-id-spec.
    ///
    /// # Examples
    ///
    /// - `1:hO+sN4H+MG5MY/8hIrXPqc4ZQz0=`
    pub const NETWORK_COMMUNITY_ID: &str = "network.community_id";

    /// Direction of the network traffic.
    /// Recommended values are:
    ///   * ingress
    ///   * egress
    ///   * inbound
    ///   * outbound
    ///   * internal
    ///   * external
    ///   * unknown
    ///
    /// When mapping events from a host-based monitoring context, populate this field from the host's point of view, using the values "ingress" or "egress".
    /// When mapping events from a network or perimeter-based monitoring context, populate this field from the point of view of the network perimeter, using the values "inbound", "outbound", "internal" or "external".
    /// Note that "internal" is not crossing perimeter boundaries, and is meant to describe communication between two hosts within the perimeter. Note also that "external" is meant to describe traffic between two hosts that are external to the perimeter. This could for example be useful for ISPs or VPN service providers.
    ///
    /// # Examples
    ///
    /// - `inbound`
    pub const NETWORK_DIRECTION: &str = "network.direction";

    /// Host IP address when the source IP address is the proxy.
    ///
    /// # Examples
    ///
    /// - `192.1.1.2`
    pub const NETWORK_FORWARDED_IP: &str = "network.forwarded_ip";

    /// IANA Protocol Number (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). Standardized list of protocols. This aligns well with NetFlow and sFlow related logs which use the IANA Protocol Number.
    ///
    /// # Examples
    ///
    /// - `6`
    pub const NETWORK_IANA_NUMBER: &str = "network.iana_number";

    /// Network.inner fields are added in addition to network.vlan fields to describe the innermost VLAN when q-in-q VLAN tagging is present. Allowed fields include vlan.id and vlan.name. Inner vlan fields are typically used when sending traffic with multiple 802.1q encapsulations to a network sensor (e.g. Zeek, Wireshark.)
    pub const NETWORK_INNER: &str = "network.inner";

    /// VLAN ID as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `10`
    pub const NETWORK_INNER_VLAN_ID: &str = "network.inner.vlan.id";

    /// Optional VLAN name as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const NETWORK_INNER_VLAN_NAME: &str = "network.inner.vlan.name";

    /// Name given by operators to sections of their network.
    ///
    /// # Examples
    ///
    /// - `Guest Wifi`
    pub const NETWORK_NAME: &str = "network.name";

    /// Total packets transferred in both directions.
    /// If `source.packets` and `destination.packets` are known, `network.packets` is their sum.
    ///
    /// # Examples
    ///
    /// - `24`
    pub const NETWORK_PACKETS: &str = "network.packets";

    /// L7 Network protocol name. ex. http, lumberjack, transport protocol.
    /// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
    ///
    /// # Examples
    ///
    /// - `http`
    pub const NETWORK_PROTOCOL: &str = "network.protocol";

    /// Same as network.iana_number, but instead using the Keyword name of the transport layer (udp, tcp, ipv6-icmp, etc.)
    /// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
    ///
    /// # Examples
    ///
    /// - `tcp`
    pub const NETWORK_TRANSPORT: &str = "network.transport";

    /// In the OSI Model this would be the Network Layer. ipv4, ipv6, ipsec, pim, etc
    /// The field value must be normalized to lowercase for querying. See the documentation section "Implementing ECS".
    ///
    /// # Examples
    ///
    /// - `ipv4`
    pub const NETWORK_TYPE: &str = "network.type";

    /// VLAN ID as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `10`
    pub const NETWORK_VLAN_ID: &str = "network.vlan.id";

    /// Optional VLAN name as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const NETWORK_VLAN_NAME: &str = "network.vlan.name";
}

/// An observer is defined as a special network, security, or application device used to detect, observe, or create network, security, or application-related events and metrics.

/// This could be a custom hardware appliance or a server that has been configured to run special network, security, or application software. Examples include firewalls, web proxies, intrusion detection/prevention systems, network monitoring sensors, web application firewalls, data loss prevention systems, and APM servers. The observer.* fields shall be populated with details of the system, if any, that detects, observes and/or creates a network, security, or application event or metric. Message queues and ETL components used in processing events or metrics are not considered observers in ECS.
pub mod observer {

    /// Observer.egress holds information like interface number and name, vlan, and zone information to classify egress traffic.  Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
    pub const OBSERVER_EGRESS: &str = "observer.egress";

    /// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const OBSERVER_EGRESS_INTERFACE_ALIAS: &str = "observer.egress.interface.alias";

    /// Interface ID as reported by an observer (typically SNMP interface ID).
    ///
    /// # Examples
    ///
    /// - `10`
    pub const OBSERVER_EGRESS_INTERFACE_ID: &str = "observer.egress.interface.id";

    /// Interface name as reported by the system.
    ///
    /// # Examples
    ///
    /// - `eth0`
    pub const OBSERVER_EGRESS_INTERFACE_NAME: &str = "observer.egress.interface.name";

    /// VLAN ID as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `10`
    pub const OBSERVER_EGRESS_VLAN_ID: &str = "observer.egress.vlan.id";

    /// Optional VLAN name as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const OBSERVER_EGRESS_VLAN_NAME: &str = "observer.egress.vlan.name";

    /// Network zone of outbound traffic as reported by the observer to categorize the destination area of egress traffic, e.g. Internal, External, DMZ, HR, Legal, etc.
    ///
    /// # Examples
    ///
    /// - `Public_Internet`
    pub const OBSERVER_EGRESS_ZONE: &str = "observer.egress.zone";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const OBSERVER_GEO_CITY_NAME: &str = "observer.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const OBSERVER_GEO_CONTINENT_CODE: &str = "observer.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const OBSERVER_GEO_CONTINENT_NAME: &str = "observer.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const OBSERVER_GEO_COUNTRY_ISO_CODE: &str = "observer.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const OBSERVER_GEO_COUNTRY_NAME: &str = "observer.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const OBSERVER_GEO_LOCATION: &str = "observer.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const OBSERVER_GEO_NAME: &str = "observer.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const OBSERVER_GEO_POSTAL_CODE: &str = "observer.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const OBSERVER_GEO_REGION_ISO_CODE: &str = "observer.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const OBSERVER_GEO_REGION_NAME: &str = "observer.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const OBSERVER_GEO_TIMEZONE: &str = "observer.geo.timezone";

    /// Hostname of the observer.
    pub const OBSERVER_HOSTNAME: &str = "observer.hostname";

    /// Observer.ingress holds information like interface number and name, vlan, and zone information to classify ingress traffic.  Single armed monitoring such as a network sensor on a span port should only use observer.ingress to categorize traffic.
    pub const OBSERVER_INGRESS: &str = "observer.ingress";

    /// Interface alias as reported by the system, typically used in firewall implementations for e.g. inside, outside, or dmz logical interface naming.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const OBSERVER_INGRESS_INTERFACE_ALIAS: &str = "observer.ingress.interface.alias";

    /// Interface ID as reported by an observer (typically SNMP interface ID).
    ///
    /// # Examples
    ///
    /// - `10`
    pub const OBSERVER_INGRESS_INTERFACE_ID: &str = "observer.ingress.interface.id";

    /// Interface name as reported by the system.
    ///
    /// # Examples
    ///
    /// - `eth0`
    pub const OBSERVER_INGRESS_INTERFACE_NAME: &str = "observer.ingress.interface.name";

    /// VLAN ID as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `10`
    pub const OBSERVER_INGRESS_VLAN_ID: &str = "observer.ingress.vlan.id";

    /// Optional VLAN name as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const OBSERVER_INGRESS_VLAN_NAME: &str = "observer.ingress.vlan.name";

    /// Network zone of incoming traffic as reported by the observer to categorize the source area of ingress traffic. e.g. internal, External, DMZ, HR, Legal, etc.
    ///
    /// # Examples
    ///
    /// - `DMZ`
    pub const OBSERVER_INGRESS_ZONE: &str = "observer.ingress.zone";

    /// IP addresses of the observer.
    pub const OBSERVER_IP: &str = "observer.ip";

    /// MAC addresses of the observer.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `["00-00-5E-00-53-23", "00-00-5E-00-53-24"]`
    pub const OBSERVER_MAC: &str = "observer.mac";

    /// Custom name of the observer.
    /// This is a name that can be given to an observer. This can be helpful for example if multiple firewalls of the same model are used in an organization.
    /// If no custom name is needed, the field can be left empty.
    ///
    /// # Examples
    ///
    /// - `1_proxySG`
    pub const OBSERVER_NAME: &str = "observer.name";

    /// OS family (such as redhat, debian, freebsd, windows).
    ///
    /// # Examples
    ///
    /// - `debian`
    pub const OBSERVER_OS_FAMILY: &str = "observer.os.family";

    /// Operating system name, including the version or code name.
    ///
    /// # Examples
    ///
    /// - `Mac OS Mojave`
    pub const OBSERVER_OS_FULL: &str = "observer.os.full";

    /// Operating system kernel version as a raw string.
    ///
    /// # Examples
    ///
    /// - `4.4.0-112-generic`
    pub const OBSERVER_OS_KERNEL: &str = "observer.os.kernel";

    /// Operating system name, without the version.
    ///
    /// # Examples
    ///
    /// - `Mac OS X`
    pub const OBSERVER_OS_NAME: &str = "observer.os.name";

    /// Operating system platform (such centos, ubuntu, windows).
    ///
    /// # Examples
    ///
    /// - `darwin`
    pub const OBSERVER_OS_PLATFORM: &str = "observer.os.platform";

    /// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
    /// One of these following values should be used (lowercase): linux, macos, unix, windows.
    /// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
    ///
    /// # Examples
    ///
    /// - `macos`
    pub const OBSERVER_OS_TYPE: &str = "observer.os.type";

    /// Operating system version as a raw string.
    ///
    /// # Examples
    ///
    /// - `10.14.1`
    pub const OBSERVER_OS_VERSION: &str = "observer.os.version";

    /// The product name of the observer.
    ///
    /// # Examples
    ///
    /// - `s200`
    pub const OBSERVER_PRODUCT: &str = "observer.product";

    /// Observer serial number.
    pub const OBSERVER_SERIAL_NUMBER: &str = "observer.serial_number";

    /// The type of the observer the data is coming from.
    /// There is no predefined list of observer types. Some examples are `forwarder`, `firewall`, `ids`, `ips`, `proxy`, `poller`, `sensor`, `APM server`.
    ///
    /// # Examples
    ///
    /// - `firewall`
    pub const OBSERVER_TYPE: &str = "observer.type";

    /// Vendor name of the observer.
    ///
    /// # Examples
    ///
    /// - `Symantec`
    pub const OBSERVER_VENDOR: &str = "observer.vendor";

    /// Observer version.
    pub const OBSERVER_VERSION: &str = "observer.version";
}

/// Fields that describe the resources which container orchestrators manage or act upon.
pub mod orchestrator {

    /// API version being used to carry out the action
    ///
    /// # Examples
    ///
    /// - `v1beta1`
    pub const ORCHESTRATOR_API_VERSION: &str = "orchestrator.api_version";

    /// Name of the cluster.
    pub const ORCHESTRATOR_CLUSTER_NAME: &str = "orchestrator.cluster.name";

    /// URL of the API used to manage the cluster.
    pub const ORCHESTRATOR_CLUSTER_URL: &str = "orchestrator.cluster.url";

    /// The version of the cluster.
    pub const ORCHESTRATOR_CLUSTER_VERSION: &str = "orchestrator.cluster.version";

    /// Namespace in which the action is taking place.
    ///
    /// # Examples
    ///
    /// - `kube-system`
    pub const ORCHESTRATOR_NAMESPACE: &str = "orchestrator.namespace";

    /// Organization affected by the event (for multi-tenant orchestrator setups).
    ///
    /// # Examples
    ///
    /// - `elastic`
    pub const ORCHESTRATOR_ORGANIZATION: &str = "orchestrator.organization";

    /// Name of the resource being acted upon.
    ///
    /// # Examples
    ///
    /// - `test-pod-cdcws`
    pub const ORCHESTRATOR_RESOURCE_NAME: &str = "orchestrator.resource.name";

    /// Type of resource being acted upon.
    ///
    /// # Examples
    ///
    /// - `service`
    pub const ORCHESTRATOR_RESOURCE_TYPE: &str = "orchestrator.resource.type";

    /// Orchestrator cluster type (e.g. kubernetes, nomad or cloudfoundry).
    ///
    /// # Examples
    ///
    /// - `kubernetes`
    pub const ORCHESTRATOR_TYPE: &str = "orchestrator.type";
}

/// The organization fields enrich data with information about the company or entity the data is associated with.

/// These fields help you arrange or filter data stored in an index by one or multiple organizations.
pub mod organization {

    /// Unique identifier for the organization.
    pub const ORGANIZATION_ID: &str = "organization.id";

    /// Organization name.
    pub const ORGANIZATION_NAME: &str = "organization.name";
}

/// The OS fields contain information about the operating system.
pub mod os {

    /// OS family (such as redhat, debian, freebsd, windows).
    ///
    /// # Examples
    ///
    /// - `debian`
    pub const OS_FAMILY: &str = "os.family";

    /// Operating system name, including the version or code name.
    ///
    /// # Examples
    ///
    /// - `Mac OS Mojave`
    pub const OS_FULL: &str = "os.full";

    /// Operating system kernel version as a raw string.
    ///
    /// # Examples
    ///
    /// - `4.4.0-112-generic`
    pub const OS_KERNEL: &str = "os.kernel";

    /// Operating system name, without the version.
    ///
    /// # Examples
    ///
    /// - `Mac OS X`
    pub const OS_NAME: &str = "os.name";

    /// Operating system platform (such centos, ubuntu, windows).
    ///
    /// # Examples
    ///
    /// - `darwin`
    pub const OS_PLATFORM: &str = "os.platform";

    /// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
    /// One of these following values should be used (lowercase): linux, macos, unix, windows.
    /// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
    ///
    /// # Examples
    ///
    /// - `macos`
    pub const OS_TYPE: &str = "os.type";

    /// Operating system version as a raw string.
    ///
    /// # Examples
    ///
    /// - `10.14.1`
    pub const OS_VERSION: &str = "os.version";
}

/// These fields contain information about an installed software package. It contains general information about a package, such as name, version or size. It also contains installation details, such as time or location.
pub mod package {

    /// Package architecture.
    ///
    /// # Examples
    ///
    /// - `x86_64`
    pub const PACKAGE_ARCHITECTURE: &str = "package.architecture";

    /// Additional information about the build version of the installed package.
    /// For example use the commit SHA of a non-released package.
    ///
    /// # Examples
    ///
    /// - `36f4f7e89dd61b0988b12ee000b98966867710cd`
    pub const PACKAGE_BUILD_VERSION: &str = "package.build_version";

    /// Checksum of the installed package for verification.
    ///
    /// # Examples
    ///
    /// - `68b329da9893e34099c7d8ad5cb9c940`
    pub const PACKAGE_CHECKSUM: &str = "package.checksum";

    /// Description of the package.
    ///
    /// # Examples
    ///
    /// - `Open source programming language to build simple/reliable/efficient software.`
    pub const PACKAGE_DESCRIPTION: &str = "package.description";

    /// Indicating how the package was installed, e.g. user-local, global.
    ///
    /// # Examples
    ///
    /// - `global`
    pub const PACKAGE_INSTALL_SCOPE: &str = "package.install_scope";

    /// Time when package was installed.
    pub const PACKAGE_INSTALLED: &str = "package.installed";

    /// License under which the package was released.
    /// Use a short name, e.g. the license identifier from SPDX License List where possible (https://spdx.org/licenses/).
    ///
    /// # Examples
    ///
    /// - `Apache License 2.0`
    pub const PACKAGE_LICENSE: &str = "package.license";

    /// Package name
    ///
    /// # Examples
    ///
    /// - `go`
    pub const PACKAGE_NAME: &str = "package.name";

    /// Path where the package is installed.
    ///
    /// # Examples
    ///
    /// - `/usr/local/Cellar/go/1.12.9/`
    pub const PACKAGE_PATH: &str = "package.path";

    /// Home page or reference URL of the software in this package, if available.
    ///
    /// # Examples
    ///
    /// - `https://golang.org`
    pub const PACKAGE_REFERENCE: &str = "package.reference";

    /// Package size in bytes.
    ///
    /// # Examples
    ///
    /// - `62231`
    pub const PACKAGE_SIZE: &str = "package.size";

    /// Type of package.
    /// This should contain the package file type, rather than the package manager name. Examples: rpm, dpkg, brew, npm, gem, nupkg, jar.
    ///
    /// # Examples
    ///
    /// - `rpm`
    pub const PACKAGE_TYPE: &str = "package.type";

    /// Package version
    ///
    /// # Examples
    ///
    /// - `1.12.9`
    pub const PACKAGE_VERSION: &str = "package.version";
}

/// These fields contain Windows Portable Executable (PE) metadata.
pub mod pe {

    /// CPU architecture target for the file.
    ///
    /// # Examples
    ///
    /// - `x64`
    pub const PE_ARCHITECTURE: &str = "pe.architecture";

    /// Internal company name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const PE_COMPANY: &str = "pe.company";

    /// Internal description of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Paint`
    pub const PE_DESCRIPTION: &str = "pe.description";

    /// Internal version of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `6.3.9600.17415`
    pub const PE_FILE_VERSION: &str = "pe.file_version";

    /// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
    /// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
    ///
    /// # Examples
    ///
    /// - `0c6803c4e922103c4dca5963aad36ddf`
    pub const PE_IMPHASH: &str = "pe.imphash";

    /// Internal name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `MSPAINT.EXE`
    pub const PE_ORIGINAL_FILE_NAME: &str = "pe.original_file_name";

    /// Internal product name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft® Windows® Operating System`
    pub const PE_PRODUCT: &str = "pe.product";
}

/// These fields contain information about a process.

/// These fields can help you correlate metrics information with a process id/name from a log message.  The `process.pid` often stays in the metric itself and is copied to the global field for correlation.
pub mod process {

    /// Array of process arguments, starting with the absolute path to the executable.
    /// May be filtered to protect sensitive information.
    ///
    /// # Examples
    ///
    /// - `["/usr/bin/ssh", "-l", "user", "10.0.0.16"]`
    pub const PROCESS_ARGS: &str = "process.args";

    /// Length of the process.args array.
    /// This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.
    ///
    /// # Examples
    ///
    /// - `4`
    pub const PROCESS_ARGS_COUNT: &str = "process.args_count";

    /// Boolean to capture if a signature is present.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_CODE_SIGNATURE_EXISTS: &str = "process.code_signature.exists";

    /// The identifier used to sign the process.
    /// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `com.apple.xpc.proxy`
    pub const PROCESS_CODE_SIGNATURE_SIGNING_ID: &str = "process.code_signature.signing_id";

    /// Additional information about the certificate status.
    /// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `ERROR_UNTRUSTED_ROOT`
    pub const PROCESS_CODE_SIGNATURE_STATUS: &str = "process.code_signature.status";

    /// Subject name of the code signer
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const PROCESS_CODE_SIGNATURE_SUBJECT_NAME: &str = "process.code_signature.subject_name";

    /// The team identifier used to sign the process.
    /// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `EQHXZ8M8AV`
    pub const PROCESS_CODE_SIGNATURE_TEAM_ID: &str = "process.code_signature.team_id";

    /// Stores the trust status of the certificate chain.
    /// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_CODE_SIGNATURE_TRUSTED: &str = "process.code_signature.trusted";

    /// Boolean to capture if the digital signature is verified against the binary content.
    /// Leave unpopulated if a certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_CODE_SIGNATURE_VALID: &str = "process.code_signature.valid";

    /// Full command line that started the process, including the absolute path to the executable, and all arguments.
    /// Some arguments may be filtered to protect sensitive information.
    ///
    /// # Examples
    ///
    /// - `/usr/bin/ssh -l user 10.0.0.16`
    pub const PROCESS_COMMAND_LINE: &str = "process.command_line";

    /// Unique identifier for the process.
    /// The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process.
    /// Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts.
    ///
    /// # Examples
    ///
    /// - `c2c455d9f99375d`
    pub const PROCESS_ENTITY_ID: &str = "process.entity_id";

    /// Absolute path to the process executable.
    ///
    /// # Examples
    ///
    /// - `/usr/bin/ssh`
    pub const PROCESS_EXECUTABLE: &str = "process.executable";

    /// The exit code of the process, if this is a termination event.
    /// The field should be absent if there is no exit code for the event (e.g. process start).
    ///
    /// # Examples
    ///
    /// - `137`
    pub const PROCESS_EXIT_CODE: &str = "process.exit_code";

    /// MD5 hash.
    pub const PROCESS_HASH_MD5: &str = "process.hash.md5";

    /// SHA1 hash.
    pub const PROCESS_HASH_SHA1: &str = "process.hash.sha1";

    /// SHA256 hash.
    pub const PROCESS_HASH_SHA256: &str = "process.hash.sha256";

    /// SHA512 hash.
    pub const PROCESS_HASH_SHA512: &str = "process.hash.sha512";

    /// SSDEEP hash.
    pub const PROCESS_HASH_SSDEEP: &str = "process.hash.ssdeep";

    /// Process name.
    /// Sometimes called program name or similar.
    ///
    /// # Examples
    ///
    /// - `ssh`
    pub const PROCESS_NAME: &str = "process.name";

    /// Array of process arguments, starting with the absolute path to the executable.
    /// May be filtered to protect sensitive information.
    ///
    /// # Examples
    ///
    /// - `["/usr/bin/ssh", "-l", "user", "10.0.0.16"]`
    pub const PROCESS_PARENT_ARGS: &str = "process.parent.args";

    /// Length of the process.args array.
    /// This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.
    ///
    /// # Examples
    ///
    /// - `4`
    pub const PROCESS_PARENT_ARGS_COUNT: &str = "process.parent.args_count";

    /// Boolean to capture if a signature is present.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_PARENT_CODE_SIGNATURE_EXISTS: &str = "process.parent.code_signature.exists";

    /// The identifier used to sign the process.
    /// This is used to identify the application manufactured by a software vendor. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `com.apple.xpc.proxy`
    pub const PROCESS_PARENT_CODE_SIGNATURE_SIGNING_ID: &str =
        "process.parent.code_signature.signing_id";

    /// Additional information about the certificate status.
    /// This is useful for logging cryptographic errors with the certificate validity or trust status. Leave unpopulated if the validity or trust of the certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `ERROR_UNTRUSTED_ROOT`
    pub const PROCESS_PARENT_CODE_SIGNATURE_STATUS: &str = "process.parent.code_signature.status";

    /// Subject name of the code signer
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const PROCESS_PARENT_CODE_SIGNATURE_SUBJECT_NAME: &str =
        "process.parent.code_signature.subject_name";

    /// The team identifier used to sign the process.
    /// This is used to identify the team or vendor of a software product. The field is relevant to Apple *OS only.
    ///
    /// # Examples
    ///
    /// - `EQHXZ8M8AV`
    pub const PROCESS_PARENT_CODE_SIGNATURE_TEAM_ID: &str = "process.parent.code_signature.team_id";

    /// Stores the trust status of the certificate chain.
    /// Validating the trust of the certificate chain may be complicated, and this field should only be populated by tools that actively check the status.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_PARENT_CODE_SIGNATURE_TRUSTED: &str = "process.parent.code_signature.trusted";

    /// Boolean to capture if the digital signature is verified against the binary content.
    /// Leave unpopulated if a certificate was unchecked.
    ///
    /// # Examples
    ///
    /// - `true`
    pub const PROCESS_PARENT_CODE_SIGNATURE_VALID: &str = "process.parent.code_signature.valid";

    /// Full command line that started the process, including the absolute path to the executable, and all arguments.
    /// Some arguments may be filtered to protect sensitive information.
    ///
    /// # Examples
    ///
    /// - `/usr/bin/ssh -l user 10.0.0.16`
    pub const PROCESS_PARENT_COMMAND_LINE: &str = "process.parent.command_line";

    /// Unique identifier for the process.
    /// The implementation of this is specified by the data source, but some examples of what could be used here are a process-generated UUID, Sysmon Process GUIDs, or a hash of some uniquely identifying components of a process.
    /// Constructing a globally unique identifier is a common practice to mitigate PID reuse as well as to identify a specific process over time, across multiple monitored hosts.
    ///
    /// # Examples
    ///
    /// - `c2c455d9f99375d`
    pub const PROCESS_PARENT_ENTITY_ID: &str = "process.parent.entity_id";

    /// Absolute path to the process executable.
    ///
    /// # Examples
    ///
    /// - `/usr/bin/ssh`
    pub const PROCESS_PARENT_EXECUTABLE: &str = "process.parent.executable";

    /// The exit code of the process, if this is a termination event.
    /// The field should be absent if there is no exit code for the event (e.g. process start).
    ///
    /// # Examples
    ///
    /// - `137`
    pub const PROCESS_PARENT_EXIT_CODE: &str = "process.parent.exit_code";

    /// MD5 hash.
    pub const PROCESS_PARENT_HASH_MD5: &str = "process.parent.hash.md5";

    /// SHA1 hash.
    pub const PROCESS_PARENT_HASH_SHA1: &str = "process.parent.hash.sha1";

    /// SHA256 hash.
    pub const PROCESS_PARENT_HASH_SHA256: &str = "process.parent.hash.sha256";

    /// SHA512 hash.
    pub const PROCESS_PARENT_HASH_SHA512: &str = "process.parent.hash.sha512";

    /// SSDEEP hash.
    pub const PROCESS_PARENT_HASH_SSDEEP: &str = "process.parent.hash.ssdeep";

    /// Process name.
    /// Sometimes called program name or similar.
    ///
    /// # Examples
    ///
    /// - `ssh`
    pub const PROCESS_PARENT_NAME: &str = "process.parent.name";

    /// CPU architecture target for the file.
    ///
    /// # Examples
    ///
    /// - `x64`
    pub const PROCESS_PARENT_PE_ARCHITECTURE: &str = "process.parent.pe.architecture";

    /// Internal company name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const PROCESS_PARENT_PE_COMPANY: &str = "process.parent.pe.company";

    /// Internal description of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Paint`
    pub const PROCESS_PARENT_PE_DESCRIPTION: &str = "process.parent.pe.description";

    /// Internal version of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `6.3.9600.17415`
    pub const PROCESS_PARENT_PE_FILE_VERSION: &str = "process.parent.pe.file_version";

    /// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
    /// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
    ///
    /// # Examples
    ///
    /// - `0c6803c4e922103c4dca5963aad36ddf`
    pub const PROCESS_PARENT_PE_IMPHASH: &str = "process.parent.pe.imphash";

    /// Internal name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `MSPAINT.EXE`
    pub const PROCESS_PARENT_PE_ORIGINAL_FILE_NAME: &str = "process.parent.pe.original_file_name";

    /// Internal product name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft® Windows® Operating System`
    pub const PROCESS_PARENT_PE_PRODUCT: &str = "process.parent.pe.product";

    /// Identifier of the group of processes the process belongs to.
    pub const PROCESS_PARENT_PGID: &str = "process.parent.pgid";

    /// Process id.
    ///
    /// # Examples
    ///
    /// - `4242`
    pub const PROCESS_PARENT_PID: &str = "process.parent.pid";

    /// Parent process' pid.
    ///
    /// # Examples
    ///
    /// - `4241`
    pub const PROCESS_PARENT_PPID: &str = "process.parent.ppid";

    /// The time the process started.
    ///
    /// # Examples
    ///
    /// - `2016-05-23T08:05:34.853Z`
    pub const PROCESS_PARENT_START: &str = "process.parent.start";

    /// Thread ID.
    ///
    /// # Examples
    ///
    /// - `4242`
    pub const PROCESS_PARENT_THREAD_ID: &str = "process.parent.thread.id";

    /// Thread name.
    ///
    /// # Examples
    ///
    /// - `thread-0`
    pub const PROCESS_PARENT_THREAD_NAME: &str = "process.parent.thread.name";

    /// Process title.
    /// The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened.
    pub const PROCESS_PARENT_TITLE: &str = "process.parent.title";

    /// Seconds the process has been up.
    ///
    /// # Examples
    ///
    /// - `1325`
    pub const PROCESS_PARENT_UPTIME: &str = "process.parent.uptime";

    /// The working directory of the process.
    ///
    /// # Examples
    ///
    /// - `/home/alice`
    pub const PROCESS_PARENT_WORKING_DIRECTORY: &str = "process.parent.working_directory";

    /// CPU architecture target for the file.
    ///
    /// # Examples
    ///
    /// - `x64`
    pub const PROCESS_PE_ARCHITECTURE: &str = "process.pe.architecture";

    /// Internal company name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft Corporation`
    pub const PROCESS_PE_COMPANY: &str = "process.pe.company";

    /// Internal description of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Paint`
    pub const PROCESS_PE_DESCRIPTION: &str = "process.pe.description";

    /// Internal version of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `6.3.9600.17415`
    pub const PROCESS_PE_FILE_VERSION: &str = "process.pe.file_version";

    /// A hash of the imports in a PE file. An imphash -- or import hash -- can be used to fingerprint binaries even after recompilation or other code-level transformations have occurred, which would change more traditional hash values.
    /// Learn more at https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html.
    ///
    /// # Examples
    ///
    /// - `0c6803c4e922103c4dca5963aad36ddf`
    pub const PROCESS_PE_IMPHASH: &str = "process.pe.imphash";

    /// Internal name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `MSPAINT.EXE`
    pub const PROCESS_PE_ORIGINAL_FILE_NAME: &str = "process.pe.original_file_name";

    /// Internal product name of the file, provided at compile-time.
    ///
    /// # Examples
    ///
    /// - `Microsoft® Windows® Operating System`
    pub const PROCESS_PE_PRODUCT: &str = "process.pe.product";

    /// Identifier of the group of processes the process belongs to.
    pub const PROCESS_PGID: &str = "process.pgid";

    /// Process id.
    ///
    /// # Examples
    ///
    /// - `4242`
    pub const PROCESS_PID: &str = "process.pid";

    /// Parent process' pid.
    ///
    /// # Examples
    ///
    /// - `4241`
    pub const PROCESS_PPID: &str = "process.ppid";

    /// The time the process started.
    ///
    /// # Examples
    ///
    /// - `2016-05-23T08:05:34.853Z`
    pub const PROCESS_START: &str = "process.start";

    /// Thread ID.
    ///
    /// # Examples
    ///
    /// - `4242`
    pub const PROCESS_THREAD_ID: &str = "process.thread.id";

    /// Thread name.
    ///
    /// # Examples
    ///
    /// - `thread-0`
    pub const PROCESS_THREAD_NAME: &str = "process.thread.name";

    /// Process title.
    /// The proctitle, some times the same as process name. Can also be different: for example a browser setting its title to the web page currently opened.
    pub const PROCESS_TITLE: &str = "process.title";

    /// Seconds the process has been up.
    ///
    /// # Examples
    ///
    /// - `1325`
    pub const PROCESS_UPTIME: &str = "process.uptime";

    /// The working directory of the process.
    ///
    /// # Examples
    ///
    /// - `/home/alice`
    pub const PROCESS_WORKING_DIRECTORY: &str = "process.working_directory";
}

/// Fields related to Windows Registry operations.
pub mod registry {

    /// Original bytes written with base64 encoding.
    /// For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by `lp_data`. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.
    ///
    /// # Examples
    ///
    /// - `ZQBuAC0AVQBTAAAAZQBuAAAAAAA=`
    pub const REGISTRY_DATA_BYTES: &str = "registry.data.bytes";

    /// Content when writing string types.
    /// Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g `"1"`).
    ///
    /// # Examples
    ///
    /// - `["C:\rta\red_ttp\bin\myapp.exe"]`
    pub const REGISTRY_DATA_STRINGS: &str = "registry.data.strings";

    /// Standard registry type for encoding contents
    ///
    /// # Examples
    ///
    /// - `REG_SZ`
    pub const REGISTRY_DATA_TYPE: &str = "registry.data.type";

    /// Abbreviated name for the hive.
    ///
    /// # Examples
    ///
    /// - `HKLM`
    pub const REGISTRY_HIVE: &str = "registry.hive";

    /// Hive-relative path of keys.
    ///
    /// # Examples
    ///
    /// - `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe`
    pub const REGISTRY_KEY: &str = "registry.key";

    /// Full path, including hive, key and value
    ///
    /// # Examples
    ///
    /// - `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger`
    pub const REGISTRY_PATH: &str = "registry.path";

    /// Name of the value written.
    ///
    /// # Examples
    ///
    /// - `Debugger`
    pub const REGISTRY_VALUE: &str = "registry.value";
}

/// This field set is meant to facilitate pivoting around a piece of data.

/// Some pieces of information can be seen in many places in an ECS event. To facilitate searching for them, store an array of all seen values to their corresponding field in `related.`.

/// A concrete example is IP addresses, which can be under host, observer, source, destination, client, server, and network.forwarded_ip. If you append all IPs to `related.ip`, you can then search for a given IP trivially, no matter where it appeared, by querying `related.ip:192.0.2.15`.
pub mod related {

    /// All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search).
    pub const RELATED_HASH: &str = "related.hash";

    /// All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases.
    pub const RELATED_HOSTS: &str = "related.hosts";

    /// All of the IPs seen on your event.
    pub const RELATED_IP: &str = "related.ip";

    /// All the user names seen on your event.
    pub const RELATED_USER: &str = "related.user";
}

/// Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other notable events.

/// Examples of data sources that would populate the rule fields include: network admission control platforms, network or host IDS/IPS, network firewalls, web application firewalls, url filters, endpoint detection and response (EDR) systems, etc.
pub mod rule {

    /// Name, organization, or pseudonym of the author or authors who created the rule used to generate this event.
    ///
    /// # Examples
    ///
    /// - `["Star-Lord"]`
    pub const RULE_AUTHOR: &str = "rule.author";

    /// A categorization value keyword used by the entity using the rule for detection of this event.
    ///
    /// # Examples
    ///
    /// - `Attempted Information Leak`
    pub const RULE_CATEGORY: &str = "rule.category";

    /// The description of the rule generating the event.
    ///
    /// # Examples
    ///
    /// - `Block requests to public DNS over HTTPS / TLS protocols`
    pub const RULE_DESCRIPTION: &str = "rule.description";

    /// A rule ID that is unique within the scope of an agent, observer, or other entity using the rule for detection of this event.
    ///
    /// # Examples
    ///
    /// - `101`
    pub const RULE_ID: &str = "rule.id";

    /// Name of the license under which the rule used to generate this event is made available.
    ///
    /// # Examples
    ///
    /// - `Apache 2.0`
    pub const RULE_LICENSE: &str = "rule.license";

    /// The name of the rule or signature generating the event.
    ///
    /// # Examples
    ///
    /// - `BLOCK_DNS_over_TLS`
    pub const RULE_NAME: &str = "rule.name";

    /// Reference URL to additional information about the rule used to generate this event.
    /// The URL can point to the vendor's documentation about the rule. If that's not available, it can also be a link to a more general page describing this type of alert.
    ///
    /// # Examples
    ///
    /// - `https://en.wikipedia.org/wiki/DNS_over_TLS`
    pub const RULE_REFERENCE: &str = "rule.reference";

    /// Name of the ruleset, policy, group, or parent category in which the rule used to generate this event is a member.
    ///
    /// # Examples
    ///
    /// - `Standard_Protocol_Filters`
    pub const RULE_RULESET: &str = "rule.ruleset";

    /// A rule ID that is unique within the scope of a set or group of agents, observers, or other entities using the rule for detection of this event.
    ///
    /// # Examples
    ///
    /// - `1100110011`
    pub const RULE_UUID: &str = "rule.uuid";

    /// The version / revision of the rule being used for analysis.
    ///
    /// # Examples
    ///
    /// - `1.1`
    pub const RULE_VERSION: &str = "rule.version";
}

/// A Server is defined as the responder in a network connection for events regarding sessions, connections, or bidirectional flow records.

/// For TCP events, the server is the receiver of the initial SYN packet(s) of the TCP connection. For other protocols, the server is generally the responder in the network transaction. Some systems actually use the term "responder" to refer the server in TCP connections. The server fields describe details about the system acting as the server in the network event. Server fields are usually populated in conjunction with client fields. Server fields are generally not populated for packet-level events.

/// Client / server representations can add semantic context to an exchange, which is helpful to visualize the data in certain situations. If your context falls in that category, you should still ensure that source and destination are filled appropriately.
pub mod server {

    /// Some event server addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket.  You should always store the raw address in the `.address` field.
    /// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
    pub const SERVER_ADDRESS: &str = "server.address";

    /// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
    ///
    /// # Examples
    ///
    /// - `15169`
    pub const SERVER_AS_NUMBER: &str = "server.as.number";

    /// Organization name.
    ///
    /// # Examples
    ///
    /// - `Google LLC`
    pub const SERVER_AS_ORGANIZATION_NAME: &str = "server.as.organization.name";

    /// Bytes sent from the server to the client.
    ///
    /// # Examples
    ///
    /// - `184`
    pub const SERVER_BYTES: &str = "server.bytes";

    /// Server domain.
    pub const SERVER_DOMAIN: &str = "server.domain";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const SERVER_GEO_CITY_NAME: &str = "server.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const SERVER_GEO_CONTINENT_CODE: &str = "server.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const SERVER_GEO_CONTINENT_NAME: &str = "server.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const SERVER_GEO_COUNTRY_ISO_CODE: &str = "server.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const SERVER_GEO_COUNTRY_NAME: &str = "server.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const SERVER_GEO_LOCATION: &str = "server.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const SERVER_GEO_NAME: &str = "server.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const SERVER_GEO_POSTAL_CODE: &str = "server.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const SERVER_GEO_REGION_ISO_CODE: &str = "server.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const SERVER_GEO_REGION_NAME: &str = "server.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const SERVER_GEO_TIMEZONE: &str = "server.geo.timezone";

    /// IP address of the server (IPv4 or IPv6).
    pub const SERVER_IP: &str = "server.ip";

    /// MAC address of the server.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `00-00-5E-00-53-23`
    pub const SERVER_MAC: &str = "server.mac";

    /// Translated ip of destination based NAT sessions (e.g. internet to private DMZ)
    /// Typically used with load balancers, firewalls, or routers.
    pub const SERVER_NAT_IP: &str = "server.nat.ip";

    /// Translated port of destination based NAT sessions (e.g. internet to private DMZ)
    /// Typically used with load balancers, firewalls, or routers.
    pub const SERVER_NAT_PORT: &str = "server.nat.port";

    /// Packets sent from the server to the client.
    ///
    /// # Examples
    ///
    /// - `12`
    pub const SERVER_PACKETS: &str = "server.packets";

    /// Port of the server.
    pub const SERVER_PORT: &str = "server.port";

    /// The highest registered server domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const SERVER_REGISTERED_DOMAIN: &str = "server.registered_domain";

    /// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.  In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
    /// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `east`
    pub const SERVER_SUBDOMAIN: &str = "server.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const SERVER_TOP_LEVEL_DOMAIN: &str = "server.top_level_domain";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const SERVER_USER_DOMAIN: &str = "server.user.domain";

    /// User email address.
    pub const SERVER_USER_EMAIL: &str = "server.user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const SERVER_USER_FULL_NAME: &str = "server.user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const SERVER_USER_GROUP_DOMAIN: &str = "server.user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const SERVER_USER_GROUP_ID: &str = "server.user.group.id";

    /// Name of the group.
    pub const SERVER_USER_GROUP_NAME: &str = "server.user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const SERVER_USER_HASH: &str = "server.user.hash";

    /// Unique identifier of the user.
    pub const SERVER_USER_ID: &str = "server.user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const SERVER_USER_NAME: &str = "server.user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const SERVER_USER_ROLES: &str = "server.user.roles";
}

/// The service fields describe the service for or from which the data was collected.

/// These fields help you find and correlate logs for a specific service and version.
pub mod service {

    /// Ephemeral identifier of this service (if one exists).
    /// This id normally changes across restarts, but `service.id` does not.
    ///
    /// # Examples
    ///
    /// - `8a4f500f`
    pub const SERVICE_EPHEMERAL_ID: &str = "service.ephemeral_id";

    /// Unique identifier of the running service. If the service is comprised of many nodes, the `service.id` should be the same for all nodes.
    /// This id should uniquely identify the service. This makes it possible to correlate logs and metrics for one specific service, no matter which particular node emitted the event.
    /// Note that if you need to see the events from one specific host of the service, you should filter on that `host.name` or `host.id` instead.
    ///
    /// # Examples
    ///
    /// - `d37e5ebfe0ae6c4972dbe9f0174a1637bb8247f6`
    pub const SERVICE_ID: &str = "service.id";

    /// Name of the service data is collected from.
    /// The name of the service is normally user given. This allows for distributed services that run on multiple hosts to correlate the related instances based on the name.
    /// In the case of Elasticsearch the `service.name` could contain the cluster name. For Beats the `service.name` is by default a copy of the `service.type` field if no name is specified.
    ///
    /// # Examples
    ///
    /// - `elasticsearch-metrics`
    pub const SERVICE_NAME: &str = "service.name";

    /// Name of a service node.
    /// This allows for two nodes of the same service running on the same host to be differentiated. Therefore, `service.node.name` should typically be unique across nodes of a given service.
    /// In the case of Elasticsearch, the `service.node.name` could contain the unique node name within the Elasticsearch cluster. In cases where the service doesn't have the concept of a node name, the host name or container name can be used to distinguish running instances that make up this service. If those do not provide uniqueness (e.g. multiple instances of the service running on the same host) - the node name can be manually set.
    ///
    /// # Examples
    ///
    /// - `instance-0000000016`
    pub const SERVICE_NODE_NAME: &str = "service.node.name";

    /// Current state of the service.
    pub const SERVICE_STATE: &str = "service.state";

    /// The type of the service data is collected from.
    /// The type can be used to group and correlate logs and metrics from one service type.
    /// Example: If logs or metrics are collected from Elasticsearch, `service.type` would be `elasticsearch`.
    ///
    /// # Examples
    ///
    /// - `elasticsearch`
    pub const SERVICE_TYPE: &str = "service.type";

    /// Version of the service the data was collected from.
    /// This allows to look at a data set only for a specific version of a service.
    ///
    /// # Examples
    ///
    /// - `3.2.4`
    pub const SERVICE_VERSION: &str = "service.version";
}

/// Source fields capture details about the sender of a network exchange/packet. These fields are populated from a network event, packet, or other event containing details of a network transaction.

/// Source fields are usually populated in conjunction with destination fields. The source and destination fields are considered the baseline and should always be filled if an event contains source and destination details from a network transaction. If the event also contains identification of the client and server roles, then the client and server fields should also be populated.
pub mod source {

    /// Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket.  You should always store the raw address in the `.address` field.
    /// Then it should be duplicated to `.ip` or `.domain`, depending on which one it is.
    pub const SOURCE_ADDRESS: &str = "source.address";

    /// Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.
    ///
    /// # Examples
    ///
    /// - `15169`
    pub const SOURCE_AS_NUMBER: &str = "source.as.number";

    /// Organization name.
    ///
    /// # Examples
    ///
    /// - `Google LLC`
    pub const SOURCE_AS_ORGANIZATION_NAME: &str = "source.as.organization.name";

    /// Bytes sent from the source to the destination.
    ///
    /// # Examples
    ///
    /// - `184`
    pub const SOURCE_BYTES: &str = "source.bytes";

    /// Source domain.
    pub const SOURCE_DOMAIN: &str = "source.domain";

    /// City name.
    ///
    /// # Examples
    ///
    /// - `Montreal`
    pub const SOURCE_GEO_CITY_NAME: &str = "source.geo.city_name";

    /// Two-letter code representing continent's name.
    ///
    /// # Examples
    ///
    /// - `NA`
    pub const SOURCE_GEO_CONTINENT_CODE: &str = "source.geo.continent_code";

    /// Name of the continent.
    ///
    /// # Examples
    ///
    /// - `North America`
    pub const SOURCE_GEO_CONTINENT_NAME: &str = "source.geo.continent_name";

    /// Country ISO code.
    ///
    /// # Examples
    ///
    /// - `CA`
    pub const SOURCE_GEO_COUNTRY_ISO_CODE: &str = "source.geo.country_iso_code";

    /// Country name.
    ///
    /// # Examples
    ///
    /// - `Canada`
    pub const SOURCE_GEO_COUNTRY_NAME: &str = "source.geo.country_name";

    /// Longitude and latitude.
    ///
    /// # Examples
    ///
    /// - `{ "lon": -73.614830, "lat": 45.505918 }`
    pub const SOURCE_GEO_LOCATION: &str = "source.geo.location";

    /// User-defined description of a location, at the level of granularity they care about.
    /// Could be the name of their data centers, the floor number, if this describes a local physical entity, city names.
    /// Not typically used in automated geolocation.
    ///
    /// # Examples
    ///
    /// - `boston-dc`
    pub const SOURCE_GEO_NAME: &str = "source.geo.name";

    /// Postal code associated with the location.
    /// Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.
    ///
    /// # Examples
    ///
    /// - `94040`
    pub const SOURCE_GEO_POSTAL_CODE: &str = "source.geo.postal_code";

    /// Region ISO code.
    ///
    /// # Examples
    ///
    /// - `CA-QC`
    pub const SOURCE_GEO_REGION_ISO_CODE: &str = "source.geo.region_iso_code";

    /// Region name.
    ///
    /// # Examples
    ///
    /// - `Quebec`
    pub const SOURCE_GEO_REGION_NAME: &str = "source.geo.region_name";

    /// The time zone of the location, such as IANA time zone name.
    ///
    /// # Examples
    ///
    /// - `America/Argentina/Buenos_Aires`
    pub const SOURCE_GEO_TIMEZONE: &str = "source.geo.timezone";

    /// IP address of the source (IPv4 or IPv6).
    pub const SOURCE_IP: &str = "source.ip";

    /// MAC address of the source.
    /// The notation format from RFC 7042 is suggested: Each octet (that is, 8-bit byte) is represented by two [uppercase] hexadecimal digits giving the value of the octet as an unsigned integer. Successive octets are separated by a hyphen.
    ///
    /// # Examples
    ///
    /// - `00-00-5E-00-53-23`
    pub const SOURCE_MAC: &str = "source.mac";

    /// Translated ip of source based NAT sessions (e.g. internal client to internet)
    /// Typically connections traversing load balancers, firewalls, or routers.
    pub const SOURCE_NAT_IP: &str = "source.nat.ip";

    /// Translated port of source based NAT sessions. (e.g. internal client to internet)
    /// Typically used with load balancers, firewalls, or routers.
    pub const SOURCE_NAT_PORT: &str = "source.nat.port";

    /// Packets sent from the source to the destination.
    ///
    /// # Examples
    ///
    /// - `12`
    pub const SOURCE_PACKETS: &str = "source.packets";

    /// Port of the source.
    pub const SOURCE_PORT: &str = "source.port";

    /// The highest registered source domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const SOURCE_REGISTERED_DOMAIN: &str = "source.registered_domain";

    /// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.  In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
    /// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `east`
    pub const SOURCE_SUBDOMAIN: &str = "source.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const SOURCE_TOP_LEVEL_DOMAIN: &str = "source.top_level_domain";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const SOURCE_USER_DOMAIN: &str = "source.user.domain";

    /// User email address.
    pub const SOURCE_USER_EMAIL: &str = "source.user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const SOURCE_USER_FULL_NAME: &str = "source.user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const SOURCE_USER_GROUP_DOMAIN: &str = "source.user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const SOURCE_USER_GROUP_ID: &str = "source.user.group.id";

    /// Name of the group.
    pub const SOURCE_USER_GROUP_NAME: &str = "source.user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const SOURCE_USER_HASH: &str = "source.user.hash";

    /// Unique identifier of the user.
    pub const SOURCE_USER_ID: &str = "source.user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const SOURCE_USER_NAME: &str = "source.user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const SOURCE_USER_ROLES: &str = "source.user.roles";
}

/// Fields to classify events and alerts according to a threat taxonomy such as the MITRE ATT&CK® framework.

/// These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a common taxonomy. The threat.tactic.* are meant to capture the high level category of the threat (e.g. "impact"). The threat.technique.* fields are meant to capture which kind of approach is used by this detected threat, to accomplish the goal (e.g. "endpoint denial of service").
pub mod threat {

    /// Name of the threat framework used to further categorize and classify the tactic and technique of the reported threat. Framework classification can be provided by detecting systems, evaluated at ingest time, or retrospectively tagged to events.
    ///
    /// # Examples
    ///
    /// - `MITRE ATT&CK`
    pub const THREAT_FRAMEWORK: &str = "threat.framework";

    /// The id of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
    ///
    /// # Examples
    ///
    /// - `TA0002`
    pub const THREAT_TACTIC_ID: &str = "threat.tactic.id";

    /// Name of the type of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/)
    ///
    /// # Examples
    ///
    /// - `Execution`
    pub const THREAT_TACTIC_NAME: &str = "threat.tactic.name";

    /// The reference url of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/ )
    ///
    /// # Examples
    ///
    /// - `https://attack.mitre.org/tactics/TA0002/`
    pub const THREAT_TACTIC_REFERENCE: &str = "threat.tactic.reference";

    /// The id of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
    ///
    /// # Examples
    ///
    /// - `T1059`
    pub const THREAT_TECHNIQUE_ID: &str = "threat.technique.id";

    /// The name of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
    ///
    /// # Examples
    ///
    /// - `Command and Scripting Interpreter`
    pub const THREAT_TECHNIQUE_NAME: &str = "threat.technique.name";

    /// The reference url of technique used by this threat. You can use a MITRE ATT&CK® technique, for example. (ex. https://attack.mitre.org/techniques/T1059/)
    ///
    /// # Examples
    ///
    /// - `https://attack.mitre.org/techniques/T1059/`
    pub const THREAT_TECHNIQUE_REFERENCE: &str = "threat.technique.reference";

    /// The full id of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
    ///
    /// # Examples
    ///
    /// - `T1059.001`
    pub const THREAT_TECHNIQUE_SUBTECHNIQUE_ID: &str = "threat.technique.subtechnique.id";

    /// The name of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
    ///
    /// # Examples
    ///
    /// - `PowerShell`
    pub const THREAT_TECHNIQUE_SUBTECHNIQUE_NAME: &str = "threat.technique.subtechnique.name";

    /// The reference url of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/)
    ///
    /// # Examples
    ///
    /// - `https://attack.mitre.org/techniques/T1059/001/`
    pub const THREAT_TECHNIQUE_SUBTECHNIQUE_REFERENCE: &str =
        "threat.technique.subtechnique.reference";
}

/// Fields related to a TLS connection. These fields focus on the TLS protocol itself and intentionally avoids in-depth analysis of the related x.509 certificate files.
pub mod tls {

    /// String indicating the cipher used during the current connection.
    ///
    /// # Examples
    ///
    /// - `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256`
    pub const TLS_CIPHER: &str = "tls.cipher";

    /// PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list.
    ///
    /// # Examples
    ///
    /// - `MII...`
    pub const TLS_CLIENT_CERTIFICATE: &str = "tls.client.certificate";

    /// Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain.
    ///
    /// # Examples
    ///
    /// - `["MII...", "MII..."]`
    pub const TLS_CLIENT_CERTIFICATE_CHAIN: &str = "tls.client.certificate_chain";

    /// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC`
    pub const TLS_CLIENT_HASH_MD5: &str = "tls.client.hash.md5";

    /// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `9E393D93138888D288266C2D915214D1D1CCEB2A`
    pub const TLS_CLIENT_HASH_SHA1: &str = "tls.client.hash.sha1";

    /// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0`
    pub const TLS_CLIENT_HASH_SHA256: &str = "tls.client.hash.sha256";

    /// Distinguished name of subject of the issuer of the x.509 certificate presented by the client.
    ///
    /// # Examples
    ///
    /// - `CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com`
    pub const TLS_CLIENT_ISSUER: &str = "tls.client.issuer";

    /// A hash that identifies clients based on how they perform an SSL/TLS handshake.
    ///
    /// # Examples
    ///
    /// - `d4e5b18d6b55c71272893221c96ba240`
    pub const TLS_CLIENT_JA3: &str = "tls.client.ja3";

    /// Date/Time indicating when client certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2021-01-01T00:00:00.000Z`
    pub const TLS_CLIENT_NOT_AFTER: &str = "tls.client.not_after";

    /// Date/Time indicating when client certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `1970-01-01T00:00:00.000Z`
    pub const TLS_CLIENT_NOT_BEFORE: &str = "tls.client.not_before";

    /// Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to `destination.domain`.
    ///
    /// # Examples
    ///
    /// - `www.elastic.co`
    pub const TLS_CLIENT_SERVER_NAME: &str = "tls.client.server_name";

    /// Distinguished name of subject of the x.509 certificate presented by the client.
    ///
    /// # Examples
    ///
    /// - `CN=myclient, OU=Documentation Team, DC=example, DC=com`
    pub const TLS_CLIENT_SUBJECT: &str = "tls.client.subject";

    /// Array of ciphers offered by the client during the client hello.
    ///
    /// # Examples
    ///
    /// - `["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."]`
    pub const TLS_CLIENT_SUPPORTED_CIPHERS: &str = "tls.client.supported_ciphers";

    /// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
    ///
    /// # Examples
    ///
    /// - `*.elastic.co`
    pub const TLS_CLIENT_X509_ALTERNATIVE_NAMES: &str = "tls.client.x509.alternative_names";

    /// List of common name (CN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example SHA2 High Assurance Server CA`
    pub const TLS_CLIENT_X509_ISSUER_COMMON_NAME: &str = "tls.client.x509.issuer.common_name";

    /// List of country (C) codes
    ///
    /// # Examples
    ///
    /// - `US`
    pub const TLS_CLIENT_X509_ISSUER_COUNTRY: &str = "tls.client.x509.issuer.country";

    /// Distinguished name (DN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
    pub const TLS_CLIENT_X509_ISSUER_DISTINGUISHED_NAME: &str =
        "tls.client.x509.issuer.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `Mountain View`
    pub const TLS_CLIENT_X509_ISSUER_LOCALITY: &str = "tls.client.x509.issuer.locality";

    /// List of organizations (O) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example Inc`
    pub const TLS_CLIENT_X509_ISSUER_ORGANIZATION: &str = "tls.client.x509.issuer.organization";

    /// List of organizational units (OU) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const TLS_CLIENT_X509_ISSUER_ORGANIZATIONAL_UNIT: &str =
        "tls.client.x509.issuer.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const TLS_CLIENT_X509_ISSUER_STATE_OR_PROVINCE: &str =
        "tls.client.x509.issuer.state_or_province";

    /// Time at which the certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2020-07-16 03:15:39+00:00`
    pub const TLS_CLIENT_X509_NOT_AFTER: &str = "tls.client.x509.not_after";

    /// Time at which the certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `2019-08-16 01:40:25+00:00`
    pub const TLS_CLIENT_X509_NOT_BEFORE: &str = "tls.client.x509.not_before";

    /// Algorithm used to generate the public key.
    ///
    /// # Examples
    ///
    /// - `RSA`
    pub const TLS_CLIENT_X509_PUBLIC_KEY_ALGORITHM: &str = "tls.client.x509.public_key_algorithm";

    /// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `nistp521`
    pub const TLS_CLIENT_X509_PUBLIC_KEY_CURVE: &str = "tls.client.x509.public_key_curve";

    /// Exponent used to derive the public key. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `65537`
    pub const TLS_CLIENT_X509_PUBLIC_KEY_EXPONENT: &str = "tls.client.x509.public_key_exponent";

    /// The size of the public key space in bits.
    ///
    /// # Examples
    ///
    /// - `2048`
    pub const TLS_CLIENT_X509_PUBLIC_KEY_SIZE: &str = "tls.client.x509.public_key_size";

    /// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
    ///
    /// # Examples
    ///
    /// - `55FBB9C7DEBF09809D12CCAA`
    pub const TLS_CLIENT_X509_SERIAL_NUMBER: &str = "tls.client.x509.serial_number";

    /// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
    ///
    /// # Examples
    ///
    /// - `SHA256-RSA`
    pub const TLS_CLIENT_X509_SIGNATURE_ALGORITHM: &str = "tls.client.x509.signature_algorithm";

    /// List of common names (CN) of subject.
    ///
    /// # Examples
    ///
    /// - `shared.global.example.net`
    pub const TLS_CLIENT_X509_SUBJECT_COMMON_NAME: &str = "tls.client.x509.subject.common_name";

    /// List of country (C) code
    ///
    /// # Examples
    ///
    /// - `US`
    pub const TLS_CLIENT_X509_SUBJECT_COUNTRY: &str = "tls.client.x509.subject.country";

    /// Distinguished name (DN) of the certificate subject entity.
    ///
    /// # Examples
    ///
    /// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
    pub const TLS_CLIENT_X509_SUBJECT_DISTINGUISHED_NAME: &str =
        "tls.client.x509.subject.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `San Francisco`
    pub const TLS_CLIENT_X509_SUBJECT_LOCALITY: &str = "tls.client.x509.subject.locality";

    /// List of organizations (O) of subject.
    ///
    /// # Examples
    ///
    /// - `Example, Inc.`
    pub const TLS_CLIENT_X509_SUBJECT_ORGANIZATION: &str = "tls.client.x509.subject.organization";

    /// List of organizational units (OU) of subject.
    pub const TLS_CLIENT_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str =
        "tls.client.x509.subject.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const TLS_CLIENT_X509_SUBJECT_STATE_OR_PROVINCE: &str =
        "tls.client.x509.subject.state_or_province";

    /// Version of x509 format.
    ///
    /// # Examples
    ///
    /// - `3`
    pub const TLS_CLIENT_X509_VERSION_NUMBER: &str = "tls.client.x509.version_number";

    /// String indicating the curve used for the given cipher, when applicable.
    ///
    /// # Examples
    ///
    /// - `secp256r1`
    pub const TLS_CURVE: &str = "tls.curve";

    /// Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.
    pub const TLS_ESTABLISHED: &str = "tls.established";

    /// String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.
    ///
    /// # Examples
    ///
    /// - `http/1.1`
    pub const TLS_NEXT_PROTOCOL: &str = "tls.next_protocol";

    /// Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
    pub const TLS_RESUMED: &str = "tls.resumed";

    /// PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list.
    ///
    /// # Examples
    ///
    /// - `MII...`
    pub const TLS_SERVER_CERTIFICATE: &str = "tls.server.certificate";

    /// Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain.
    ///
    /// # Examples
    ///
    /// - `["MII...", "MII..."]`
    pub const TLS_SERVER_CERTIFICATE_CHAIN: &str = "tls.server.certificate_chain";

    /// Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC`
    pub const TLS_SERVER_HASH_MD5: &str = "tls.server.hash.md5";

    /// Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `9E393D93138888D288266C2D915214D1D1CCEB2A`
    pub const TLS_SERVER_HASH_SHA1: &str = "tls.server.hash.sha1";

    /// Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
    ///
    /// # Examples
    ///
    /// - `0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0`
    pub const TLS_SERVER_HASH_SHA256: &str = "tls.server.hash.sha256";

    /// Subject of the issuer of the x.509 certificate presented by the server.
    ///
    /// # Examples
    ///
    /// - `CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com`
    pub const TLS_SERVER_ISSUER: &str = "tls.server.issuer";

    /// A hash that identifies servers based on how they perform an SSL/TLS handshake.
    ///
    /// # Examples
    ///
    /// - `394441ab65754e2207b1e1b457b3641d`
    pub const TLS_SERVER_JA3S: &str = "tls.server.ja3s";

    /// Timestamp indicating when server certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2021-01-01T00:00:00.000Z`
    pub const TLS_SERVER_NOT_AFTER: &str = "tls.server.not_after";

    /// Timestamp indicating when server certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `1970-01-01T00:00:00.000Z`
    pub const TLS_SERVER_NOT_BEFORE: &str = "tls.server.not_before";

    /// Subject of the x.509 certificate presented by the server.
    ///
    /// # Examples
    ///
    /// - `CN=www.example.com, OU=Infrastructure Team, DC=example, DC=com`
    pub const TLS_SERVER_SUBJECT: &str = "tls.server.subject";

    /// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
    ///
    /// # Examples
    ///
    /// - `*.elastic.co`
    pub const TLS_SERVER_X509_ALTERNATIVE_NAMES: &str = "tls.server.x509.alternative_names";

    /// List of common name (CN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example SHA2 High Assurance Server CA`
    pub const TLS_SERVER_X509_ISSUER_COMMON_NAME: &str = "tls.server.x509.issuer.common_name";

    /// List of country (C) codes
    ///
    /// # Examples
    ///
    /// - `US`
    pub const TLS_SERVER_X509_ISSUER_COUNTRY: &str = "tls.server.x509.issuer.country";

    /// Distinguished name (DN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
    pub const TLS_SERVER_X509_ISSUER_DISTINGUISHED_NAME: &str =
        "tls.server.x509.issuer.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `Mountain View`
    pub const TLS_SERVER_X509_ISSUER_LOCALITY: &str = "tls.server.x509.issuer.locality";

    /// List of organizations (O) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example Inc`
    pub const TLS_SERVER_X509_ISSUER_ORGANIZATION: &str = "tls.server.x509.issuer.organization";

    /// List of organizational units (OU) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const TLS_SERVER_X509_ISSUER_ORGANIZATIONAL_UNIT: &str =
        "tls.server.x509.issuer.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const TLS_SERVER_X509_ISSUER_STATE_OR_PROVINCE: &str =
        "tls.server.x509.issuer.state_or_province";

    /// Time at which the certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2020-07-16 03:15:39+00:00`
    pub const TLS_SERVER_X509_NOT_AFTER: &str = "tls.server.x509.not_after";

    /// Time at which the certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `2019-08-16 01:40:25+00:00`
    pub const TLS_SERVER_X509_NOT_BEFORE: &str = "tls.server.x509.not_before";

    /// Algorithm used to generate the public key.
    ///
    /// # Examples
    ///
    /// - `RSA`
    pub const TLS_SERVER_X509_PUBLIC_KEY_ALGORITHM: &str = "tls.server.x509.public_key_algorithm";

    /// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `nistp521`
    pub const TLS_SERVER_X509_PUBLIC_KEY_CURVE: &str = "tls.server.x509.public_key_curve";

    /// Exponent used to derive the public key. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `65537`
    pub const TLS_SERVER_X509_PUBLIC_KEY_EXPONENT: &str = "tls.server.x509.public_key_exponent";

    /// The size of the public key space in bits.
    ///
    /// # Examples
    ///
    /// - `2048`
    pub const TLS_SERVER_X509_PUBLIC_KEY_SIZE: &str = "tls.server.x509.public_key_size";

    /// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
    ///
    /// # Examples
    ///
    /// - `55FBB9C7DEBF09809D12CCAA`
    pub const TLS_SERVER_X509_SERIAL_NUMBER: &str = "tls.server.x509.serial_number";

    /// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
    ///
    /// # Examples
    ///
    /// - `SHA256-RSA`
    pub const TLS_SERVER_X509_SIGNATURE_ALGORITHM: &str = "tls.server.x509.signature_algorithm";

    /// List of common names (CN) of subject.
    ///
    /// # Examples
    ///
    /// - `shared.global.example.net`
    pub const TLS_SERVER_X509_SUBJECT_COMMON_NAME: &str = "tls.server.x509.subject.common_name";

    /// List of country (C) code
    ///
    /// # Examples
    ///
    /// - `US`
    pub const TLS_SERVER_X509_SUBJECT_COUNTRY: &str = "tls.server.x509.subject.country";

    /// Distinguished name (DN) of the certificate subject entity.
    ///
    /// # Examples
    ///
    /// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
    pub const TLS_SERVER_X509_SUBJECT_DISTINGUISHED_NAME: &str =
        "tls.server.x509.subject.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `San Francisco`
    pub const TLS_SERVER_X509_SUBJECT_LOCALITY: &str = "tls.server.x509.subject.locality";

    /// List of organizations (O) of subject.
    ///
    /// # Examples
    ///
    /// - `Example, Inc.`
    pub const TLS_SERVER_X509_SUBJECT_ORGANIZATION: &str = "tls.server.x509.subject.organization";

    /// List of organizational units (OU) of subject.
    pub const TLS_SERVER_X509_SUBJECT_ORGANIZATIONAL_UNIT: &str =
        "tls.server.x509.subject.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const TLS_SERVER_X509_SUBJECT_STATE_OR_PROVINCE: &str =
        "tls.server.x509.subject.state_or_province";

    /// Version of x509 format.
    ///
    /// # Examples
    ///
    /// - `3`
    pub const TLS_SERVER_X509_VERSION_NUMBER: &str = "tls.server.x509.version_number";

    /// Numeric part of the version parsed from the original string.
    ///
    /// # Examples
    ///
    /// - `1.2`
    pub const TLS_VERSION: &str = "tls.version";

    /// Normalized lowercase protocol name parsed from original string.
    ///
    /// # Examples
    ///
    /// - `tls`
    pub const TLS_VERSION_PROTOCOL: &str = "tls.version_protocol";
}

/// Distributed tracing makes it possible to analyze performance throughout a microservice architecture all in one view. This is accomplished by tracing all of the requests - from the initial web request in the front-end service - to queries made through multiple back-end services.

/// Unlike most field sets in ECS, the tracing fields are *not* nested under the field set name. In other words, the correct field name is `trace.id`, not `tracing.trace.id`, and so on.
pub mod tracing {

    /// Unique identifier of the span within the scope of its trace.
    /// A span represents an operation within a transaction, such as a request to another service, or a database query.
    ///
    /// # Examples
    ///
    /// - `3ff9a8981b7ccd5a`
    pub const SPAN_ID: &str = "span.id";

    /// Unique identifier of the trace.
    /// A trace groups multiple events like transactions that belong together. For example, a user request handled by multiple inter-connected services.
    ///
    /// # Examples
    ///
    /// - `4bf92f3577b34da6a3ce929d0e0e4736`
    pub const TRACE_ID: &str = "trace.id";

    /// Unique identifier of the transaction within the scope of its trace.
    /// A transaction is the highest level of work measured within a service, such as a request to a server.
    ///
    /// # Examples
    ///
    /// - `00f067aa0ba902b7`
    pub const TRANSACTION_ID: &str = "transaction.id";
}

/// URL fields provide support for complete or partial URLs, and supports the breaking down into scheme, domain, path, and so on.
pub mod url {

    /// Domain of the url, such as "www.elastic.co".
    /// In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the `domain` field.
    /// If the URL contains a literal IPv6 address enclosed by `[` and `]` (IETF RFC 2732), the `[` and `]` characters should also be captured in the `domain` field.
    ///
    /// # Examples
    ///
    /// - `www.elastic.co`
    pub const URL_DOMAIN: &str = "url.domain";

    /// The field contains the file extension from the original request url, excluding the leading dot.
    /// The file extension is only set if it exists, as not every url has a file extension.
    /// The leading period must not be included. For example, the value must be "png", not ".png".
    /// Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
    ///
    /// # Examples
    ///
    /// - `png`
    pub const URL_EXTENSION: &str = "url.extension";

    /// Portion of the url after the `#`, such as "top".
    /// The `#` is not part of the fragment.
    pub const URL_FRAGMENT: &str = "url.fragment";

    /// If full URLs are important to your use case, they should be stored in `url.full`, whether this field is reconstructed or present in the event source.
    ///
    /// # Examples
    ///
    /// - `https://www.elastic.co:443/search?q=elasticsearch#top`
    pub const URL_FULL: &str = "url.full";

    /// Unmodified original url as seen in the event source.
    /// Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path.
    /// This field is meant to represent the URL as it was observed, complete or not.
    ///
    /// # Examples
    ///
    /// - `https://www.elastic.co:443/search?q=elasticsearch#top or /search?q=elasticsearch`
    pub const URL_ORIGINAL: &str = "url.original";

    /// Password of the request.
    pub const URL_PASSWORD: &str = "url.password";

    /// Path of the request, such as "/search".
    pub const URL_PATH: &str = "url.path";

    /// Port of the request, such as 443.
    ///
    /// # Examples
    ///
    /// - `443`
    pub const URL_PORT: &str = "url.port";

    /// The query field describes the query string of the request, such as "q=elasticsearch".
    /// The `?` is excluded from the query string. If a URL contains no `?`, there is no query field. If there is a `?` but no query, the query field exists with an empty string. The `exists` query can be used to differentiate between the two cases.
    pub const URL_QUERY: &str = "url.query";

    /// The highest registered url domain, stripped of the subdomain.
    /// For example, the registered domain for "foo.example.com" is "example.com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last two labels will not work well for TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `example.com`
    pub const URL_REGISTERED_DOMAIN: &str = "url.registered_domain";

    /// Scheme of the request, such as "https".
    /// Note: The `:` is not part of the scheme.
    ///
    /// # Examples
    ///
    /// - `https`
    pub const URL_SCHEME: &str = "url.scheme";

    /// The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain.  In a partially qualified domain, or if the the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.
    /// For example the subdomain portion of "www.east.mydomain.co.uk" is "east". If the domain has multiple levels of subdomain, such as "sub2.sub1.example.com", the subdomain field should contain "sub2.sub1", with no trailing period.
    ///
    /// # Examples
    ///
    /// - `east`
    pub const URL_SUBDOMAIN: &str = "url.subdomain";

    /// The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is "com".
    /// This value can be determined precisely with a list like the public suffix list (http://publicsuffix.org). Trying to approximate this by simply taking the last label will not work well for effective TLDs such as "co.uk".
    ///
    /// # Examples
    ///
    /// - `co.uk`
    pub const URL_TOP_LEVEL_DOMAIN: &str = "url.top_level_domain";

    /// Username of the request.
    pub const URL_USERNAME: &str = "url.username";
}

/// The user fields describe information about the user that is relevant to the event.

/// Fields can have one entry or multiple entries. If a user has more than one id, provide an array that includes all of them.
pub mod user {

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_CHANGES_DOMAIN: &str = "user.changes.domain";

    /// User email address.
    pub const USER_CHANGES_EMAIL: &str = "user.changes.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const USER_CHANGES_FULL_NAME: &str = "user.changes.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_CHANGES_GROUP_DOMAIN: &str = "user.changes.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const USER_CHANGES_GROUP_ID: &str = "user.changes.group.id";

    /// Name of the group.
    pub const USER_CHANGES_GROUP_NAME: &str = "user.changes.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const USER_CHANGES_HASH: &str = "user.changes.hash";

    /// Unique identifier of the user.
    pub const USER_CHANGES_ID: &str = "user.changes.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const USER_CHANGES_NAME: &str = "user.changes.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const USER_CHANGES_ROLES: &str = "user.changes.roles";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_DOMAIN: &str = "user.domain";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_EFFECTIVE_DOMAIN: &str = "user.effective.domain";

    /// User email address.
    pub const USER_EFFECTIVE_EMAIL: &str = "user.effective.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const USER_EFFECTIVE_FULL_NAME: &str = "user.effective.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_EFFECTIVE_GROUP_DOMAIN: &str = "user.effective.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const USER_EFFECTIVE_GROUP_ID: &str = "user.effective.group.id";

    /// Name of the group.
    pub const USER_EFFECTIVE_GROUP_NAME: &str = "user.effective.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const USER_EFFECTIVE_HASH: &str = "user.effective.hash";

    /// Unique identifier of the user.
    pub const USER_EFFECTIVE_ID: &str = "user.effective.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const USER_EFFECTIVE_NAME: &str = "user.effective.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const USER_EFFECTIVE_ROLES: &str = "user.effective.roles";

    /// User email address.
    pub const USER_EMAIL: &str = "user.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const USER_FULL_NAME: &str = "user.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_GROUP_DOMAIN: &str = "user.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const USER_GROUP_ID: &str = "user.group.id";

    /// Name of the group.
    pub const USER_GROUP_NAME: &str = "user.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const USER_HASH: &str = "user.hash";

    /// Unique identifier of the user.
    pub const USER_ID: &str = "user.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const USER_NAME: &str = "user.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const USER_ROLES: &str = "user.roles";

    /// Name of the directory the user is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_TARGET_DOMAIN: &str = "user.target.domain";

    /// User email address.
    pub const USER_TARGET_EMAIL: &str = "user.target.email";

    /// User's full name, if available.
    ///
    /// # Examples
    ///
    /// - `Albert Einstein`
    pub const USER_TARGET_FULL_NAME: &str = "user.target.full_name";

    /// Name of the directory the group is a member of.
    /// For example, an LDAP or Active Directory domain name.
    pub const USER_TARGET_GROUP_DOMAIN: &str = "user.target.group.domain";

    /// Unique identifier for the group on the system/platform.
    pub const USER_TARGET_GROUP_ID: &str = "user.target.group.id";

    /// Name of the group.
    pub const USER_TARGET_GROUP_NAME: &str = "user.target.group.name";

    /// Unique user hash to correlate information for a user in anonymized form.
    /// Useful if `user.id` or `user.name` contain confidential information and cannot be used.
    pub const USER_TARGET_HASH: &str = "user.target.hash";

    /// Unique identifier of the user.
    pub const USER_TARGET_ID: &str = "user.target.id";

    /// Short name or login of the user.
    ///
    /// # Examples
    ///
    /// - `albert`
    pub const USER_TARGET_NAME: &str = "user.target.name";

    /// Array of user roles at the time of the event.
    ///
    /// # Examples
    ///
    /// - `["kibana_admin", "reporting_user"]`
    pub const USER_TARGET_ROLES: &str = "user.target.roles";
}

/// The user_agent fields normally come from a browser request.

/// They often show up in web service logs coming from the parsed user agent string.
pub mod user_agent {

    /// Name of the device.
    ///
    /// # Examples
    ///
    /// - `iPhone`
    pub const USER_AGENT_DEVICE_NAME: &str = "user_agent.device.name";

    /// Name of the user agent.
    ///
    /// # Examples
    ///
    /// - `Safari`
    pub const USER_AGENT_NAME: &str = "user_agent.name";

    /// Unparsed user_agent string.
    ///
    /// # Examples
    ///
    /// - `Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1`
    pub const USER_AGENT_ORIGINAL: &str = "user_agent.original";

    /// OS family (such as redhat, debian, freebsd, windows).
    ///
    /// # Examples
    ///
    /// - `debian`
    pub const USER_AGENT_OS_FAMILY: &str = "user_agent.os.family";

    /// Operating system name, including the version or code name.
    ///
    /// # Examples
    ///
    /// - `Mac OS Mojave`
    pub const USER_AGENT_OS_FULL: &str = "user_agent.os.full";

    /// Operating system kernel version as a raw string.
    ///
    /// # Examples
    ///
    /// - `4.4.0-112-generic`
    pub const USER_AGENT_OS_KERNEL: &str = "user_agent.os.kernel";

    /// Operating system name, without the version.
    ///
    /// # Examples
    ///
    /// - `Mac OS X`
    pub const USER_AGENT_OS_NAME: &str = "user_agent.os.name";

    /// Operating system platform (such centos, ubuntu, windows).
    ///
    /// # Examples
    ///
    /// - `darwin`
    pub const USER_AGENT_OS_PLATFORM: &str = "user_agent.os.platform";

    /// Use the `os.type` field to categorize the operating system into one of the broad commercial families.
    /// One of these following values should be used (lowercase): linux, macos, unix, windows.
    /// If the OS you're dealing with is not in the list, the field should not be populated. Please let us know by opening an issue with ECS, to propose its addition.
    ///
    /// # Examples
    ///
    /// - `macos`
    pub const USER_AGENT_OS_TYPE: &str = "user_agent.os.type";

    /// Operating system version as a raw string.
    ///
    /// # Examples
    ///
    /// - `10.14.1`
    pub const USER_AGENT_OS_VERSION: &str = "user_agent.os.version";

    /// Version of the user agent.
    ///
    /// # Examples
    ///
    /// - `12.0`
    pub const USER_AGENT_VERSION: &str = "user_agent.version";
}

/// The VLAN fields are used to identify 802.1q tag(s) of a packet, as well as ingress and egress VLAN associations of an observer in relation to a specific packet or connection.

/// Network.vlan fields are used to record a single VLAN tag, or the outer tag in the case of q-in-q encapsulations, for a packet or connection as observed, typically provided by a network sensor (e.g. Zeek, Wireshark) passively reporting on traffic.

/// Network.inner VLAN fields are used to report inner q-in-q 802.1q tags (multiple 802.1q encapsulations) as observed, typically provided by a network sensor  (e.g. Zeek, Wireshark) passively reporting on traffic. Network.inner VLAN fields should only be used in addition to network.vlan fields to indicate q-in-q tagging.

/// Observer.ingress and observer.egress VLAN values are used to record observer specific information when observer events contain discrete ingress and egress VLAN information, typically provided by firewalls, routers, or load balancers.
pub mod vlan {

    /// VLAN ID as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `10`
    pub const VLAN_ID: &str = "vlan.id";

    /// Optional VLAN name as reported by the observer.
    ///
    /// # Examples
    ///
    /// - `outside`
    pub const VLAN_NAME: &str = "vlan.name";
}

/// The vulnerability fields describe information about a vulnerability that is relevant to an event.
pub mod vulnerability {

    /// The type of system or architecture that the vulnerability affects. These may be platform-specific (for example, Debian or SUSE) or general (for example, Database or Firewall). For example (https://qualysguard.qualys.com/qwebhelp/fo_portal/knowledgebase/vulnerability_categories.htm[Qualys vulnerability categories])
    /// This field must be an array.
    ///
    /// # Examples
    ///
    /// - `["Firewall"]`
    pub const VULNERABILITY_CATEGORY: &str = "vulnerability.category";

    /// The classification of the vulnerability scoring system. For example (https://www.first.org/cvss/)
    ///
    /// # Examples
    ///
    /// - `CVSS`
    pub const VULNERABILITY_CLASSIFICATION: &str = "vulnerability.classification";

    /// The description of the vulnerability that provides additional context of the vulnerability. For example (https://cve.mitre.org/about/faqs.html#cve_entry_descriptions_created[Common Vulnerabilities and Exposure CVE description])
    ///
    /// # Examples
    ///
    /// - `In macOS before 2.12.6, there is a vulnerability in the RPC...`
    pub const VULNERABILITY_DESCRIPTION: &str = "vulnerability.description";

    /// The type of identifier used for this vulnerability. For example (https://cve.mitre.org/about/)
    ///
    /// # Examples
    ///
    /// - `CVE`
    pub const VULNERABILITY_ENUMERATION: &str = "vulnerability.enumeration";

    /// The identification (ID) is the number portion of a vulnerability entry. It includes a unique identification number for the vulnerability. For example (https://cve.mitre.org/about/faqs.html#what_is_cve_id)[Common Vulnerabilities and Exposure CVE ID]
    ///
    /// # Examples
    ///
    /// - `CVE-2019-00001`
    pub const VULNERABILITY_ID: &str = "vulnerability.id";

    /// A resource that provides additional information, context, and mitigations for the identified vulnerability.
    ///
    /// # Examples
    ///
    /// - `https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6111`
    pub const VULNERABILITY_REFERENCE: &str = "vulnerability.reference";

    /// The report or scan identification number.
    ///
    /// # Examples
    ///
    /// - `20191018.0001`
    pub const VULNERABILITY_REPORT_ID: &str = "vulnerability.report_id";

    /// The name of the vulnerability scanner vendor.
    ///
    /// # Examples
    ///
    /// - `Tenable`
    pub const VULNERABILITY_SCANNER_VENDOR: &str = "vulnerability.scanner.vendor";

    /// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
    /// Base scores cover an assessment for exploitability metrics (attack vector, complexity, privileges, and user interaction), impact metrics (confidentiality, integrity, and availability), and scope. For example (https://www.first.org/cvss/specification-document)
    ///
    /// # Examples
    ///
    /// - `5.5`
    pub const VULNERABILITY_SCORE_BASE: &str = "vulnerability.score.base";

    /// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
    /// Environmental scores cover an assessment for any modified Base metrics, confidentiality, integrity, and availability requirements. For example (https://www.first.org/cvss/specification-document)
    ///
    /// # Examples
    ///
    /// - `5.5`
    pub const VULNERABILITY_SCORE_ENVIRONMENTAL: &str = "vulnerability.score.environmental";

    /// Scores can range from 0.0 to 10.0, with 10.0 being the most severe.
    /// Temporal scores cover an assessment for code maturity, remediation level, and confidence. For example (https://www.first.org/cvss/specification-document)
    pub const VULNERABILITY_SCORE_TEMPORAL: &str = "vulnerability.score.temporal";

    /// The National Vulnerability Database (NVD) provides qualitative severity rankings of "Low", "Medium", and "High" for CVSS v2.0 base score ranges in addition to the severity ratings for CVSS v3.0 as they are defined in the CVSS v3.0 specification.
    /// CVSS is owned and managed by FIRST.Org, Inc. (FIRST), a US-based non-profit organization, whose mission is to help computer security incident response teams across the world. For example (https://nvd.nist.gov/vuln-metrics/cvss)
    ///
    /// # Examples
    ///
    /// - `2.0`
    pub const VULNERABILITY_SCORE_VERSION: &str = "vulnerability.score.version";

    /// The severity of the vulnerability can help with metrics and internal prioritization regarding remediation. For example (https://nvd.nist.gov/vuln-metrics/cvss)
    ///
    /// # Examples
    ///
    /// - `Critical`
    pub const VULNERABILITY_SEVERITY: &str = "vulnerability.severity";
}

/// This implements the common core fields for x509 certificates. This information is likely logged with TLS sessions, digital signatures found in executable binaries, S/MIME information in email bodies, or analysis of files on disk.

/// When the certificate relates to a file, use the fields at `file.x509`. When hashes of the DER-encoded certificate are available, the `hash` data set should be populated as well (e.g. `file.hash.sha256`).

/// Events that contain certificate information about network connections, should use the x509 fields under the relevant TLS fields: `tls.server.x509` and/or `tls.client.x509`.
pub mod x509 {

    /// List of subject alternative names (SAN). Name types vary by certificate authority and certificate type but commonly contain IP addresses, DNS names (and wildcards), and email addresses.
    ///
    /// # Examples
    ///
    /// - `*.elastic.co`
    pub const X509_ALTERNATIVE_NAMES: &str = "x509.alternative_names";

    /// List of common name (CN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example SHA2 High Assurance Server CA`
    pub const X509_ISSUER_COMMON_NAME: &str = "x509.issuer.common_name";

    /// List of country (C) codes
    ///
    /// # Examples
    ///
    /// - `US`
    pub const X509_ISSUER_COUNTRY: &str = "x509.issuer.country";

    /// Distinguished name (DN) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `C=US, O=Example Inc, OU=www.example.com, CN=Example SHA2 High Assurance Server CA`
    pub const X509_ISSUER_DISTINGUISHED_NAME: &str = "x509.issuer.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `Mountain View`
    pub const X509_ISSUER_LOCALITY: &str = "x509.issuer.locality";

    /// List of organizations (O) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `Example Inc`
    pub const X509_ISSUER_ORGANIZATION: &str = "x509.issuer.organization";

    /// List of organizational units (OU) of issuing certificate authority.
    ///
    /// # Examples
    ///
    /// - `www.example.com`
    pub const X509_ISSUER_ORGANIZATIONAL_UNIT: &str = "x509.issuer.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const X509_ISSUER_STATE_OR_PROVINCE: &str = "x509.issuer.state_or_province";

    /// Time at which the certificate is no longer considered valid.
    ///
    /// # Examples
    ///
    /// - `2020-07-16 03:15:39+00:00`
    pub const X509_NOT_AFTER: &str = "x509.not_after";

    /// Time at which the certificate is first considered valid.
    ///
    /// # Examples
    ///
    /// - `2019-08-16 01:40:25+00:00`
    pub const X509_NOT_BEFORE: &str = "x509.not_before";

    /// Algorithm used to generate the public key.
    ///
    /// # Examples
    ///
    /// - `RSA`
    pub const X509_PUBLIC_KEY_ALGORITHM: &str = "x509.public_key_algorithm";

    /// The curve used by the elliptic curve public key algorithm. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `nistp521`
    pub const X509_PUBLIC_KEY_CURVE: &str = "x509.public_key_curve";

    /// Exponent used to derive the public key. This is algorithm specific.
    ///
    /// # Examples
    ///
    /// - `65537`
    pub const X509_PUBLIC_KEY_EXPONENT: &str = "x509.public_key_exponent";

    /// The size of the public key space in bits.
    ///
    /// # Examples
    ///
    /// - `2048`
    pub const X509_PUBLIC_KEY_SIZE: &str = "x509.public_key_size";

    /// Unique serial number issued by the certificate authority. For consistency, if this value is alphanumeric, it should be formatted without colons and uppercase characters.
    ///
    /// # Examples
    ///
    /// - `55FBB9C7DEBF09809D12CCAA`
    pub const X509_SERIAL_NUMBER: &str = "x509.serial_number";

    /// Identifier for certificate signature algorithm. We recommend using names found in Go Lang Crypto library. See https://github.com/golang/go/blob/go1.14/src/crypto/x509/x509.go#L337-L353.
    ///
    /// # Examples
    ///
    /// - `SHA256-RSA`
    pub const X509_SIGNATURE_ALGORITHM: &str = "x509.signature_algorithm";

    /// List of common names (CN) of subject.
    ///
    /// # Examples
    ///
    /// - `shared.global.example.net`
    pub const X509_SUBJECT_COMMON_NAME: &str = "x509.subject.common_name";

    /// List of country (C) code
    ///
    /// # Examples
    ///
    /// - `US`
    pub const X509_SUBJECT_COUNTRY: &str = "x509.subject.country";

    /// Distinguished name (DN) of the certificate subject entity.
    ///
    /// # Examples
    ///
    /// - `C=US, ST=California, L=San Francisco, O=Example, Inc., CN=shared.global.example.net`
    pub const X509_SUBJECT_DISTINGUISHED_NAME: &str = "x509.subject.distinguished_name";

    /// List of locality names (L)
    ///
    /// # Examples
    ///
    /// - `San Francisco`
    pub const X509_SUBJECT_LOCALITY: &str = "x509.subject.locality";

    /// List of organizations (O) of subject.
    ///
    /// # Examples
    ///
    /// - `Example, Inc.`
    pub const X509_SUBJECT_ORGANIZATION: &str = "x509.subject.organization";

    /// List of organizational units (OU) of subject.
    pub const X509_SUBJECT_ORGANIZATIONAL_UNIT: &str = "x509.subject.organizational_unit";

    /// List of state or province names (ST, S, or P)
    ///
    /// # Examples
    ///
    /// - `California`
    pub const X509_SUBJECT_STATE_OR_PROVINCE: &str = "x509.subject.state_or_province";

    /// Version of x509 format.
    ///
    /// # Examples
    ///
    /// - `3`
    pub const X509_VERSION_NUMBER: &str = "x509.version_number";
}