sentry_protos 0.22.3

Rust bindings for sentry-protos
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
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttributeKey {
    #[prost(enumeration = "attribute_key::Type", tag = "1")]
    pub r#type: i32,
    /// the name of the trace item attribute, everything that sentry sends by default is prefixed with
    /// `sentry.` to allow users to send attributes of the same name.
    /// Exampe: `sentry.duration`, `sentry.span_id` etc
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `AttributeKey`.
pub mod attribute_key {
    /// this mostly reflects what types are able to be ingested, see eap_spans consumer for ingest details
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// protobuf requirement, do not send this
        Unspecified = 0,
        String = 1,
        Boolean = 2,
        /// deprecated, use TYPE_DOUBLE instead
        #[deprecated]
        Float = 3,
        /// note: all numbers are stored as float64, so massive integers can be rounded. USE STRING FOR IDS.
        Int = 4,
        Double = 5,
        Array = 6,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::String => "TYPE_STRING",
                Self::Boolean => "TYPE_BOOLEAN",
                #[allow(deprecated)]
                Self::Float => "TYPE_FLOAT",
                Self::Int => "TYPE_INT",
                Self::Double => "TYPE_DOUBLE",
                Self::Array => "TYPE_ARRAY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "TYPE_STRING" => Some(Self::String),
                "TYPE_BOOLEAN" => Some(Self::Boolean),
                "TYPE_FLOAT" => Some(#[allow(deprecated)] Self::Float),
                "TYPE_INT" => Some(Self::Int),
                "TYPE_DOUBLE" => Some(Self::Double),
                "TYPE_ARRAY" => Some(Self::Array),
                _ => None,
            }
        }
    }
}
/// this allow us to select single key such as span.attr1
/// and also combine multiple keys such as (span.attr1 * span.attr2)
/// Grammar: f = k | f op f (formula is either a key or formula operation formula)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeKeyExpression {
    #[prost(oneof = "attribute_key_expression::Expression", tags = "1, 2")]
    pub expression: ::core::option::Option<attribute_key_expression::Expression>,
}
/// Nested message and enum types in `AttributeKeyExpression`.
pub mod attribute_key_expression {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Formula {
        #[prost(enumeration = "Op", tag = "1")]
        pub op: i32,
        #[prost(message, optional, boxed, tag = "2")]
        pub left: ::core::option::Option<
            ::prost::alloc::boxed::Box<super::AttributeKeyExpression>,
        >,
        #[prost(message, optional, boxed, tag = "3")]
        pub right: ::core::option::Option<
            ::prost::alloc::boxed::Box<super::AttributeKeyExpression>,
        >,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Op {
        Unspecified = 0,
        Add = 1,
        Sub = 2,
        Mult = 3,
        Div = 4,
    }
    impl Op {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "OP_UNSPECIFIED",
                Self::Add => "OP_ADD",
                Self::Sub => "OP_SUB",
                Self::Mult => "OP_MULT",
                Self::Div => "OP_DIV",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OP_UNSPECIFIED" => Some(Self::Unspecified),
                "OP_ADD" => Some(Self::Add),
                "OP_SUB" => Some(Self::Sub),
                "OP_MULT" => Some(Self::Mult),
                "OP_DIV" => Some(Self::Div),
                _ => None,
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Expression {
        /// f = k (single key)
        #[prost(message, tag = "1")]
        Key(super::AttributeKey),
        /// f = f op f (binary operation between two formulas)
        #[prost(message, tag = "2")]
        Formula(::prost::alloc::boxed::Box<Formula>),
    }
}
/// custom mappings of column values
///
/// for example, `project_name` is changeable by the user and not stored in EAP,
/// but sorting by it may be desired. So something like this might be done:
///
/// ORDER BY sentry.project_name
/// VirtualColumnContext(
/// from_column_name="sentry.project_id",
/// to_column_name="sentry.project_name",
/// value_map={"1": "sentry", "2": "snuba"},
/// )
///
/// in this example `sentry.project_name` is a virtual column created by mapping
/// values from the real column `sentry.project_id` to new values. project_id of 1
/// gets mapped to project_name="sentry" etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VirtualColumnContext {
    #[prost(string, tag = "1")]
    pub from_column_name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub to_column_name: ::prost::alloc::string::String,
    #[prost(map = "string, string", tag = "3")]
    pub value_map: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "4")]
    pub default_value: ::prost::alloc::string::String,
    /// Alternatively, I could just use AttributeKey and deprecate from_column_name, but it might be confusing for the caller
    #[prost(enumeration = "attribute_key::Type", tag = "5")]
    pub from_column_type: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StrArray {
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IntArray {
    #[prost(int64, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatArray {
    #[prost(float, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<f32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DoubleArray {
    #[prost(double, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Array {
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<AttributeValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeValue {
    /// true if the value is null
    #[prost(bool, tag = "11")]
    pub is_null: bool,
    #[prost(
        oneof = "attribute_value::Value",
        tags = "1, 2, 4, 9, 12, 3, 8, 10, 7, 6, 5"
    )]
    pub value: ::core::option::Option<attribute_value::Value>,
}
/// Nested message and enum types in `AttributeValue`.
pub mod attribute_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(bool, tag = "1")]
        ValBool(bool),
        #[prost(string, tag = "2")]
        ValStr(::prost::alloc::string::String),
        #[prost(int64, tag = "4")]
        ValInt(i64),
        #[prost(double, tag = "9")]
        ValDouble(f64),
        #[prost(message, tag = "12")]
        ValArray(super::Array),
        /// Deprecated fields
        #[deprecated]
        #[prost(float, tag = "3")]
        ValFloat(f32),
        #[deprecated]
        #[prost(message, tag = "8")]
        ValFloatArray(super::FloatArray),
        #[deprecated]
        #[prost(message, tag = "10")]
        ValDoubleArray(super::DoubleArray),
        #[deprecated]
        #[prost(message, tag = "7")]
        ValIntArray(super::IntArray),
        #[deprecated]
        #[prost(message, tag = "6")]
        ValStrArray(super::StrArray),
        #[deprecated]
        #[prost(bool, tag = "5")]
        ValNull(bool),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeAggregation {
    #[prost(enumeration = "Function", tag = "1")]
    pub aggregate: i32,
    #[prost(message, optional, tag = "2")]
    pub key: ::core::option::Option<AttributeKey>,
    #[prost(string, tag = "3")]
    pub label: ::prost::alloc::string::String,
    #[prost(enumeration = "ExtrapolationMode", tag = "4")]
    pub extrapolation_mode: i32,
    #[prost(oneof = "attribute_aggregation::DefaultValue", tags = "5, 6")]
    pub default_value: ::core::option::Option<attribute_aggregation::DefaultValue>,
}
/// Nested message and enum types in `AttributeAggregation`.
pub mod attribute_aggregation {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum DefaultValue {
        #[prost(double, tag = "5")]
        DefaultValueDouble(f64),
        #[prost(int64, tag = "6")]
        DefaultValueInt64(i64),
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Function {
    Unspecified = 0,
    Sum = 1,
    /// deprecated, use FUNCTION_AVG instead
    #[deprecated]
    Average = 2,
    Count = 3,
    P50 = 4,
    P75 = 12,
    P90 = 5,
    P95 = 6,
    P99 = 7,
    Avg = 8,
    Max = 9,
    Min = 10,
    Uniq = 11,
    Any = 13,
}
impl Function {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "FUNCTION_UNSPECIFIED",
            Self::Sum => "FUNCTION_SUM",
            #[allow(deprecated)]
            Self::Average => "FUNCTION_AVERAGE",
            Self::Count => "FUNCTION_COUNT",
            Self::P50 => "FUNCTION_P50",
            Self::P75 => "FUNCTION_P75",
            Self::P90 => "FUNCTION_P90",
            Self::P95 => "FUNCTION_P95",
            Self::P99 => "FUNCTION_P99",
            Self::Avg => "FUNCTION_AVG",
            Self::Max => "FUNCTION_MAX",
            Self::Min => "FUNCTION_MIN",
            Self::Uniq => "FUNCTION_UNIQ",
            Self::Any => "FUNCTION_ANY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FUNCTION_UNSPECIFIED" => Some(Self::Unspecified),
            "FUNCTION_SUM" => Some(Self::Sum),
            "FUNCTION_AVERAGE" => Some(#[allow(deprecated)] Self::Average),
            "FUNCTION_COUNT" => Some(Self::Count),
            "FUNCTION_P50" => Some(Self::P50),
            "FUNCTION_P75" => Some(Self::P75),
            "FUNCTION_P90" => Some(Self::P90),
            "FUNCTION_P95" => Some(Self::P95),
            "FUNCTION_P99" => Some(Self::P99),
            "FUNCTION_AVG" => Some(Self::Avg),
            "FUNCTION_MAX" => Some(Self::Max),
            "FUNCTION_MIN" => Some(Self::Min),
            "FUNCTION_UNIQ" => Some(Self::Uniq),
            "FUNCTION_ANY" => Some(Self::Any),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExtrapolationMode {
    Unspecified = 0,
    None = 1,
    SampleWeighted = 2,
    ClientOnly = 3,
    ServerOnly = 4,
}
impl ExtrapolationMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "EXTRAPOLATION_MODE_UNSPECIFIED",
            Self::None => "EXTRAPOLATION_MODE_NONE",
            Self::SampleWeighted => "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED",
            Self::ClientOnly => "EXTRAPOLATION_MODE_CLIENT_ONLY",
            Self::ServerOnly => "EXTRAPOLATION_MODE_SERVER_ONLY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXTRAPOLATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXTRAPOLATION_MODE_NONE" => Some(Self::None),
            "EXTRAPOLATION_MODE_SAMPLE_WEIGHTED" => Some(Self::SampleWeighted),
            "EXTRAPOLATION_MODE_CLIENT_ONLY" => Some(Self::ClientOnly),
            "EXTRAPOLATION_MODE_SERVER_ONLY" => Some(Self::ServerOnly),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Reliability {
    Unspecified = 0,
    Low = 1,
    High = 2,
}
impl Reliability {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "RELIABILITY_UNSPECIFIED",
            Self::Low => "RELIABILITY_LOW",
            Self::High => "RELIABILITY_HIGH",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RELIABILITY_UNSPECIFIED" => Some(Self::Unspecified),
            "RELIABILITY_LOW" => Some(Self::Low),
            "RELIABILITY_HIGH" => Some(Self::High),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComparisonFilter {
    #[prost(message, optional, tag = "1")]
    pub key: ::core::option::Option<AttributeKey>,
    #[prost(enumeration = "comparison_filter::Op", tag = "2")]
    pub op: i32,
    #[prost(message, optional, tag = "3")]
    pub value: ::core::option::Option<AttributeValue>,
    /// optional, if set will ignore case for string comparisons
    #[prost(bool, tag = "4")]
    pub ignore_case: bool,
}
/// Nested message and enum types in `ComparisonFilter`.
pub mod comparison_filter {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Op {
        Unspecified = 0,
        LessThan = 1,
        GreaterThan = 2,
        LessThanOrEquals = 3,
        GreaterThanOrEquals = 4,
        Equals = 5,
        NotEquals = 6,
        /// string only
        Like = 7,
        /// string only
        NotLike = 8,
        /// array only
        In = 9,
        /// array only
        NotIn = 10,
    }
    impl Op {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "OP_UNSPECIFIED",
                Self::LessThan => "OP_LESS_THAN",
                Self::GreaterThan => "OP_GREATER_THAN",
                Self::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS",
                Self::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS",
                Self::Equals => "OP_EQUALS",
                Self::NotEquals => "OP_NOT_EQUALS",
                Self::Like => "OP_LIKE",
                Self::NotLike => "OP_NOT_LIKE",
                Self::In => "OP_IN",
                Self::NotIn => "OP_NOT_IN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OP_UNSPECIFIED" => Some(Self::Unspecified),
                "OP_LESS_THAN" => Some(Self::LessThan),
                "OP_GREATER_THAN" => Some(Self::GreaterThan),
                "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals),
                "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals),
                "OP_EQUALS" => Some(Self::Equals),
                "OP_NOT_EQUALS" => Some(Self::NotEquals),
                "OP_LIKE" => Some(Self::Like),
                "OP_NOT_LIKE" => Some(Self::NotLike),
                "OP_IN" => Some(Self::In),
                "OP_NOT_IN" => Some(Self::NotIn),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExistsFilter {
    #[prost(message, optional, tag = "1")]
    pub key: ::core::option::Option<AttributeKey>,
}
/// Filter that matches trace items where ANY attribute matches the given value.
/// Use this for searching across all attributes without specifying a key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnyAttributeFilter {
    #[prost(enumeration = "any_attribute_filter::Op", tag = "1")]
    pub op: i32,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<AttributeValue>,
    #[prost(bool, tag = "3")]
    pub ignore_case: bool,
    /// Optional: Restrict search to specific attribute types.
    /// If empty, searches all string-type attributes by default.
    #[prost(enumeration = "attribute_key::Type", repeated, tag = "4")]
    pub attribute_types: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `AnyAttributeFilter`.
pub mod any_attribute_filter {
    /// Restricted set of operations that make sense for all-attribute search
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Op {
        Unspecified = 0,
        Equals = 1,
        NotEquals = 2,
        Like = 3,
        NotLike = 4,
        In = 5,
        NotIn = 6,
    }
    impl Op {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "OP_UNSPECIFIED",
                Self::Equals => "OP_EQUALS",
                Self::NotEquals => "OP_NOT_EQUALS",
                Self::Like => "OP_LIKE",
                Self::NotLike => "OP_NOT_LIKE",
                Self::In => "OP_IN",
                Self::NotIn => "OP_NOT_IN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OP_UNSPECIFIED" => Some(Self::Unspecified),
                "OP_EQUALS" => Some(Self::Equals),
                "OP_NOT_EQUALS" => Some(Self::NotEquals),
                "OP_LIKE" => Some(Self::Like),
                "OP_NOT_LIKE" => Some(Self::NotLike),
                "OP_IN" => Some(Self::In),
                "OP_NOT_IN" => Some(Self::NotIn),
                _ => None,
            }
        }
    }
}
/// a condition used to filter for matching "trace items"
///
/// ex: "exists span.duration" would mean
/// "only give me trace items that have the attribute 'span.duration'"
///
/// ( traces contain trace items,
/// eg. trace items are: span, replay, error, etc,
/// trace items contain attributes like 'span.duration' )
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemFilter {
    #[prost(oneof = "trace_item_filter::Value", tags = "1, 2, 3, 4, 5, 6")]
    pub value: ::core::option::Option<trace_item_filter::Value>,
}
/// Nested message and enum types in `TraceItemFilter`.
pub mod trace_item_filter {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(message, tag = "1")]
        AndFilter(super::AndFilter),
        #[prost(message, tag = "2")]
        OrFilter(super::OrFilter),
        #[prost(message, tag = "3")]
        NotFilter(super::NotFilter),
        #[prost(message, tag = "4")]
        ComparisonFilter(super::ComparisonFilter),
        #[prost(message, tag = "5")]
        ExistsFilter(super::ExistsFilter),
        #[prost(message, tag = "6")]
        AnyAttributeFilter(super::AnyAttributeFilter),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeConditionalAggregation {
    #[prost(enumeration = "Function", tag = "1")]
    pub aggregate: i32,
    /// will be deprecated in favor of expression in the future
    #[prost(message, optional, tag = "2")]
    pub key: ::core::option::Option<AttributeKey>,
    /// f = key | f op f (either a key or formula of keys)
    #[prost(message, optional, tag = "6")]
    pub expression: ::core::option::Option<AttributeKeyExpression>,
    #[prost(string, tag = "3")]
    pub label: ::prost::alloc::string::String,
    #[prost(enumeration = "ExtrapolationMode", tag = "4")]
    pub extrapolation_mode: i32,
    #[prost(message, optional, tag = "5")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    #[prost(oneof = "attribute_conditional_aggregation::DefaultValue", tags = "7, 8")]
    pub default_value: ::core::option::Option<
        attribute_conditional_aggregation::DefaultValue,
    >,
}
/// Nested message and enum types in `AttributeConditionalAggregation`.
pub mod attribute_conditional_aggregation {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum DefaultValue {
        #[prost(double, tag = "7")]
        DefaultValueDouble(f64),
        #[prost(int64, tag = "8")]
        DefaultValueInt64(i64),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DownsampledStorageConfig {
    #[prost(enumeration = "downsampled_storage_config::Mode", tag = "1")]
    pub mode: i32,
}
/// Nested message and enum types in `DownsampledStorageConfig`.
pub mod downsampled_storage_config {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Mode {
        Unspecified = 0,
        /// deprecated, treated as NORMAL mode
        Preflight = 1,
        /// deprecated, treated as NORMAL mode
        BestEffort = 2,
        /// NORMAL queries are served faster and should not time out
        /// EAP will route to whatever tier it needs to in order to facilitate this
        /// The return payload from EAP will inform the client if there is a higher fidelity tier to scan
        Normal = 3,
        /// HIGHEST_ACCURACY queries go straight to tier 1
        HighestAccuracy = 4,
        /// queries go to tier 1 but may have their time range truncated based on data volume
        HighestAccuracyFlextime = 5,
        /// queries behave the same as NORMAL by default but are opted in
        /// to lose precision if the cluster is overloaded
        LowPriority = 6,
    }
    impl Mode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "MODE_UNSPECIFIED",
                Self::Preflight => "MODE_PREFLIGHT",
                Self::BestEffort => "MODE_BEST_EFFORT",
                Self::Normal => "MODE_NORMAL",
                Self::HighestAccuracy => "MODE_HIGHEST_ACCURACY",
                Self::HighestAccuracyFlextime => "MODE_HIGHEST_ACCURACY_FLEXTIME",
                Self::LowPriority => "MODE_LOW_PRIORITY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "MODE_PREFLIGHT" => Some(Self::Preflight),
                "MODE_BEST_EFFORT" => Some(Self::BestEffort),
                "MODE_NORMAL" => Some(Self::Normal),
                "MODE_HIGHEST_ACCURACY" => Some(Self::HighestAccuracy),
                "MODE_HIGHEST_ACCURACY_FLEXTIME" => Some(Self::HighestAccuracyFlextime),
                "MODE_LOW_PRIORITY" => Some(Self::LowPriority),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DownsampledStorageMeta {
    /// deprecated, only use can_go_to_higher_accuracy_tier
    #[prost(enumeration = "downsampled_storage_meta::SelectedTier", tag = "1")]
    pub tier: i32,
    /// how many rows did the estimator think this query would scan
    /// 0 means the estimator was not run
    /// deprecated, only use can_go_to_higher_accuracy_tier
    #[prost(uint64, tag = "2")]
    pub estimated_num_rows: u64,
    /// if there exists a higher accuracy tier that this query could route to
    /// note that if this query goes to a higher accuracy tier, it could potentially time out
    #[prost(bool, tag = "3")]
    pub can_go_to_higher_accuracy_tier: bool,
}
/// Nested message and enum types in `DownsampledStorageMeta`.
pub mod downsampled_storage_meta {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SelectedTier {
        Unspecified = 0,
        SelectedTier1 = 1,
        SelectedTier8 = 2,
        SelectedTier64 = 3,
        SelectedTier512 = 4,
    }
    impl SelectedTier {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "SELECTED_TIER_UNSPECIFIED",
                Self::SelectedTier1 => "SELECTED_TIER_1",
                Self::SelectedTier8 => "SELECTED_TIER_8",
                Self::SelectedTier64 => "SELECTED_TIER_64",
                Self::SelectedTier512 => "SELECTED_TIER_512",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SELECTED_TIER_UNSPECIFIED" => Some(Self::Unspecified),
                "SELECTED_TIER_1" => Some(Self::SelectedTier1),
                "SELECTED_TIER_8" => Some(Self::SelectedTier8),
                "SELECTED_TIER_64" => Some(Self::SelectedTier64),
                "SELECTED_TIER_512" => Some(Self::SelectedTier512),
                _ => None,
            }
        }
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Literal {
    #[prost(oneof = "literal::Value", tags = "1")]
    pub value: ::core::option::Option<literal::Value>,
}
/// Nested message and enum types in `Literal`.
pub mod literal {
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(double, tag = "1")]
        ValDouble(f64),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RequestMeta {
    /// id of the organization we are querying data for
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    /// used for logging and metrics, ex: "snuba_admin", "eap", "replays", etc
    #[prost(string, tag = "2")]
    pub cogs_category: ::prost::alloc::string::String,
    /// identifier for where the request is coming from
    /// ex: "api.profiling.landing-chart", "api.replay.details-page"
    #[prost(string, tag = "3")]
    pub referrer: ::prost::alloc::string::String,
    /// ids of the projects we are querying data for
    #[prost(uint64, repeated, tag = "4")]
    pub project_ids: ::prost::alloc::vec::Vec<u64>,
    /// start timestamp we want to query data for
    #[prost(message, optional, tag = "5")]
    pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// end timestamp we want to query data for
    #[prost(message, optional, tag = "6")]
    pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// DEPRECATED (not implemented) - use trace_item_type instead
    #[deprecated]
    #[prost(enumeration = "TraceItemName", tag = "7")]
    pub trace_item_name: i32,
    /// the type of the trace item you are querying
    #[prost(enumeration = "TraceItemType", tag = "8")]
    pub trace_item_type: i32,
    /// whether to include debug information in the response
    #[prost(bool, tag = "10")]
    pub debug: bool,
    /// a unique identifier for the request, user doesnt need to set this
    #[prost(string, tag = "11")]
    pub request_id: ::prost::alloc::string::String,
    /// how to query the downsampled storages
    #[prost(message, optional, tag = "12")]
    pub downsampled_storage_config: ::core::option::Option<DownsampledStorageConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseMeta {
    /// id of the request that this response relates to
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional field that is included only if debug is true
    #[prost(message, repeated, tag = "2")]
    pub query_info: ::prost::alloc::vec::Vec<QueryInfo>,
    /// metadata of how the query interacted wit the downsampled storages
    #[prost(message, optional, tag = "3")]
    pub downsampled_storage_meta: ::core::option::Option<DownsampledStorageMeta>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemFilterWithType {
    #[prost(enumeration = "TraceItemType", tag = "1")]
    pub item_type: i32,
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PageToken {
    #[prost(oneof = "page_token::Value", tags = "1, 2, 3")]
    pub value: ::core::option::Option<page_token::Value>,
}
/// Nested message and enum types in `PageToken`.
pub mod page_token {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        /// standard limit/offset pagination
        #[prost(uint64, tag = "1")]
        Offset(u64),
        /// the server may also encode other information indirectly through this filter offset. The client
        /// is not expected and HIGHLY DISCOURAGED from inspecting or modifying the contents of this filter offset
        #[prost(message, tag = "2")]
        FilterOffset(super::TraceItemFilter),
        /// Signifies the end of the pagination sequence. The time window is fully exhausted of results.
        /// if this is not set, there may still be results. If this IS set, there is definitely no more results
        #[prost(bool, tag = "3")]
        EndPagination(bool),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryStats {
    #[prost(int64, tag = "1")]
    pub rows_read: i64,
    #[prost(int64, tag = "2")]
    pub columns_read: i64,
    #[prost(int32, tag = "4")]
    pub blocks: i32,
    #[prost(int64, tag = "5")]
    pub progress_bytes: i64,
    #[prost(int32, tag = "8")]
    pub max_threads: i32,
    #[prost(message, optional, tag = "11")]
    pub timing_marks: ::core::option::Option<TimingMarks>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryMetadata {
    #[prost(string, tag = "1")]
    pub sql: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub clickhouse_table: ::prost::alloc::string::String,
    #[prost(bool, tag = "4")]
    pub r#final: bool,
    #[prost(string, tag = "6")]
    pub query_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "7")]
    pub consistent: bool,
    #[prost(bool, tag = "9")]
    pub cache_hit: bool,
    #[prost(string, tag = "10")]
    pub cluster_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimingMarks {
    #[prost(int64, tag = "1")]
    pub duration_ms: i64,
    #[prost(map = "string, int64", tag = "2")]
    pub marks_ms: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
    #[prost(map = "string, string", tag = "3")]
    pub tags: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(int64, tag = "4")]
    pub timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryInfo {
    #[prost(message, optional, tag = "1")]
    pub stats: ::core::option::Option<QueryStats>,
    #[prost(message, optional, tag = "2")]
    pub metadata: ::core::option::Option<QueryMetadata>,
    #[prost(string, tag = "3")]
    pub trace_logs: ::prost::alloc::string::String,
}
/// DEPRECATED: use TraceItemType instead
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TraceItemName {
    Unspecified = 0,
    EapSpans = 1,
    EapErrors = 2,
}
impl TraceItemName {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TRACE_ITEM_NAME_UNSPECIFIED",
            Self::EapSpans => "TRACE_ITEM_NAME_EAP_SPANS",
            Self::EapErrors => "TRACE_ITEM_NAME_EAP_ERRORS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRACE_ITEM_NAME_UNSPECIFIED" => Some(Self::Unspecified),
            "TRACE_ITEM_NAME_EAP_SPANS" => Some(Self::EapSpans),
            "TRACE_ITEM_NAME_EAP_ERRORS" => Some(Self::EapErrors),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TraceItemType {
    Unspecified = 0,
    Span = 1,
    Error = 2,
    Log = 3,
    UptimeCheck = 4,
    UptimeResult = 5,
    Replay = 6,
    Occurrence = 7,
    Metric = 8,
    ProfileFunction = 9,
    Attachment = 10,
    Preprod = 11,
    UserSession = 12,
    ProcessingError = 13,
}
impl TraceItemType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TRACE_ITEM_TYPE_UNSPECIFIED",
            Self::Span => "TRACE_ITEM_TYPE_SPAN",
            Self::Error => "TRACE_ITEM_TYPE_ERROR",
            Self::Log => "TRACE_ITEM_TYPE_LOG",
            Self::UptimeCheck => "TRACE_ITEM_TYPE_UPTIME_CHECK",
            Self::UptimeResult => "TRACE_ITEM_TYPE_UPTIME_RESULT",
            Self::Replay => "TRACE_ITEM_TYPE_REPLAY",
            Self::Occurrence => "TRACE_ITEM_TYPE_OCCURRENCE",
            Self::Metric => "TRACE_ITEM_TYPE_METRIC",
            Self::ProfileFunction => "TRACE_ITEM_TYPE_PROFILE_FUNCTION",
            Self::Attachment => "TRACE_ITEM_TYPE_ATTACHMENT",
            Self::Preprod => "TRACE_ITEM_TYPE_PREPROD",
            Self::UserSession => "TRACE_ITEM_TYPE_USER_SESSION",
            Self::ProcessingError => "TRACE_ITEM_TYPE_PROCESSING_ERROR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRACE_ITEM_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TRACE_ITEM_TYPE_SPAN" => Some(Self::Span),
            "TRACE_ITEM_TYPE_ERROR" => Some(Self::Error),
            "TRACE_ITEM_TYPE_LOG" => Some(Self::Log),
            "TRACE_ITEM_TYPE_UPTIME_CHECK" => Some(Self::UptimeCheck),
            "TRACE_ITEM_TYPE_UPTIME_RESULT" => Some(Self::UptimeResult),
            "TRACE_ITEM_TYPE_REPLAY" => Some(Self::Replay),
            "TRACE_ITEM_TYPE_OCCURRENCE" => Some(Self::Occurrence),
            "TRACE_ITEM_TYPE_METRIC" => Some(Self::Metric),
            "TRACE_ITEM_TYPE_PROFILE_FUNCTION" => Some(Self::ProfileFunction),
            "TRACE_ITEM_TYPE_ATTACHMENT" => Some(Self::Attachment),
            "TRACE_ITEM_TYPE_PREPROD" => Some(Self::Preprod),
            "TRACE_ITEM_TYPE_USER_SESSION" => Some(Self::UserSession),
            "TRACE_ITEM_TYPE_PROCESSING_ERROR" => Some(Self::ProcessingError),
            _ => None,
        }
    }
}
/// This is a request to the TimeSeries endpoint,
/// it is used to do a timeseries aggregation of a given attribute
/// across traces.
///
/// ex: avg(span.duration) group by db.system
/// this (conceptually) will return a 2d graph where y-axis is avg(span.duration),
/// x-axis is time, and there is a separate line/function on the graph for each db.system value
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeriesRequest {
    /// metadata about the request
    /// used to filter time range, organization, project, etc.
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// filters out spans (TraceItems) that dont meet the criteria
    /// ex: avg(span.duration) where span.environment = 'production'
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    /// deprecated, please use expressions instead
    #[deprecated]
    #[prost(message, repeated, tag = "3")]
    pub aggregations: ::prost::alloc::vec::Vec<AttributeAggregation>,
    /// the actual aggregation to compute ex: avg(span.duration) or avg(span.duration) / sum(span.duration)
    #[prost(message, repeated, tag = "6")]
    pub expressions: ::prost::alloc::vec::Vec<Expression>,
    /// the level of detail in the timeseries graph,
    /// low granularity is very detailed, high is less detail.
    /// ex: if granularity is 1s you will have a data point every 1s,
    /// if its 1m you have a data point every 1m
    /// tip: for performance, if the query is is over a large time period you should
    /// have high granularity
    #[prost(uint64, tag = "4")]
    pub granularity_secs: u64,
    /// attribute key to group by
    /// ex: span.environment might give 3 timeseries lines,
    /// one for prod, one for dev etc
    #[prost(message, repeated, tag = "5")]
    pub group_by: ::prost::alloc::vec::Vec<AttributeKey>,
    /// A list of filters applied to each item type provided. These filters will be applied on a trace level to find traces
    /// that contain each of the provided items with matching conditions. The overall request will then only apply on those traces.
    /// If specified, the endpoint will only consider traces that match all the filters.
    /// ex: Find the number of spans in traces containing a span with op = 'db' that also contain errors with message = 'timeout'
    #[prost(message, repeated, tag = "7")]
    pub trace_filters: ::prost::alloc::vec::Vec<TraceItemFilterWithType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expression {
    #[prost(string, tag = "3")]
    pub label: ::prost::alloc::string::String,
    #[prost(oneof = "expression::Expression", tags = "1, 2, 4, 5")]
    pub expression: ::core::option::Option<expression::Expression>,
}
/// Nested message and enum types in `Expression`.
pub mod expression {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct BinaryFormula {
        #[prost(enumeration = "binary_formula::Op", tag = "1")]
        pub op: i32,
        #[prost(message, optional, boxed, tag = "2")]
        pub left: ::core::option::Option<::prost::alloc::boxed::Box<super::Expression>>,
        #[prost(message, optional, boxed, tag = "3")]
        pub right: ::core::option::Option<::prost::alloc::boxed::Box<super::Expression>>,
        /// optional, if the formula evalutates to null this value is returned
        /// formula can evaluate to null if an attribute is missing for example
        #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")]
        pub default_value: ::core::option::Option<binary_formula::DefaultValue>,
    }
    /// Nested message and enum types in `BinaryFormula`.
    pub mod binary_formula {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Op {
            Unspecified = 0,
            Divide = 1,
            Multiply = 2,
            Add = 3,
            Subtract = 4,
        }
        impl Op {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "OP_UNSPECIFIED",
                    Self::Divide => "OP_DIVIDE",
                    Self::Multiply => "OP_MULTIPLY",
                    Self::Add => "OP_ADD",
                    Self::Subtract => "OP_SUBTRACT",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "OP_UNSPECIFIED" => Some(Self::Unspecified),
                    "OP_DIVIDE" => Some(Self::Divide),
                    "OP_MULTIPLY" => Some(Self::Multiply),
                    "OP_ADD" => Some(Self::Add),
                    "OP_SUBTRACT" => Some(Self::Subtract),
                    _ => None,
                }
            }
        }
        /// optional, if the formula evalutates to null this value is returned
        /// formula can evaluate to null if an attribute is missing for example
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum DefaultValue {
            #[prost(double, tag = "4")]
            DefaultValueDouble(f64),
            #[prost(int64, tag = "5")]
            DefaultValueInt64(i64),
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Expression {
        /// deprecated, please use conditional_aggregation with no filter
        #[deprecated]
        #[prost(message, tag = "1")]
        Aggregation(super::AttributeAggregation),
        #[prost(message, tag = "2")]
        Formula(::prost::alloc::boxed::Box<BinaryFormula>),
        #[prost(message, tag = "4")]
        ConditionalAggregation(super::AttributeConditionalAggregation),
        #[prost(message, tag = "5")]
        Literal(super::Literal),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DataPoint {
    #[prost(float, tag = "1")]
    pub data: f32,
    /// false if this datapoint is empty, true otherwise.
    /// optional, if not set assume true.
    /// used for sparse time series
    #[prost(bool, tag = "2")]
    pub data_present: bool,
    /// only set for extrapolated data points, 0 otherwise
    /// the extrapolated avg sampling rate for this data point
    #[prost(float, tag = "3")]
    pub avg_sampling_rate: f32,
    /// deprecated
    #[deprecated]
    #[prost(bool, tag = "4")]
    pub is_reliable: bool,
    /// the reliability of the data value based on math based on confidence intervals and sample size
    #[prost(enumeration = "Reliability", tag = "5")]
    pub reliability: i32,
    /// the sample count for this data point
    #[prost(int64, tag = "6")]
    pub sample_count: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeries {
    #[prost(string, tag = "1")]
    pub label: ::prost::alloc::string::String,
    /// the names and values of the attribute keys which
    /// were in the group by
    #[prost(map = "string, string", tag = "2")]
    pub group_by_attributes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// time bucket for each data point in the timeseries
    #[prost(message, repeated, tag = "3")]
    pub buckets: ::prost::alloc::vec::Vec<::prost_types::Timestamp>,
    #[prost(message, repeated, tag = "4")]
    pub data_points: ::prost::alloc::vec::Vec<DataPoint>,
    /// number of events used to calculate this timeseries
    #[prost(uint64, tag = "5")]
    pub num_events: u64,
    /// deprecated
    #[deprecated]
    #[prost(float, tag = "6")]
    pub avg_sampling_rate: f32,
}
/// This is the response from the TimeSeries endpoint,
/// it is the counterpart of TimeSeriesRequest
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeriesResponse {
    #[prost(message, repeated, tag = "1")]
    pub result_timeseries: ::prost::alloc::vec::Vec<TimeSeries>,
    #[prost(message, optional, tag = "5")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSubscriptionRequest {
    #[prost(message, optional, tag = "1")]
    pub time_series_request: ::core::option::Option<TimeSeriesRequest>,
    #[prost(uint32, tag = "2")]
    pub time_window_secs: u32,
    #[prost(uint32, tag = "3")]
    pub resolution_secs: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateSubscriptionResponse {
    #[prost(string, tag = "1")]
    pub subscription_id: ::prost::alloc::string::String,
}
/// DeleteTraceItemsRequest either
///
/// 1. initiates a delete of all items in provided trace_ids
/// 1. deletes all items matching a set of TraceItemFilterWithType\[s\]
///    Behavior is unspecified if both trace_ids and filters are provided.
///
/// It should also remove downsampled copies of anything it deletes.
/// The response will be an acknowledgement of a request, but not
/// a guarantee that the delete has been fulfilled.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTraceItemsRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(string, repeated, tag = "2")]
    pub trace_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "3")]
    pub filters: ::prost::alloc::vec::Vec<TraceItemFilterWithType>,
}
/// DeleteTraceItemsResponse notifies acceptance of the delete and returns
/// a count of items matched by the request at query time. This count
/// could change by the time the delete is executed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTraceItemsResponse {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<ResponseMeta>,
    #[prost(uint32, tag = "2")]
    pub matching_items_count: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracePageToken {
    /// This class exists to avoid circular imports with the PageToken class
    /// The next version of the proto will have a PageToken class that can be used
    /// for all endpoints, and this class can be removed.
    #[prost(oneof = "trace_page_token::Value", tags = "1, 2, 3")]
    pub value: ::core::option::Option<trace_page_token::Value>,
}
/// Nested message and enum types in `TracePageToken`.
pub mod trace_page_token {
    /// This class exists to avoid circular imports with the PageToken class
    /// The next version of the proto will have a PageToken class that can be used
    /// for all endpoints, and this class can be removed.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(uint64, tag = "1")]
        Offset(u64),
        /// Instead of using offset (which requires all the scanning and ordering),
        /// the server sends back a filter clause to be added on to the filter conditions
        /// which skips the previous results altogether, avoiding extra scanning and sorting
        #[prost(message, tag = "2")]
        EventFilter(super::EventFilter),
        #[prost(message, tag = "3")]
        TraceFilter(super::TraceFilter),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindTracesRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceFilter>,
    #[prost(message, optional, tag = "3")]
    pub page_token: ::core::option::Option<TracePageToken>,
    #[prost(enumeration = "TraceOrderBy", tag = "4")]
    pub order_by: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TraceResponse {
    #[prost(string, tag = "1")]
    pub trace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "6")]
    pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindTracesResponse {
    #[prost(message, repeated, tag = "1")]
    pub traces: ::prost::alloc::vec::Vec<TraceResponse>,
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<TracePageToken>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventFilter {
    #[prost(enumeration = "TraceItemName", tag = "1")]
    pub trace_item_name: i32,
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndTraceFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrTraceFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotTraceFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<TraceFilter>,
}
/// Represents a set of conditions for finding particular events
/// in a trace. Each EventFilter is meant to find one particular
/// type of event. Those can then be combined to find traces that
/// contain different combinations of events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceFilter {
    #[prost(oneof = "trace_filter::Filter", tags = "1, 2, 3, 4")]
    pub filter: ::core::option::Option<trace_filter::Filter>,
}
/// Nested message and enum types in `TraceFilter`.
pub mod trace_filter {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Filter {
        #[prost(message, tag = "1")]
        AndFilter(super::AndTraceFilter),
        #[prost(message, tag = "2")]
        OrFilter(super::OrTraceFilter),
        #[prost(message, tag = "3")]
        NotFilter(super::NotTraceFilter),
        #[prost(message, tag = "4")]
        EventFilter(super::EventFilter),
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TraceOrderBy {
    Unspecified = 0,
    EndTime = 1,
    TraceDuration = 2,
}
impl TraceOrderBy {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TRACE_ORDER_BY_UNSPECIFIED",
            Self::EndTime => "TRACE_ORDER_BY_END_TIME",
            Self::TraceDuration => "TRACE_ORDER_BY_TRACE_DURATION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRACE_ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
            "TRACE_ORDER_BY_END_TIME" => Some(Self::EndTime),
            "TRACE_ORDER_BY_TRACE_DURATION" => Some(Self::TraceDuration),
            _ => None,
        }
    }
}
/// GetTraceRequest lets you query a trace by trace_id, returning all its items.
///
/// Each item will return every attributes by default or you can pass a list of
/// attributes to return for each item type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTraceRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(string, tag = "2")]
    pub trace_id: ::prost::alloc::string::String,
    /// A list of items and their attributes to return in the response.
    #[prost(message, repeated, tag = "3")]
    pub items: ::prost::alloc::vec::Vec<get_trace_request::TraceItem>,
    /// Optional page token for pagination. If provided, returns the next page of results.
    #[prost(message, optional, tag = "4")]
    pub page_token: ::core::option::Option<PageToken>,
    /// Optional limit on the number of items to return per page. If not specified,
    /// a default limit will be applied by the server.
    #[prost(uint32, tag = "5")]
    pub limit: u32,
}
/// Nested message and enum types in `GetTraceRequest`.
pub mod get_trace_request {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TraceItem {
        /// DEPRECATED: use item_type instead
        #[deprecated]
        #[prost(enumeration = "super::TraceItemName", tag = "1")]
        pub r#type: i32,
        /// If attributes is empty, all attributes will be returned for this type.
        #[prost(message, repeated, tag = "2")]
        pub attributes: ::prost::alloc::vec::Vec<super::AttributeKey>,
        #[prost(enumeration = "super::TraceItemType", tag = "3")]
        pub item_type: i32,
    }
}
/// GetTraceResponse returns a trace and all its items.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTraceResponse {
    #[prost(string, tag = "1")]
    pub trace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub meta: ::core::option::Option<ResponseMeta>,
    #[prost(message, repeated, tag = "3")]
    pub item_groups: ::prost::alloc::vec::Vec<get_trace_response::ItemGroup>,
    /// Page token for the next page of results.
    #[prost(message, optional, tag = "4")]
    pub page_token: ::core::option::Option<PageToken>,
}
/// Nested message and enum types in `GetTraceResponse`.
pub mod get_trace_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Item {
        #[prost(string, tag = "1")]
        pub id: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "2")]
        pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
        #[prost(message, repeated, tag = "3")]
        pub attributes: ::prost::alloc::vec::Vec<item::Attribute>,
    }
    /// Nested message and enum types in `Item`.
    pub mod item {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Attribute {
            #[prost(message, optional, tag = "1")]
            pub key: ::core::option::Option<super::super::AttributeKey>,
            #[prost(message, optional, tag = "2")]
            pub value: ::core::option::Option<super::super::AttributeValue>,
        }
    }
    /// ItemGroup is a list of items of a specific type.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ItemGroup {
        /// DEPRECATED: use item_type instead
        #[deprecated]
        #[prost(enumeration = "super::TraceItemName", tag = "1")]
        pub r#type: i32,
        #[prost(message, repeated, tag = "2")]
        pub items: ::prost::alloc::vec::Vec<Item>,
        #[prost(enumeration = "super::TraceItemType", tag = "3")]
        pub item_type: i32,
    }
}
/// TraceAttribute represents the attribute of a trace.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceAttribute {
    #[prost(enumeration = "trace_attribute::Key", tag = "1")]
    pub key: i32,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<AttributeValue>,
    /// AttributeKey.Type will specify the type of the attribute we return.
    /// It does not need to be sent when requesting an attribute.
    #[prost(enumeration = "attribute_key::Type", tag = "3")]
    pub r#type: i32,
}
/// Nested message and enum types in `TraceAttribute`.
pub mod trace_attribute {
    /// Key lists the available trace attribute keys you can query.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Key {
        Unspecified = 0,
        TraceId = 1,
        /// KEY_START_TIMESTAMP will return the earliest timestamp seen in the trace.
        StartTimestamp = 2,
        /// KEY_ROOT_SPAN_NAME will return the name of the root (segment) span of
        /// the trace.
        RootSpanName = 3,
        /// KEY_TOTAL_ITEM_COUNT will return the count of all the items in a trace,
        /// regardless of the conditions applied.
        TotalItemCount = 4,
        /// KEY_FILTERED_ITEM_COUNT will return the count of items where the filters
        /// apply.
        /// For example, in a trace with 5 items (1 http.server span, 4 db spans),
        /// if we query for traces with span.op == "db", this will return 4.
        FilteredItemCount = 5,
        /// KEY_ROOT_SPAN_DURATION_MS will return the duration of the root span in
        /// milliseconds.
        RootSpanDurationMs = 6,
        /// KEY_ROOT_SPAN_PROJECT_ID returns the project ID associated with the root
        /// span.
        RootSpanProjectId = 7,
        /// KEY_EARLIEST_SPAN_NAME returns the name of the earliest span of a trace,
        /// regardless if it's a root span or not
        EarliestSpanName = 8,
        /// KEY_EARLIEST_FRONTEND_SPAN returns the name of the earliest span emitted
        /// by the frontend (for example, span op being `pageload` or `navigation`).
        EarliestFrontendSpan = 9,
        /// KEY_END_TIMESTAMP will return the latest timestamp seen in the trace.
        EndTimestamp = 10,
        /// KEY_EARLIEST_SPAN_PROJECT_ID returns the project ID associated with the earliest span.
        EarliestSpanProjectId = 11,
        /// KEY_EARLIEST_SPAN_DURATION_MS will return the duration of the earliest span in milliseconds.
        EarliestSpanDurationMs = 12,
        /// KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID returns the project ID associated with the earliest frontend span.
        EarliestFrontendSpanProjectId = 13,
        /// KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS will return the duration of the earliest frontend span in milliseconds.
        EarliestFrontendSpanDurationMs = 14,
    }
    impl Key {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "KEY_UNSPECIFIED",
                Self::TraceId => "KEY_TRACE_ID",
                Self::StartTimestamp => "KEY_START_TIMESTAMP",
                Self::RootSpanName => "KEY_ROOT_SPAN_NAME",
                Self::TotalItemCount => "KEY_TOTAL_ITEM_COUNT",
                Self::FilteredItemCount => "KEY_FILTERED_ITEM_COUNT",
                Self::RootSpanDurationMs => "KEY_ROOT_SPAN_DURATION_MS",
                Self::RootSpanProjectId => "KEY_ROOT_SPAN_PROJECT_ID",
                Self::EarliestSpanName => "KEY_EARLIEST_SPAN_NAME",
                Self::EarliestFrontendSpan => "KEY_EARLIEST_FRONTEND_SPAN",
                Self::EndTimestamp => "KEY_END_TIMESTAMP",
                Self::EarliestSpanProjectId => "KEY_EARLIEST_SPAN_PROJECT_ID",
                Self::EarliestSpanDurationMs => "KEY_EARLIEST_SPAN_DURATION_MS",
                Self::EarliestFrontendSpanProjectId => {
                    "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID"
                }
                Self::EarliestFrontendSpanDurationMs => {
                    "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "KEY_UNSPECIFIED" => Some(Self::Unspecified),
                "KEY_TRACE_ID" => Some(Self::TraceId),
                "KEY_START_TIMESTAMP" => Some(Self::StartTimestamp),
                "KEY_ROOT_SPAN_NAME" => Some(Self::RootSpanName),
                "KEY_TOTAL_ITEM_COUNT" => Some(Self::TotalItemCount),
                "KEY_FILTERED_ITEM_COUNT" => Some(Self::FilteredItemCount),
                "KEY_ROOT_SPAN_DURATION_MS" => Some(Self::RootSpanDurationMs),
                "KEY_ROOT_SPAN_PROJECT_ID" => Some(Self::RootSpanProjectId),
                "KEY_EARLIEST_SPAN_NAME" => Some(Self::EarliestSpanName),
                "KEY_EARLIEST_FRONTEND_SPAN" => Some(Self::EarliestFrontendSpan),
                "KEY_END_TIMESTAMP" => Some(Self::EndTimestamp),
                "KEY_EARLIEST_SPAN_PROJECT_ID" => Some(Self::EarliestSpanProjectId),
                "KEY_EARLIEST_SPAN_DURATION_MS" => Some(Self::EarliestSpanDurationMs),
                "KEY_EARLIEST_FRONTEND_SPAN_PROJECT_ID" => {
                    Some(Self::EarliestFrontendSpanProjectId)
                }
                "KEY_EARLIEST_FRONTEND_SPAN_DURATION_MS" => {
                    Some(Self::EarliestFrontendSpanDurationMs)
                }
                _ => None,
            }
        }
    }
}
/// GetTracesRequest lets you query traces with various attributes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTracesRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(uint32, tag = "3")]
    pub limit: u32,
    /// List of filters on items of the trace we'll use when querying.
    #[prost(message, repeated, tag = "4")]
    pub filters: ::prost::alloc::vec::Vec<get_traces_request::TraceFilter>,
    /// List of attributes we'd like to order by.
    #[prost(message, repeated, tag = "5")]
    pub order_by: ::prost::alloc::vec::Vec<get_traces_request::OrderBy>,
    /// List of attributes we want to query.
    #[prost(message, repeated, tag = "6")]
    pub attributes: ::prost::alloc::vec::Vec<TraceAttribute>,
}
/// Nested message and enum types in `GetTracesRequest`.
pub mod get_traces_request {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct OrderBy {
        #[prost(enumeration = "super::trace_attribute::Key", tag = "1")]
        pub key: i32,
        #[prost(bool, tag = "2")]
        pub descending: bool,
    }
    /// TraceFilter specifies conditions to apply on the items contained in a trace.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TraceFilter {
        /// DEPRECATED: use item_type
        #[deprecated]
        #[prost(enumeration = "super::TraceItemName", tag = "1")]
        pub item_name: i32,
        #[prost(message, optional, tag = "2")]
        pub filter: ::core::option::Option<super::TraceItemFilter>,
        /// the item type we will apply the filter condition on.
        #[prost(enumeration = "super::TraceItemType", tag = "3")]
        pub item_type: i32,
    }
}
/// GetTracesResponse contains a list of traces returned by the request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTracesResponse {
    #[prost(message, optional, tag = "1")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(message, optional, tag = "2")]
    pub meta: ::core::option::Option<ResponseMeta>,
    /// List of traces matching conditions.
    #[prost(message, repeated, tag = "3")]
    pub traces: ::prost::alloc::vec::Vec<get_traces_response::Trace>,
}
/// Nested message and enum types in `GetTracesResponse`.
pub mod get_traces_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Trace {
        /// List of attributes queried.
        #[prost(message, repeated, tag = "1")]
        pub attributes: ::prost::alloc::vec::Vec<super::TraceAttribute>,
    }
}
/// TraceItemAttributeNamesRequest is a request to the TraceItemAttributeNames endpoint,
/// it returns the names of all queryable "TraceItemAttributes" that exist in the given projects,
/// date range, and other filters.
///
/// TraceItem are things like: span, error, log, replay
/// TraceItemAttributes could be things like: sentry.duration,user_id cart_total, etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributeNamesRequest {
    /// metadata about the request
    /// this is where you specify organization, project, time range etc.
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// maximum number of attributes to return
    #[prost(uint32, tag = "2")]
    pub limit: u32,
    /// offset is deprecated, please use `page_token` instead
    #[deprecated]
    #[prost(uint32, tag = "3")]
    pub offset: u32,
    /// The type of the attributes to return, must be specified,
    /// only TYPE_STRING and TYPE_FLOAT are supported, anything else will return empty response
    #[prost(enumeration = "attribute_key::Type", tag = "5")]
    pub r#type: i32,
    /// optionalfilter to only return attribute names that match the given substring
    #[prost(string, tag = "6")]
    pub value_substring_match: ::prost::alloc::string::String,
    /// optional, used for pagination, the next page token will be returned in the response
    #[prost(message, optional, tag = "7")]
    pub page_token: ::core::option::Option<PageToken>,
    /// A filter to only get relevant attribute keys
    /// including this makes sure that only attribute keys are returned
    /// which *intersect* with the ones specified in the filter.
    /// This is a BEST-EFFORT operation. If no co-occurring keys are found within
    /// 1 second, the endpoint returns without taking the intersecing attributes into account
    #[prost(message, optional, tag = "8")]
    pub intersecting_attributes_filter: ::core::option::Option<TraceItemFilter>,
}
/// TraceItemAttributeNamesResponse is the response returned by the TraceItemAttributeNames endpoint.
/// It is the counterpart to TraceItemAttributeNamesRequest.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributeNamesResponse {
    /// all attributes that matched the filters in the request
    #[prost(message, repeated, tag = "1")]
    pub attributes: ::prost::alloc::vec::Vec<
        trace_item_attribute_names_response::Attribute,
    >,
    /// page token for the next page of results
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
    /// metadata about the response
    #[prost(message, optional, tag = "3")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
/// Nested message and enum types in `TraceItemAttributeNamesResponse`.
pub mod trace_item_attribute_names_response {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Attribute {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(enumeration = "super::attribute_key::Type", tag = "2")]
        pub r#type: i32,
    }
}
/// TraceItemAttributeValuesRequest is a request to the TraceItemAttributeValues endpoint,
/// it returns the set of all possible values for the given attribute key, across the given
/// organization, project_id, timerange etc (specified in meta).
///
/// This endpoint only supports string values, it does not make sense
/// to get all the possible values of a numerical attribute
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributeValuesRequest {
    /// metadata about the request
    /// this is where you specify organization, project, time range etc.
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// attribute you want the values of
    #[prost(message, optional, tag = "2")]
    pub key: ::core::option::Option<AttributeKey>,
    /// deprecated, please use the `key` field instead
    #[deprecated]
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// a substring of the value being searched for,
    /// only values matching this substring will be returned.
    /// only strict substring supported, no regex
    #[prost(string, tag = "4")]
    pub value_substring_match: ::prost::alloc::string::String,
    /// max number of values to return
    #[prost(uint32, tag = "5")]
    pub limit: u32,
    /// optional, used for pagination, the next page token will be returned in the response
    #[prost(message, optional, tag = "6")]
    pub page_token: ::core::option::Option<PageToken>,
}
/// TraceItemAttributeValuesResponse is a response from the TraceItemAttributeValues endpoint
/// it is the counterpart to TraceItemAttributesRequest
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemAttributeValuesResponse {
    /// all the values that matched the criteria specified in the request
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(int64, repeated, tag = "3")]
    pub counts: ::prost::alloc::vec::Vec<i64>,
    /// page token for the next page of results
    #[prost(message, optional, tag = "6")]
    pub page_token: ::core::option::Option<PageToken>,
    /// metadata about the response
    #[prost(message, optional, tag = "7")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
/// This is a request to the TraceItemDetails endpoint,
/// it is used to query for TraceItems (ex. spans or logs)
/// it returns all of the information for a specific trace item.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemDetailsRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// required: the ID (hex string) of the item you are looking for
    #[prost(string, tag = "2")]
    pub item_id: ::prost::alloc::string::String,
    /// required: the trace ID of the item.
    #[prost(string, tag = "4")]
    pub trace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub filter: ::core::option::Option<TraceItemFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemDetailsAttribute {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<AttributeValue>,
}
/// this is a response from the TraceItemDetails endpoint
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemDetailsResponse {
    #[prost(string, tag = "1")]
    pub item_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, repeated, tag = "3")]
    pub attributes: ::prost::alloc::vec::Vec<TraceItemDetailsAttribute>,
    #[prost(message, optional, tag = "4")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeDistributionsRequest {
    /// max_buckets and limit wouldn't apply to other stats types (like totals)
    #[prost(uint32, tag = "1")]
    pub max_buckets: u32,
    #[prost(uint32, tag = "2")]
    pub max_attributes: u32,
    /// if specified, only the attributes in the allow list will be returned
    #[prost(message, repeated, tag = "3")]
    pub attributes: ::prost::alloc::vec::Vec<AttributeKey>,
}
/// This is a request for a heatmap, the x-axis is every distinct value of x_attribute,
/// the y-axis is the numerical_y_attribute divided into num_y_buckets buckets. A
/// single x,y coordinate has the count of trace-items that fit into that bucket.
///
/// Example Request:
/// x_attribute = "span.op"
/// numerical_y_attribute = "eap.duration"
/// num_y_buckets = 4
///
/// Example Response:
/// span.op = "db.query"
///
/// * duration 0-100ms: 10
/// * duration 100-200ms: 30
/// * duration 200-300ms: 20
/// * duration 300-400ms: 0
///
/// span.op = "http.server"
/// ...
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeatmapRequest {
    #[prost(message, optional, tag = "1")]
    pub x_attribute: ::core::option::Option<AttributeKey>,
    #[prost(message, optional, tag = "2")]
    pub y_attribute: ::core::option::Option<AttributeKey>,
    /// these are only used if the attribute is numeric and needs to be bucketed
    #[prost(uint32, optional, tag = "3")]
    pub num_y_buckets: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "4")]
    pub num_x_buckets: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatsType {
    #[prost(oneof = "stats_type::Type", tags = "1, 2")]
    pub r#type: ::core::option::Option<stats_type::Type>,
}
/// Nested message and enum types in `StatsType`.
pub mod stats_type {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Type {
        #[prost(message, tag = "1")]
        AttributeDistributions(super::AttributeDistributionsRequest),
        #[prost(message, tag = "2")]
        Heatmap(super::HeatmapRequest),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemStatsRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// same filter applies to all stats types requested
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    #[prost(message, repeated, tag = "3")]
    pub stats_types: ::prost::alloc::vec::Vec<StatsType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeDistribution {
    #[prost(string, tag = "1")]
    pub attribute_name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub buckets: ::prost::alloc::vec::Vec<attribute_distribution::Bucket>,
}
/// Nested message and enum types in `AttributeDistribution`.
pub mod attribute_distribution {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Bucket {
        #[prost(string, tag = "1")]
        pub label: ::prost::alloc::string::String,
        #[prost(float, tag = "2")]
        pub value: f32,
        #[prost(message, optional, tag = "3")]
        pub last_seen: ::core::option::Option<::prost_types::Timestamp>,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeDistributions {
    #[prost(message, repeated, tag = "1")]
    pub attributes: ::prost::alloc::vec::Vec<AttributeDistribution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatrixColumn {
    #[prost(message, optional, tag = "1")]
    pub x_label: ::core::option::Option<AttributeValue>,
    #[prost(float, repeated, tag = "2")]
    pub values: ::prost::alloc::vec::Vec<f32>,
}
/// This is a heatmap, example heatmap:
/// x_attribute = "span.op"
/// y_attribute = "duration"
/// y_buckets = \[0-100, 100-200, 200-300, 300-400\]
/// data = \[
/// "db_query": \[10, 20, 30, 40\],
/// "http_server": \[50, 60, 70, 80\],
/// \]
///
/// this means there are 20 trace-items with span.op = "db.query" and duration 100-200ms,
/// etc.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Heatmap {
    #[prost(message, optional, tag = "1")]
    pub x_attribute: ::core::option::Option<AttributeKey>,
    #[prost(message, optional, tag = "2")]
    pub y_attribute: ::core::option::Option<AttributeKey>,
    #[prost(message, repeated, tag = "3")]
    pub y_buckets: ::prost::alloc::vec::Vec<AttributeValue>,
    /// the `values` array in each MatrixColumn and `y_buckets` are associative arrays
    #[prost(message, repeated, tag = "4")]
    pub data: ::prost::alloc::vec::Vec<MatrixColumn>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemStatsResult {
    #[prost(oneof = "trace_item_stats_result::Result", tags = "1, 2")]
    pub result: ::core::option::Option<trace_item_stats_result::Result>,
}
/// Nested message and enum types in `TraceItemStatsResult`.
pub mod trace_item_stats_result {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Result {
        #[prost(message, tag = "1")]
        AttributeDistributions(super::AttributeDistributions),
        #[prost(message, tag = "2")]
        Heatmap(super::Heatmap),
    }
}
/// this is a response from the TraceItemStats endpoint
/// it is the counterpart to TraceItemStatsRequest
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemStatsResponse {
    #[prost(message, repeated, tag = "1")]
    pub results: ::prost::alloc::vec::Vec<TraceItemStatsResult>,
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(message, optional, tag = "3")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
/// This is a request to the TraceItemTable endpoint,
/// it is used to query for TraceItems (ex. spans)
/// it returns tabular data where each row is a TraceItem,
/// and the columns are the attributes of the TraceItem
/// it can also be used for aggregations
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemTableRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    /// the columns or aggregations you want to get
    #[prost(message, repeated, tag = "2")]
    pub columns: ::prost::alloc::vec::Vec<Column>,
    /// filter out trace items you dont want
    #[prost(message, optional, tag = "3")]
    pub filter: ::core::option::Option<TraceItemFilter>,
    #[prost(message, repeated, tag = "4")]
    pub order_by: ::prost::alloc::vec::Vec<trace_item_table_request::OrderBy>,
    #[prost(message, repeated, tag = "5")]
    pub group_by: ::prost::alloc::vec::Vec<AttributeKey>,
    #[prost(uint32, tag = "6")]
    pub limit: u32,
    /// optional, used for pagination, the next page token will be returned in the response
    #[prost(message, optional, tag = "7")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(message, repeated, tag = "8")]
    pub virtual_column_contexts: ::prost::alloc::vec::Vec<VirtualColumnContext>,
    /// optional, filter out results of aggregates, same as SQL HAVING
    #[prost(message, optional, tag = "9")]
    pub aggregation_filter: ::core::option::Option<AggregationFilter>,
    /// A list of filters applied to each item type provided. These filters will be applied on a trace level to find traces
    /// that contain each of the provided items with matching conditions. The overall request will then only apply on those traces.
    /// If specified, the endpoint will only consider traces that match all the filters.
    /// ex: Find spans in traces containing a span with op = 'db' that also contain errors with message = 'timeout'
    #[prost(message, repeated, tag = "10")]
    pub trace_filters: ::prost::alloc::vec::Vec<TraceItemFilterWithType>,
}
/// Nested message and enum types in `TraceItemTableRequest`.
pub mod trace_item_table_request {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OrderBy {
        #[prost(message, optional, tag = "1")]
        pub column: ::core::option::Option<super::Column>,
        #[prost(bool, tag = "2")]
        pub descending: bool,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregationAndFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<AggregationFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregationOrFilter {
    #[prost(message, repeated, tag = "1")]
    pub filters: ::prost::alloc::vec::Vec<AggregationFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregationComparisonFilter {
    /// deprecated as columns should always be aggregated in a post aggregation filter
    #[deprecated]
    #[prost(message, optional, tag = "1")]
    pub column: ::core::option::Option<Column>,
    #[prost(enumeration = "aggregation_comparison_filter::Op", tag = "2")]
    pub op: i32,
    /// since only aggregated columns are supported, the value should be numeric
    #[deprecated]
    #[prost(message, optional, tag = "3")]
    pub value: ::core::option::Option<AttributeValue>,
    #[prost(double, tag = "5")]
    pub val: f64,
    #[prost(message, optional, tag = "4")]
    pub aggregation: ::core::option::Option<AttributeAggregation>,
    #[prost(message, optional, tag = "6")]
    pub conditional_aggregation: ::core::option::Option<AttributeConditionalAggregation>,
    #[prost(message, optional, tag = "7")]
    pub formula: ::core::option::Option<column::BinaryFormula>,
}
/// Nested message and enum types in `AggregationComparisonFilter`.
pub mod aggregation_comparison_filter {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Op {
        Unspecified = 0,
        LessThan = 1,
        GreaterThan = 2,
        LessThanOrEquals = 3,
        GreaterThanOrEquals = 4,
        Equals = 5,
        NotEquals = 6,
    }
    impl Op {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "OP_UNSPECIFIED",
                Self::LessThan => "OP_LESS_THAN",
                Self::GreaterThan => "OP_GREATER_THAN",
                Self::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS",
                Self::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS",
                Self::Equals => "OP_EQUALS",
                Self::NotEquals => "OP_NOT_EQUALS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OP_UNSPECIFIED" => Some(Self::Unspecified),
                "OP_LESS_THAN" => Some(Self::LessThan),
                "OP_GREATER_THAN" => Some(Self::GreaterThan),
                "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals),
                "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals),
                "OP_EQUALS" => Some(Self::Equals),
                "OP_NOT_EQUALS" => Some(Self::NotEquals),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregationFilter {
    #[prost(oneof = "aggregation_filter::Value", tags = "1, 2, 3")]
    pub value: ::core::option::Option<aggregation_filter::Value>,
}
/// Nested message and enum types in `AggregationFilter`.
pub mod aggregation_filter {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(message, tag = "1")]
        AndFilter(super::AggregationAndFilter),
        #[prost(message, tag = "2")]
        OrFilter(super::AggregationOrFilter),
        #[prost(message, tag = "3")]
        ComparisonFilter(super::AggregationComparisonFilter),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Column {
    #[prost(string, tag = "3")]
    pub label: ::prost::alloc::string::String,
    #[prost(oneof = "column::Column", tags = "1, 2, 5, 4, 6, 7")]
    pub column: ::core::option::Option<column::Column>,
}
/// Nested message and enum types in `Column`.
pub mod column {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct BinaryFormula {
        #[prost(enumeration = "binary_formula::Op", tag = "1")]
        pub op: i32,
        #[prost(message, optional, boxed, tag = "2")]
        pub left: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
        #[prost(message, optional, boxed, tag = "3")]
        pub right: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
        /// optional, if the formula evalutates to null this value is returned
        /// formula can evaluate to null if an attribute is missing for example
        #[prost(oneof = "binary_formula::DefaultValue", tags = "4, 5")]
        pub default_value: ::core::option::Option<binary_formula::DefaultValue>,
    }
    /// Nested message and enum types in `BinaryFormula`.
    pub mod binary_formula {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Op {
            Unspecified = 0,
            Divide = 1,
            Multiply = 2,
            Add = 3,
            Subtract = 4,
        }
        impl Op {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "OP_UNSPECIFIED",
                    Self::Divide => "OP_DIVIDE",
                    Self::Multiply => "OP_MULTIPLY",
                    Self::Add => "OP_ADD",
                    Self::Subtract => "OP_SUBTRACT",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "OP_UNSPECIFIED" => Some(Self::Unspecified),
                    "OP_DIVIDE" => Some(Self::Divide),
                    "OP_MULTIPLY" => Some(Self::Multiply),
                    "OP_ADD" => Some(Self::Add),
                    "OP_SUBTRACT" => Some(Self::Subtract),
                    _ => None,
                }
            }
        }
        /// optional, if the formula evalutates to null this value is returned
        /// formula can evaluate to null if an attribute is missing for example
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum DefaultValue {
            #[prost(double, tag = "4")]
            DefaultValueDouble(f64),
            #[prost(int64, tag = "5")]
            DefaultValueInt64(i64),
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FormulaCondition {
        #[prost(message, optional, boxed, tag = "1")]
        pub left: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
        #[prost(enumeration = "formula_condition::Op", tag = "2")]
        pub op: i32,
        #[prost(message, optional, boxed, tag = "3")]
        pub right: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
    }
    /// Nested message and enum types in `FormulaCondition`.
    pub mod formula_condition {
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Op {
            Unspecified = 0,
            LessThan = 1,
            GreaterThan = 2,
            LessThanOrEquals = 3,
            GreaterThanOrEquals = 4,
            Equals = 5,
            NotEquals = 6,
        }
        impl Op {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "OP_UNSPECIFIED",
                    Self::LessThan => "OP_LESS_THAN",
                    Self::GreaterThan => "OP_GREATER_THAN",
                    Self::LessThanOrEquals => "OP_LESS_THAN_OR_EQUALS",
                    Self::GreaterThanOrEquals => "OP_GREATER_THAN_OR_EQUALS",
                    Self::Equals => "OP_EQUALS",
                    Self::NotEquals => "OP_NOT_EQUALS",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "OP_UNSPECIFIED" => Some(Self::Unspecified),
                    "OP_LESS_THAN" => Some(Self::LessThan),
                    "OP_GREATER_THAN" => Some(Self::GreaterThan),
                    "OP_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals),
                    "OP_GREATER_THAN_OR_EQUALS" => Some(Self::GreaterThanOrEquals),
                    "OP_EQUALS" => Some(Self::Equals),
                    "OP_NOT_EQUALS" => Some(Self::NotEquals),
                    _ => None,
                }
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ConditionalFormula {
        #[prost(message, optional, boxed, tag = "1")]
        pub condition: ::core::option::Option<
            ::prost::alloc::boxed::Box<FormulaCondition>,
        >,
        #[prost(message, optional, boxed, tag = "2")]
        pub r#match: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
        #[prost(message, optional, boxed, tag = "3")]
        pub default: ::core::option::Option<::prost::alloc::boxed::Box<super::Column>>,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Column {
        #[prost(message, tag = "1")]
        Key(super::AttributeKey),
        #[prost(message, tag = "2")]
        Aggregation(super::AttributeAggregation),
        #[prost(message, tag = "5")]
        ConditionalAggregation(super::AttributeConditionalAggregation),
        #[prost(message, tag = "4")]
        Formula(::prost::alloc::boxed::Box<BinaryFormula>),
        #[prost(message, tag = "6")]
        Literal(super::Literal),
        #[prost(message, tag = "7")]
        ConditionalFormula(::prost::alloc::boxed::Box<ConditionalFormula>),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemColumnValues {
    #[prost(string, tag = "1")]
    pub attribute_name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub results: ::prost::alloc::vec::Vec<AttributeValue>,
    /// reliability of the values based on confidence interval and sample size math
    #[prost(enumeration = "Reliability", repeated, tag = "3")]
    pub reliabilities: ::prost::alloc::vec::Vec<i32>,
}
/// this is a response from the TraceItemTable endpoint
/// it is the counterpart to TraceItemTableRequest
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItemTableResponse {
    /// the rows
    #[prost(message, repeated, tag = "1")]
    pub column_values: ::prost::alloc::vec::Vec<TraceItemColumnValues>,
    /// page token for the next page of results
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(message, optional, tag = "3")]
    pub meta: ::core::option::Option<ResponseMeta>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTraceItemTableSubscriptionRequest {
    #[prost(message, optional, tag = "1")]
    pub table_request: ::core::option::Option<TraceItemTableRequest>,
    #[prost(uint64, tag = "2")]
    pub project_id: u64,
    #[prost(uint32, tag = "3")]
    pub time_window: u32,
    #[prost(uint32, tag = "4")]
    pub resolution: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateTraceItemTableSubscriptionResponse {
    #[prost(string, tag = "1")]
    pub subscription_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnyValue {
    #[prost(oneof = "any_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")]
    pub value: ::core::option::Option<any_value::Value>,
}
/// Nested message and enum types in `AnyValue`.
pub mod any_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(string, tag = "1")]
        StringValue(::prost::alloc::string::String),
        #[prost(bool, tag = "2")]
        BoolValue(bool),
        #[prost(int64, tag = "3")]
        IntValue(i64),
        #[prost(double, tag = "4")]
        DoubleValue(f64),
        #[prost(message, tag = "5")]
        ArrayValue(super::ArrayValue),
        #[prost(message, tag = "6")]
        KvlistValue(super::KeyValueList),
        #[prost(bytes, tag = "7")]
        BytesValue(::prost::alloc::vec::Vec<u8>),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArrayValue {
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<AnyValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValueList {
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<KeyValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValue {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<AnyValue>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CategoryCount {
    /// DataCategory that defined in Relay
    #[prost(uint32, tag = "1")]
    pub data_category: u32,
    #[prost(uint64, tag = "2")]
    pub quantity: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Outcomes {
    #[prost(message, repeated, tag = "1")]
    pub category_count: ::prost::alloc::vec::Vec<CategoryCount>,
    #[prost(uint64, tag = "2")]
    pub key_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TraceItem {
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    #[prost(uint64, tag = "2")]
    pub project_id: u64,
    #[prost(string, tag = "3")]
    pub trace_id: ::prost::alloc::string::String,
    /// item_id as bytes, little endian
    #[prost(bytes = "vec", tag = "4")]
    pub item_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(enumeration = "TraceItemType", tag = "5")]
    pub item_type: i32,
    #[prost(message, optional, tag = "6")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(map = "string, message", tag = "7")]
    pub attributes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        AnyValue,
    >,
    #[prost(double, tag = "8")]
    pub client_sample_rate: f64,
    #[prost(double, tag = "9")]
    pub server_sample_rate: f64,
    /// Internal fields
    #[prost(uint32, tag = "100")]
    pub retention_days: u32,
    #[prost(message, optional, tag = "101")]
    pub received: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(uint32, tag = "102")]
    pub downsampled_retention_days: u32,
    #[prost(message, optional, tag = "110")]
    pub outcomes: ::core::option::Option<Outcomes>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportTraceItemsRequest {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<RequestMeta>,
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
    #[prost(uint32, tag = "3")]
    pub limit: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportTraceItemsResponse {
    #[prost(message, repeated, tag = "1")]
    pub trace_items: ::prost::alloc::vec::Vec<TraceItem>,
    #[prost(message, optional, tag = "2")]
    pub page_token: ::core::option::Option<PageToken>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
    /// The HTTP status code corresponding to this error
    #[prost(int32, tag = "1")]
    pub code: i32,
    /// The developer-facing message
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    /// Additional error information
    #[prost(message, repeated, tag = "3")]
    pub details: ::prost::alloc::vec::Vec<::prost_types::Any>,
}