1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
// This file is @generated by prost-build.
/// Audit log format for BigQuery cloud audit logs metadata.
///
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryAuditMetadata {
    /// First party (Google) application specific metadata.
    #[prost(message, optional, tag = "24")]
    pub first_party_app_metadata: ::core::option::Option<
        big_query_audit_metadata::FirstPartyAppMetadata,
    >,
    /// BigQuery event information.
    #[prost(
        oneof = "big_query_audit_metadata::Event",
        tags = "1, 2, 23, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 19, 16, 17, 18, 20, 21, 22, 25"
    )]
    pub event: ::core::option::Option<big_query_audit_metadata::Event>,
}
/// Nested message and enum types in `BigQueryAuditMetadata`.
pub mod big_query_audit_metadata {
    /// Job insertion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobInsertion {
        /// Job metadata.
        #[prost(message, optional, tag = "1")]
        pub job: ::core::option::Option<Job>,
        /// Describes how the job was inserted.
        #[prost(enumeration = "job_insertion::Reason", tag = "2")]
        pub reason: i32,
    }
    /// Nested message and enum types in `JobInsertion`.
    pub mod job_insertion {
        /// Describes how the job was inserted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Job was inserted using the jobs.insert API.
            JobInsertRequest = 1,
            /// Job was inserted using the jobs.query RPC.
            QueryRequest = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::JobInsertRequest => "JOB_INSERT_REQUEST",
                    Reason::QueryRequest => "QUERY_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB_INSERT_REQUEST" => Some(Self::JobInsertRequest),
                    "QUERY_REQUEST" => Some(Self::QueryRequest),
                    _ => None,
                }
            }
        }
    }
    /// Job state change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobChange {
        /// Job state before the job state change.
        #[prost(enumeration = "JobState", tag = "1")]
        pub before: i32,
        /// Job state after the job state change.
        #[prost(enumeration = "JobState", tag = "2")]
        pub after: i32,
        /// Job metadata.
        #[prost(message, optional, tag = "3")]
        pub job: ::core::option::Option<Job>,
    }
    /// Job deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobDeletion {
        /// Job URI.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "1")]
        pub job_name: ::prost::alloc::string::String,
        /// Describes how the job was deleted.
        #[prost(enumeration = "job_deletion::Reason", tag = "2")]
        pub reason: i32,
    }
    /// Nested message and enum types in `JobDeletion`.
    pub mod job_deletion {
        /// Describes how the job was deleted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Job was deleted using the jobs.delete API.
            JobDeleteRequest = 1,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::JobDeleteRequest => "JOB_DELETE_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB_DELETE_REQUEST" => Some(Self::JobDeleteRequest),
                    _ => None,
                }
            }
        }
    }
    /// Dataset creation event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DatasetCreation {
        /// Dataset metadata.
        #[prost(message, optional, tag = "1")]
        pub dataset: ::core::option::Option<Dataset>,
        /// Describes how the dataset was created.
        #[prost(enumeration = "dataset_creation::Reason", tag = "2")]
        pub reason: i32,
        /// The URI of the job that created the dataset.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "3")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `DatasetCreation`.
    pub mod dataset_creation {
        /// Describes how the dataset was created.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Dataset was created using the datasets.create API.
            Create = 1,
            /// Dataset was created using a query job, e.g., CREATE SCHEMA statement.
            Query = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Create => "CREATE",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "CREATE" => Some(Self::Create),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Dataset change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DatasetChange {
        /// Dataset metadata after the change.
        #[prost(message, optional, tag = "1")]
        pub dataset: ::core::option::Option<Dataset>,
        /// Describes how the dataset was changed.
        #[prost(enumeration = "dataset_change::Reason", tag = "2")]
        pub reason: i32,
        /// The URI of the job that updated the dataset.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "3")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `DatasetChange`.
    pub mod dataset_change {
        /// Describes how the dataset was changed.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Dataset was changed using the datasets.update or datasets.patch API.
            Update = 1,
            /// Dataset was changed using the SetIamPolicy API.
            SetIamPolicy = 2,
            /// Dataset was changed using a query job, e.g., ALTER SCHEMA statement.
            Query = 3,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Update => "UPDATE",
                    Reason::SetIamPolicy => "SET_IAM_POLICY",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "UPDATE" => Some(Self::Update),
                    "SET_IAM_POLICY" => Some(Self::SetIamPolicy),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Dataset deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DatasetDeletion {
        /// Describes how the dataset was deleted.
        #[prost(enumeration = "dataset_deletion::Reason", tag = "1")]
        pub reason: i32,
        /// The URI of the job that deleted the dataset.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `DatasetDeletion`.
    pub mod dataset_deletion {
        /// Describes how the dataset was deleted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Dataset was deleted using the datasets.delete API.
            Delete = 1,
            /// Dataset was deleted using a query job, e.g., DROP SCHEMA statement.
            Query = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Delete => "DELETE",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "DELETE" => Some(Self::Delete),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Table creation event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableCreation {
        /// Table metadata.
        #[prost(message, optional, tag = "1")]
        pub table: ::core::option::Option<Table>,
        /// Describes how the table was created.
        #[prost(enumeration = "table_creation::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that created a table.
        /// Present if the reason is JOB or QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `TableCreation`.
    pub mod table_creation {
        /// Describes how the table was created.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Table was created as a destination table during a query, load or copy
            /// job.
            Job = 1,
            /// Table was created using a DDL query.
            Query = 2,
            /// Table was created using the tables.create API.
            TableInsertRequest = 3,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Job => "JOB",
                    Reason::Query => "QUERY",
                    Reason::TableInsertRequest => "TABLE_INSERT_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB" => Some(Self::Job),
                    "QUERY" => Some(Self::Query),
                    "TABLE_INSERT_REQUEST" => Some(Self::TableInsertRequest),
                    _ => None,
                }
            }
        }
    }
    /// Model creation event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelCreation {
        /// Model metadata.
        #[prost(message, optional, tag = "1")]
        pub model: ::core::option::Option<Model>,
        /// Describes how the model was created.
        #[prost(enumeration = "model_creation::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that created the model.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ModelCreation`.
    pub mod model_creation {
        /// Describes how the model was created.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Model was created using a DDL query.
            Query = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Routine creation event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RoutineCreation {
        /// Created routine.
        #[prost(message, optional, tag = "1")]
        pub routine: ::core::option::Option<Routine>,
        /// Describes how the routine was created.
        #[prost(enumeration = "routine_creation::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that created the routine.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `RoutineCreation`.
    pub mod routine_creation {
        /// Describes how the routine was created.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Routine was created using a DDL query.
            Query = 1,
            /// Routine was created using the routines.create API.
            RoutineInsertRequest = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Query => "QUERY",
                    Reason::RoutineInsertRequest => "ROUTINE_INSERT_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "QUERY" => Some(Self::Query),
                    "ROUTINE_INSERT_REQUEST" => Some(Self::RoutineInsertRequest),
                    _ => None,
                }
            }
        }
    }
    /// Table data read event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableDataRead {
        /// List of the accessed fields. Entire list is truncated if the record size
        /// exceeds 100K.
        #[prost(string, repeated, tag = "2")]
        pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// True if the fields list was truncated.
        #[prost(bool, tag = "8")]
        pub fields_truncated: bool,
        /// List of the referenced policy tags. That is, policy tags attached to the
        /// accessed fields or their ancestors.
        /// Policy tag resource name is a string of the format:
        /// `projects/<project_id>/locations/<location_id>/taxonomies/<taxonomy_id>/policyTags/<policy_tag_id>`
        #[prost(string, repeated, tag = "9")]
        pub policy_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// True if the policy tag list was truncated. At most 100 policy tags can be
        /// saved.
        #[prost(bool, tag = "10")]
        pub policy_tags_truncated: bool,
        /// Describes how the table data was read.
        #[prost(enumeration = "table_data_read::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that read a table.
        /// Present if the reason is JOB but can be redacted for privacy reasons.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
        /// The URI of the read session that read a table.
        /// Present if the reason is CREATE_READ_SESSION.
        ///
        /// Format:
        /// `projects/<project_id>/locations/<location>/sessions/<session_id>`.
        #[prost(string, tag = "5")]
        pub session_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `TableDataRead`.
    pub mod table_data_read {
        /// Describes how the table data was read.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Table was used as a source table during a BigQuery job.
            Job = 1,
            /// Table data was accessed using the tabledata.list API.
            TabledataListRequest = 2,
            /// Table data was accessed using the jobs.getQueryResults API.
            GetQueryResultsRequest = 3,
            /// Table data was accessed using the jobs.query RPC.
            QueryRequest = 4,
            /// Table data was accessed using storage.CreateReadSession API.
            CreateReadSession = 5,
            /// Table data was accessed during a materialized view refresh.
            MaterializedViewRefresh = 6,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Job => "JOB",
                    Reason::TabledataListRequest => "TABLEDATA_LIST_REQUEST",
                    Reason::GetQueryResultsRequest => "GET_QUERY_RESULTS_REQUEST",
                    Reason::QueryRequest => "QUERY_REQUEST",
                    Reason::CreateReadSession => "CREATE_READ_SESSION",
                    Reason::MaterializedViewRefresh => "MATERIALIZED_VIEW_REFRESH",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB" => Some(Self::Job),
                    "TABLEDATA_LIST_REQUEST" => Some(Self::TabledataListRequest),
                    "GET_QUERY_RESULTS_REQUEST" => Some(Self::GetQueryResultsRequest),
                    "QUERY_REQUEST" => Some(Self::QueryRequest),
                    "CREATE_READ_SESSION" => Some(Self::CreateReadSession),
                    "MATERIALIZED_VIEW_REFRESH" => Some(Self::MaterializedViewRefresh),
                    _ => None,
                }
            }
        }
    }
    /// Table metadata change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableChange {
        /// Updated table metadata.
        #[prost(message, optional, tag = "1")]
        pub table: ::core::option::Option<Table>,
        /// True if the table was truncated.
        #[prost(bool, tag = "4")]
        pub truncated: bool,
        /// Describes how the table metadata was changed.
        #[prost(enumeration = "table_change::Reason", tag = "5")]
        pub reason: i32,
        /// The URI of the job that changed a table.
        /// Present if the reason is JOB or QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "6")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `TableChange`.
    pub mod table_change {
        /// Describes how the table metadata was changed.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Table metadata was updated using the tables.update or tables.patch API.
            TableUpdateRequest = 1,
            /// Table was used as a job destination table.
            Job = 2,
            /// Table metadata was updated using a DML or DDL query.
            Query = 3,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::TableUpdateRequest => "TABLE_UPDATE_REQUEST",
                    Reason::Job => "JOB",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "TABLE_UPDATE_REQUEST" => Some(Self::TableUpdateRequest),
                    "JOB" => Some(Self::Job),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Model metadata change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelMetadataChange {
        /// Updated model.
        #[prost(message, optional, tag = "1")]
        pub model: ::core::option::Option<Model>,
        /// Describes how the model metadata was changed.
        #[prost(enumeration = "model_metadata_change::Reason", tag = "2")]
        pub reason: i32,
        /// The URI of the job that changed the model metadata.
        /// Present if and only if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "3")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ModelMetadataChange`.
    pub mod model_metadata_change {
        /// Describes how the model metadata was changed.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Model metadata was updated using the models.patch API.
            ModelPatchRequest = 1,
            /// Model metadata was updated using a DDL query.
            Query = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::ModelPatchRequest => "MODEL_PATCH_REQUEST",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "MODEL_PATCH_REQUEST" => Some(Self::ModelPatchRequest),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Routine change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RoutineChange {
        /// Updated routine.
        #[prost(message, optional, tag = "1")]
        pub routine: ::core::option::Option<Routine>,
        /// Describes how the routine was updated.
        #[prost(enumeration = "routine_change::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that updated the routine.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `RoutineChange`.
    pub mod routine_change {
        /// Describes how the routine was updated.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Routine was updated using a DDL query.
            Query = 1,
            /// Routine was updated using the routines.update or routines.patch API.
            RoutineUpdateRequest = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Query => "QUERY",
                    Reason::RoutineUpdateRequest => "ROUTINE_UPDATE_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "QUERY" => Some(Self::Query),
                    "ROUTINE_UPDATE_REQUEST" => Some(Self::RoutineUpdateRequest),
                    _ => None,
                }
            }
        }
    }
    /// Table data change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableDataChange {
        /// Number of deleted rows.
        #[prost(int64, tag = "1")]
        pub deleted_rows_count: i64,
        /// Number of inserted rows.
        #[prost(int64, tag = "2")]
        pub inserted_rows_count: i64,
        /// True if the table was truncated.
        #[prost(bool, tag = "3")]
        pub truncated: bool,
        /// Describes how the table data was changed.
        #[prost(enumeration = "table_data_change::Reason", tag = "4")]
        pub reason: i32,
        /// The URI of the job that changed a table.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "5")]
        pub job_name: ::prost::alloc::string::String,
        /// If written from WRITE_API, the name of the stream.
        ///
        /// Format:
        /// `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>/streams/<stream_id>`
        #[prost(string, tag = "6")]
        pub stream_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `TableDataChange`.
    pub mod table_data_change {
        /// Describes how the table data was changed.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Table was used as a job destination table.
            Job = 1,
            /// Table data was updated using a DML or DDL query.
            Query = 2,
            /// Table data was updated during a materialized view refresh.
            MaterializedViewRefresh = 3,
            /// Table data was added using the Write API.
            WriteApi = 4,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Job => "JOB",
                    Reason::Query => "QUERY",
                    Reason::MaterializedViewRefresh => "MATERIALIZED_VIEW_REFRESH",
                    Reason::WriteApi => "WRITE_API",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB" => Some(Self::Job),
                    "QUERY" => Some(Self::Query),
                    "MATERIALIZED_VIEW_REFRESH" => Some(Self::MaterializedViewRefresh),
                    "WRITE_API" => Some(Self::WriteApi),
                    _ => None,
                }
            }
        }
    }
    /// Model data change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelDataChange {
        /// Describes how the model data was changed.
        #[prost(enumeration = "model_data_change::Reason", tag = "1")]
        pub reason: i32,
        /// The URI of the job that changed the model data.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ModelDataChange`.
    pub mod model_data_change {
        /// Describes how the model data was changed.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Model data was changed using a DDL query.
            Query = 1,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Model data read event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelDataRead {
        /// Describes how the model data was read.
        #[prost(enumeration = "model_data_read::Reason", tag = "1")]
        pub reason: i32,
        /// The URI of the job that read the model data.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ModelDataRead`.
    pub mod model_data_read {
        /// Describes how the model data was read.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Model was used as a source model during a BigQuery job.
            Job = 1,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Job => "JOB",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "JOB" => Some(Self::Job),
                    _ => None,
                }
            }
        }
    }
    /// Table deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableDeletion {
        /// Describes how table was deleted.
        #[prost(enumeration = "table_deletion::Reason", tag = "1")]
        pub reason: i32,
        /// The URI of the job that deleted a table.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `TableDeletion`.
    pub mod table_deletion {
        /// Describes how the table was deleted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Table was deleted using the tables.delete API.
            TableDeleteRequest = 2,
            /// Table expired.
            Expired = 3,
            /// Table deleted using a DDL query.
            Query = 4,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::TableDeleteRequest => "TABLE_DELETE_REQUEST",
                    Reason::Expired => "EXPIRED",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "TABLE_DELETE_REQUEST" => Some(Self::TableDeleteRequest),
                    "EXPIRED" => Some(Self::Expired),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Model deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelDeletion {
        /// Describes how the model was deleted.
        #[prost(enumeration = "model_deletion::Reason", tag = "1")]
        pub reason: i32,
        /// The URI of the job that deleted a model.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `ModelDeletion`.
    pub mod model_deletion {
        /// Describes how the model was deleted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Model was deleted using the models.delete API.
            ModelDeleteRequest = 1,
            /// Model expired.
            Expired = 2,
            /// Model was deleted using DDL query.
            Query = 3,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::ModelDeleteRequest => "MODEL_DELETE_REQUEST",
                    Reason::Expired => "EXPIRED",
                    Reason::Query => "QUERY",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "MODEL_DELETE_REQUEST" => Some(Self::ModelDeleteRequest),
                    "EXPIRED" => Some(Self::Expired),
                    "QUERY" => Some(Self::Query),
                    _ => None,
                }
            }
        }
    }
    /// Routine deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RoutineDeletion {
        /// Deleted routine.
        #[prost(message, optional, tag = "1")]
        pub routine: ::core::option::Option<Routine>,
        /// Describes how the routine was deleted.
        #[prost(enumeration = "routine_deletion::Reason", tag = "3")]
        pub reason: i32,
        /// The URI of the job that deleted the routine.
        /// Present if the reason is QUERY.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "4")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `RoutineDeletion`.
    pub mod routine_deletion {
        /// Describes how the routine was deleted.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Routine was deleted using DDL query.
            Query = 1,
            /// Routine was deleted using the API.
            RoutineDeleteRequest = 2,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::Query => "QUERY",
                    Reason::RoutineDeleteRequest => "ROUTINE_DELETE_REQUEST",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "QUERY" => Some(Self::Query),
                    "ROUTINE_DELETE_REQUEST" => Some(Self::RoutineDeleteRequest),
                    _ => None,
                }
            }
        }
    }
    /// Row access policy creation event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RowAccessPolicyCreation {
        /// The row access policy created by this event.
        #[prost(message, optional, tag = "1")]
        pub row_access_policy: ::core::option::Option<RowAccessPolicy>,
        /// The URI of the job that created this row access policy.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Row access policy change event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RowAccessPolicyChange {
        /// The row access policy that was changed by this event.
        #[prost(message, optional, tag = "1")]
        pub row_access_policy: ::core::option::Option<RowAccessPolicy>,
        /// The URI of the job that created this row access policy.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
    }
    /// Row access policy deletion event.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RowAccessPolicyDeletion {
        /// The row access policies that were deleted. At present, only populated
        /// when a single policy is dropped.
        #[prost(message, repeated, tag = "1")]
        pub row_access_policies: ::prost::alloc::vec::Vec<RowAccessPolicy>,
        /// The job that deleted these row access policies.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "2")]
        pub job_name: ::prost::alloc::string::String,
        /// This field is set to true when a DROP ALL command has been executed, thus
        /// removing all row access policies on the table.
        #[prost(bool, tag = "3")]
        pub all_row_access_policies_dropped: bool,
    }
    /// Unlink linked dataset from its source dataset event
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UnlinkDataset {
        /// The linked dataset URI which is unlinked from its source.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>`.
        #[prost(string, tag = "1")]
        pub linked_dataset: ::prost::alloc::string::String,
        /// The source dataset URI from which the linked dataset is unlinked.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>`.
        #[prost(string, tag = "2")]
        pub source_dataset: ::prost::alloc::string::String,
        /// Reason for unlinking linked dataset
        #[prost(enumeration = "unlink_dataset::Reason", tag = "3")]
        pub reason: i32,
    }
    /// Nested message and enum types in `UnlinkDataset`.
    pub mod unlink_dataset {
        /// Describes how the unlinking operation occurred.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown.
            Unspecified = 0,
            /// Linked dataset unlinked via API
            UnlinkApi = 1,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::UnlinkApi => "UNLINK_API",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "UNLINK_API" => Some(Self::UnlinkApi),
                    _ => None,
                }
            }
        }
    }
    /// BigQuery job.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Job {
        /// Job URI.
        ///
        /// Format: `projects/<project_id>/jobs/<job_id>`.
        #[prost(string, tag = "1")]
        pub job_name: ::prost::alloc::string::String,
        /// Job configuration.
        #[prost(message, optional, tag = "2")]
        pub job_config: ::core::option::Option<JobConfig>,
        /// Job status.
        #[prost(message, optional, tag = "3")]
        pub job_status: ::core::option::Option<JobStatus>,
        /// Job statistics.
        #[prost(message, optional, tag = "4")]
        pub job_stats: ::core::option::Option<JobStats>,
    }
    /// Job configuration.
    /// See the [Jobs](<https://cloud.google.com/bigquery/docs/reference/v2/jobs>)
    /// API resource for more details on individual fields.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobConfig {
        /// Job type.
        #[prost(enumeration = "job_config::Type", tag = "1")]
        pub r#type: i32,
        /// Labels provided for the job.
        #[prost(btree_map = "string, string", tag = "6")]
        pub labels: ::prost::alloc::collections::BTreeMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Job configuration information.
        #[prost(oneof = "job_config::Config", tags = "2, 3, 4, 5")]
        pub config: ::core::option::Option<job_config::Config>,
    }
    /// Nested message and enum types in `JobConfig`.
    pub mod job_config {
        /// Query job configuration.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Query {
            /// The SQL query to run. Truncated if exceeds 50K.
            #[prost(string, tag = "1")]
            pub query: ::prost::alloc::string::String,
            /// True if the query field was truncated.
            #[prost(bool, tag = "10")]
            pub query_truncated: bool,
            /// The destination table for the query results.
            #[prost(string, tag = "2")]
            pub destination_table: ::prost::alloc::string::String,
            /// Destination table create disposition.
            #[prost(enumeration = "super::CreateDisposition", tag = "3")]
            pub create_disposition: i32,
            /// Destination table write disposition.
            #[prost(enumeration = "super::WriteDisposition", tag = "4")]
            pub write_disposition: i32,
            /// Default dataset for the query.
            #[prost(string, tag = "5")]
            pub default_dataset: ::prost::alloc::string::String,
            /// External data sources used in the query.
            #[prost(message, repeated, tag = "6")]
            pub table_definitions: ::prost::alloc::vec::Vec<super::TableDefinition>,
            /// Priority given to the query.
            #[prost(enumeration = "query::Priority", tag = "7")]
            pub priority: i32,
            /// Result table encryption information. Set when non-default encryption is
            /// used.
            #[prost(message, optional, tag = "8")]
            pub destination_table_encryption: ::core::option::Option<
                super::EncryptionInfo,
            >,
            /// Type of the query.
            #[prost(enumeration = "super::QueryStatementType", tag = "9")]
            pub statement_type: i32,
        }
        /// Nested message and enum types in `Query`.
        pub mod query {
            /// Priority given to the query.
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            pub enum Priority {
                /// Unknown.
                Unspecified = 0,
                /// Interactive query.
                QueryInteractive = 1,
                /// Batch query.
                QueryBatch = 2,
            }
            impl Priority {
                /// 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 {
                        Priority::Unspecified => "PRIORITY_UNSPECIFIED",
                        Priority::QueryInteractive => "QUERY_INTERACTIVE",
                        Priority::QueryBatch => "QUERY_BATCH",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
                        "QUERY_INTERACTIVE" => Some(Self::QueryInteractive),
                        "QUERY_BATCH" => Some(Self::QueryBatch),
                        _ => None,
                    }
                }
            }
        }
        /// Load job configuration.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Load {
            /// URIs for the data to be imported. Entire list is truncated if exceeds
            /// 40K.
            #[prost(string, repeated, tag = "1")]
            pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
            /// True if the source_URIs field was truncated.
            #[prost(bool, tag = "7")]
            pub source_uris_truncated: bool,
            /// The table schema in JSON format. Entire field is truncated if exceeds
            /// 40K.
            #[prost(string, tag = "2")]
            pub schema_json: ::prost::alloc::string::String,
            /// True if the schema_json field was truncated.
            #[prost(bool, tag = "8")]
            pub schema_json_truncated: bool,
            /// The destination table for the import.
            #[prost(string, tag = "3")]
            pub destination_table: ::prost::alloc::string::String,
            /// Destination table create disposition.
            #[prost(enumeration = "super::CreateDisposition", tag = "4")]
            pub create_disposition: i32,
            /// Destination table write disposition.
            #[prost(enumeration = "super::WriteDisposition", tag = "5")]
            pub write_disposition: i32,
            /// Result table encryption information. Set when non-default encryption is
            /// used.
            #[prost(message, optional, tag = "6")]
            pub destination_table_encryption: ::core::option::Option<
                super::EncryptionInfo,
            >,
        }
        /// Extract job configuration.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Extract {
            /// URIs where extracted data should be written. Entire list is truncated
            /// if exceeds 50K.
            #[prost(string, repeated, tag = "1")]
            pub destination_uris: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
            /// True if the destination_URIs field was truncated.
            #[prost(bool, tag = "3")]
            pub destination_uris_truncated: bool,
            #[prost(oneof = "extract::Source", tags = "2, 4")]
            pub source: ::core::option::Option<extract::Source>,
        }
        /// Nested message and enum types in `Extract`.
        pub mod extract {
            #[derive(Clone, PartialEq, ::prost::Oneof)]
            pub enum Source {
                /// The source table.
                #[prost(string, tag = "2")]
                SourceTable(::prost::alloc::string::String),
                /// The source model.
                #[prost(string, tag = "4")]
                SourceModel(::prost::alloc::string::String),
            }
        }
        /// Table copy job configuration.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct TableCopy {
            /// Source tables. Entire list is truncated if exceeds 50K.
            #[prost(string, repeated, tag = "1")]
            pub source_tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
            /// True if the source_tables field was truncated.
            #[prost(bool, tag = "6")]
            pub source_tables_truncated: bool,
            /// Destination table.
            #[prost(string, tag = "2")]
            pub destination_table: ::prost::alloc::string::String,
            /// Destination table create disposition.
            #[prost(enumeration = "super::CreateDisposition", tag = "3")]
            pub create_disposition: i32,
            /// Destination table write disposition.
            #[prost(enumeration = "super::WriteDisposition", tag = "4")]
            pub write_disposition: i32,
            /// Result table encryption information. Set when non-default encryption is
            /// used.
            #[prost(message, optional, tag = "5")]
            pub destination_table_encryption: ::core::option::Option<
                super::EncryptionInfo,
            >,
            /// Supported operation types in the table copy job.
            #[prost(enumeration = "super::OperationType", tag = "7")]
            pub operation_type: i32,
            /// Expiration time set on the destination table. Expired tables will be
            /// deleted and their storage reclaimed.
            #[prost(message, optional, tag = "8")]
            pub destination_expiration_time: ::core::option::Option<
                ::prost_types::Timestamp,
            >,
        }
        /// Job type.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Unknown.
            Unspecified = 0,
            /// Query job.
            Query = 1,
            /// Table copy job.
            Copy = 2,
            /// Export (extract) job.
            Export = 3,
            /// Import (load) job.
            Import = 4,
        }
        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 {
                    Type::Unspecified => "TYPE_UNSPECIFIED",
                    Type::Query => "QUERY",
                    Type::Copy => "COPY",
                    Type::Export => "EXPORT",
                    Type::Import => "IMPORT",
                }
            }
            /// 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),
                    "QUERY" => Some(Self::Query),
                    "COPY" => Some(Self::Copy),
                    "EXPORT" => Some(Self::Export),
                    "IMPORT" => Some(Self::Import),
                    _ => None,
                }
            }
        }
        /// Job configuration information.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Config {
            /// Query job information.
            #[prost(message, tag = "2")]
            QueryConfig(Query),
            /// Load job information.
            #[prost(message, tag = "3")]
            LoadConfig(Load),
            /// Extract job information.
            #[prost(message, tag = "4")]
            ExtractConfig(Extract),
            /// TableCopy job information.
            #[prost(message, tag = "5")]
            TableCopyConfig(TableCopy),
        }
    }
    /// Definition of an external data source used in a query.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableDefinition {
        /// Name of the table, used in queries.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// URIs for the data.
        #[prost(string, repeated, tag = "2")]
        pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// Status of a job.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobStatus {
        /// State of the job.
        #[prost(enumeration = "JobState", tag = "1")]
        pub job_state: i32,
        /// Job error, if the job failed.
        #[prost(message, optional, tag = "2")]
        pub error_result: ::core::option::Option<super::super::super::rpc::Status>,
        /// Errors encountered during the running of the job. Does not necessarily
        /// mean that the job has completed or was unsuccessful.
        #[prost(message, repeated, tag = "3")]
        pub errors: ::prost::alloc::vec::Vec<super::super::super::rpc::Status>,
    }
    /// Job statistics.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct JobStats {
        /// Job creation time.
        #[prost(message, optional, tag = "1")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Job execution start time.
        #[prost(message, optional, tag = "2")]
        pub start_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Job completion time.
        #[prost(message, optional, tag = "3")]
        pub end_time: ::core::option::Option<::prost_types::Timestamp>,
        /// The total number of slot-ms consumed by the query job.
        #[prost(int64, tag = "10")]
        pub total_slot_ms: i64,
        /// Reservation usage attributed from each tier of a reservation hierarchy.
        /// This field reported misleading information and will no longer be
        /// populated. Aggregate usage of all jobs submitted to a reservation
        /// should provide a more reliable indicator of reservation imbalance.
        #[deprecated]
        #[prost(message, repeated, tag = "11")]
        pub reservation_usage: ::prost::alloc::vec::Vec<
            job_stats::ReservationResourceUsage,
        >,
        /// Reservation name or "unreserved" for on-demand resource usage.
        #[prost(string, tag = "14")]
        pub reservation: ::prost::alloc::string::String,
        /// Parent job name. Only present for child jobs.
        #[prost(string, tag = "12")]
        pub parent_job_name: ::prost::alloc::string::String,
        /// Statistics specific to the job type.
        #[prost(oneof = "job_stats::Extended", tags = "8, 9, 13")]
        pub extended: ::core::option::Option<job_stats::Extended>,
    }
    /// Nested message and enum types in `JobStats`.
    pub mod job_stats {
        /// Query job statistics.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Query {
            /// Total bytes processed by the query job.
            #[prost(int64, tag = "1")]
            pub total_processed_bytes: i64,
            /// Total bytes billed by the query job.
            #[prost(int64, tag = "2")]
            pub total_billed_bytes: i64,
            /// The tier assigned by the CPU-based billing.
            #[prost(int32, tag = "3")]
            pub billing_tier: i32,
            /// Tables accessed by the query job.
            #[prost(string, repeated, tag = "6")]
            pub referenced_tables: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
            /// Views accessed by the query job.
            #[prost(string, repeated, tag = "7")]
            pub referenced_views: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
            /// Routines accessed by the query job.
            #[prost(string, repeated, tag = "10")]
            pub referenced_routines: ::prost::alloc::vec::Vec<
                ::prost::alloc::string::String,
            >,
            /// Number of output rows produced by the query job.
            #[prost(int64, tag = "8")]
            pub output_row_count: i64,
            /// True if the query job results were read from the query cache.
            #[prost(bool, tag = "9")]
            pub cache_hit: bool,
        }
        /// Load job statistics.
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        pub struct Load {
            /// Total bytes loaded by the import job.
            #[prost(int64, tag = "1")]
            pub total_output_bytes: i64,
        }
        /// Extract job statistics.
        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
        pub struct Extract {
            /// Total bytes exported by the extract job.
            #[prost(int64, tag = "1")]
            pub total_input_bytes: i64,
        }
        /// Job resource usage breakdown by reservation.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct ReservationResourceUsage {
            /// Reservation name or "unreserved" for on-demand resources usage.
            #[prost(string, tag = "1")]
            pub name: ::prost::alloc::string::String,
            /// Total slot milliseconds used by the reservation for a particular job.
            #[prost(int64, tag = "2")]
            pub slot_ms: i64,
        }
        /// Statistics specific to the job type.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Extended {
            /// Query job statistics.
            #[prost(message, tag = "8")]
            QueryStats(Query),
            /// Load job statistics.
            #[prost(message, tag = "9")]
            LoadStats(Load),
            /// Extract job statistics.
            #[prost(message, tag = "13")]
            ExtractStats(Extract),
        }
    }
    /// BigQuery table.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Table {
        /// Table URI.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>`.
        #[prost(string, tag = "1")]
        pub table_name: ::prost::alloc::string::String,
        /// User-provided metadata for the table.
        #[prost(message, optional, tag = "10")]
        pub table_info: ::core::option::Option<EntityInfo>,
        /// A JSON representation of the table's schema. Entire field is truncated
        /// if exceeds 40K.
        #[prost(string, tag = "3")]
        pub schema_json: ::prost::alloc::string::String,
        /// True if the schema_json field was truncated.
        #[prost(bool, tag = "11")]
        pub schema_json_truncated: bool,
        /// View metadata. Only present for views.
        #[prost(message, optional, tag = "4")]
        pub view: ::core::option::Option<TableViewDefinition>,
        /// Table expiration time.
        #[prost(message, optional, tag = "5")]
        pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
        /// The table creation time.
        #[prost(message, optional, tag = "6")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// The last time metadata update time.
        #[prost(message, optional, tag = "7")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
        /// The last table truncation time.
        #[prost(message, optional, tag = "8")]
        pub truncate_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Table encryption information. Set when non-default encryption is used.
        #[prost(message, optional, tag = "9")]
        pub encryption: ::core::option::Option<EncryptionInfo>,
    }
    /// Trained BigQuery ML model.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Model {
        /// Model URI.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>/models/<model_id>`.
        #[prost(string, tag = "1")]
        pub model_name: ::prost::alloc::string::String,
        /// User-provided metadata for the model.
        #[prost(message, optional, tag = "2")]
        pub model_info: ::core::option::Option<EntityInfo>,
        /// Model expiration time.
        #[prost(message, optional, tag = "5")]
        pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Model creation time.
        #[prost(message, optional, tag = "6")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Model last update time.
        #[prost(message, optional, tag = "7")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Model encryption information. Set when non-default encryption is used.
        #[prost(message, optional, tag = "8")]
        pub encryption: ::core::option::Option<EncryptionInfo>,
    }
    /// User Defined Function (UDF) or Stored Procedure.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Routine {
        /// Routine URI.
        ///
        /// Format:
        /// `projects/<project_id>/datasets/<dataset_id>/routines/<routine_id>`.
        #[prost(string, tag = "1")]
        pub routine_name: ::prost::alloc::string::String,
        /// Routine creation time.
        #[prost(message, optional, tag = "5")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Routine last update time.
        #[prost(message, optional, tag = "6")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// User-provided metadata for an entity, for e.g. dataset, table or model.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EntityInfo {
        /// A short name for the entity.
        #[prost(string, tag = "1")]
        pub friendly_name: ::prost::alloc::string::String,
        /// A long description for the entity.
        #[prost(string, tag = "2")]
        pub description: ::prost::alloc::string::String,
        /// Labels provided for the entity.
        #[prost(btree_map = "string, string", tag = "3")]
        pub labels: ::prost::alloc::collections::BTreeMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
    }
    /// View definition.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TableViewDefinition {
        /// SQL query defining the view. Truncated if exceeds 40K.
        #[prost(string, tag = "1")]
        pub query: ::prost::alloc::string::String,
        /// True if the schema_json field was truncated.
        #[prost(bool, tag = "2")]
        pub query_truncated: bool,
    }
    /// BigQuery dataset.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Dataset {
        /// Dataset URI.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>`.
        #[prost(string, tag = "1")]
        pub dataset_name: ::prost::alloc::string::String,
        /// User-provided metadata for the dataset.
        #[prost(message, optional, tag = "7")]
        pub dataset_info: ::core::option::Option<EntityInfo>,
        /// Dataset creation time.
        #[prost(message, optional, tag = "3")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Dataset metadata last update time.
        #[prost(message, optional, tag = "4")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
        /// The access control list for the dataset.
        #[prost(message, optional, tag = "5")]
        pub acl: ::core::option::Option<BigQueryAcl>,
        /// Default expiration time for tables in the dataset.
        #[prost(message, optional, tag = "6")]
        pub default_table_expire_duration: ::core::option::Option<
            ::prost_types::Duration,
        >,
        /// Default encryption for tables in the dataset.
        #[prost(message, optional, tag = "8")]
        pub default_encryption: ::core::option::Option<EncryptionInfo>,
        /// Default collation for the dataset.
        #[prost(string, tag = "9")]
        pub default_collation: ::prost::alloc::string::String,
    }
    /// An access control list.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct BigQueryAcl {
        /// IAM policy for the resource.
        #[prost(message, optional, tag = "1")]
        pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
        /// List of authorized views for a dataset.
        ///
        /// Format: `projects/<project_id>/datasets/<dataset_id>/tables/<view_id>`.
        #[prost(string, repeated, tag = "2")]
        pub authorized_views: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// Encryption properties for a table or a job
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EncryptionInfo {
        /// Cloud kms key identifier.
        ///
        /// Format:
        /// `projects/<project_id>/locations/<location>/keyRings/<key_ring_name>/cryptoKeys/<key_name>`
        #[prost(string, tag = "1")]
        pub kms_key_name: ::prost::alloc::string::String,
    }
    /// BigQuery row access policy.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RowAccessPolicy {
        /// Row access policy URI.
        ///
        /// Format:
        /// `projects/<project_id>/datasets/<dataset_id>/tables/<table_id>/rowAccessPolicies/<row_access_policy_id>`
        #[prost(string, tag = "1")]
        pub row_access_policy_name: ::prost::alloc::string::String,
    }
    /// First party (Google) application specific request metadata.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FirstPartyAppMetadata {
        #[prost(oneof = "first_party_app_metadata::Metadata", tags = "1")]
        pub metadata: ::core::option::Option<first_party_app_metadata::Metadata>,
    }
    /// Nested message and enum types in `FirstPartyAppMetadata`.
    pub mod first_party_app_metadata {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Metadata {
            /// Google Sheets metadata.
            #[prost(message, tag = "1")]
            SheetsMetadata(super::SheetsMetadata),
        }
    }
    /// Google Sheets specific request metadata.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SheetsMetadata {
        /// The ID of the spreadsheet from which the request is sent.
        #[prost(string, tag = "1")]
        pub doc_id: ::prost::alloc::string::String,
    }
    /// Describes whether a job should create a destination table if it doesn't
    /// exist.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum CreateDisposition {
        /// Unknown.
        Unspecified = 0,
        /// This job should never create tables.
        CreateNever = 1,
        /// This job should create a table if it doesn't already exist.
        CreateIfNeeded = 2,
    }
    impl CreateDisposition {
        /// 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 {
                CreateDisposition::Unspecified => "CREATE_DISPOSITION_UNSPECIFIED",
                CreateDisposition::CreateNever => "CREATE_NEVER",
                CreateDisposition::CreateIfNeeded => "CREATE_IF_NEEDED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CREATE_DISPOSITION_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATE_NEVER" => Some(Self::CreateNever),
                "CREATE_IF_NEEDED" => Some(Self::CreateIfNeeded),
                _ => None,
            }
        }
    }
    /// Describes whether a job should overwrite or append the existing destination
    /// table if it already exists.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WriteDisposition {
        /// Unknown.
        Unspecified = 0,
        /// This job should only be writing to empty tables.
        WriteEmpty = 1,
        /// This job will truncate the existing table data.
        WriteTruncate = 2,
        /// This job will append to the table.
        WriteAppend = 3,
    }
    impl WriteDisposition {
        /// 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 {
                WriteDisposition::Unspecified => "WRITE_DISPOSITION_UNSPECIFIED",
                WriteDisposition::WriteEmpty => "WRITE_EMPTY",
                WriteDisposition::WriteTruncate => "WRITE_TRUNCATE",
                WriteDisposition::WriteAppend => "WRITE_APPEND",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "WRITE_DISPOSITION_UNSPECIFIED" => Some(Self::Unspecified),
                "WRITE_EMPTY" => Some(Self::WriteEmpty),
                "WRITE_TRUNCATE" => Some(Self::WriteTruncate),
                "WRITE_APPEND" => Some(Self::WriteAppend),
                _ => None,
            }
        }
    }
    /// Table copy job operation type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OperationType {
        /// Unspecified operation type.
        Unspecified = 0,
        /// The source and the destination table have the same table type.
        Copy = 1,
        /// The source table type is TABLE and
        /// the destination table type is SNAPSHOT.
        Snapshot = 2,
        /// The source table type is SNAPSHOT and
        /// the destination table type is TABLE.
        Restore = 3,
    }
    impl OperationType {
        /// 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 {
                OperationType::Unspecified => "OPERATION_TYPE_UNSPECIFIED",
                OperationType::Copy => "COPY",
                OperationType::Snapshot => "SNAPSHOT",
                OperationType::Restore => "RESTORE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "COPY" => Some(Self::Copy),
                "SNAPSHOT" => Some(Self::Snapshot),
                "RESTORE" => Some(Self::Restore),
                _ => None,
            }
        }
    }
    /// State of a job.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum JobState {
        /// State unknown.
        Unspecified = 0,
        /// Job is waiting for the resources.
        Pending = 1,
        /// Job is running.
        Running = 2,
        /// Job is done.
        Done = 3,
    }
    impl JobState {
        /// 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 {
                JobState::Unspecified => "JOB_STATE_UNSPECIFIED",
                JobState::Pending => "PENDING",
                JobState::Running => "RUNNING",
                JobState::Done => "DONE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "PENDING" => Some(Self::Pending),
                "RUNNING" => Some(Self::Running),
                "DONE" => Some(Self::Done),
                _ => None,
            }
        }
    }
    /// Type of the statement (e.g. SELECT, INSERT, CREATE_TABLE, CREATE_MODEL..)
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum QueryStatementType {
        /// Unknown.
        Unspecified = 0,
        /// SELECT ... FROM &lt;Table list&gt; ...
        Select = 1,
        /// ASSERT &lt;condition&gt; AS 'description'
        Assert = 23,
        /// INSERT INTO &lt;Table&gt; ....
        Insert = 2,
        /// UPDATE &lt;Table&gt; SET ...
        Update = 3,
        /// DELETE &lt;Table&gt; ...
        Delete = 4,
        /// MERGE INTO &lt;Table&gt; ....
        Merge = 5,
        /// CREATE TABLE &lt;Table&gt; &lt;column list&gt;
        CreateTable = 6,
        /// CREATE TABLE &lt;Table&gt; AS SELECT
        CreateTableAsSelect = 7,
        /// CREATE VIEW &lt;View&gt;
        CreateView = 8,
        /// CREATE MODEL &lt;Model&gt; AS &lt;Query&gt;
        CreateModel = 9,
        /// CREATE MATERIALIZED VIEW &lt;View&gt; AS ...
        CreateMaterializedView = 13,
        /// CREATE FUNCTION &lt;Function&gt;(&lt;Signature&gt;) AS ...
        CreateFunction = 14,
        /// CREATE TABLE FUNCTION &lt;Function&gt;(&lt;Signature&gt;) AS ...
        CreateTableFunction = 56,
        /// CREATE PROCEDURE &lt;Procedure&gt;
        CreateProcedure = 20,
        /// CREATE ROW ACCESS POLICY &lt;RowAccessPolicy&gt ON &lt;Table&gt;
        CreateRowAccessPolicy = 24,
        /// CREATE SCHEMA &lt;Schema&gt;
        CreateSchema = 53,
        /// CREATE SNAPSHOT TABLE &lt;Snapshot&gt CLONE &lt;Table&gt;
        CreateSnapshotTable = 59,
        /// DROP TABLE &lt;Table&gt;
        DropTable = 10,
        /// DROP EXTERNAL TABLE &lt;Table&gt;
        DropExternalTable = 33,
        /// DROP VIEW &lt;View&gt;
        DropView = 11,
        /// DROP MODEL &lt;Model&gt;
        DropModel = 12,
        /// DROP MATERIALIZED VIEW &lt;View&gt;
        DropMaterializedView = 15,
        /// DROP FUNCTION &lt;Function&gt;
        DropFunction = 16,
        /// DROP PROCEDURE &lt;Procedure&gt;
        DropProcedure = 21,
        /// DROP SCHEMA &lt;Schema&gt;
        DropSchema = 54,
        /// DROP ROW ACCESS POLICY &lt;RowAccessPolicy&gt ON &lt;Table&gt; <or> DROP
        /// ALL ROW ACCESS POLICIES ON ON &lt;Table&gt;
        DropRowAccessPolicy = 25,
        /// DROP SNAPSHOT TABLE &lt;Snapshot&gt;
        DropSnapshotTable = 62,
        /// ALTER TABLE &lt;Table&gt;
        AlterTable = 17,
        /// ALTER VIEW &lt;View&gt;
        AlterView = 18,
        /// ALTER MATERIALIZED_VIEW &lt;view&gt;
        AlterMaterializedView = 22,
        /// ALTER SCHEMA &lt;Schema&gt;
        AlterSchema = 55,
        /// Script
        Script = 19,
        /// TRUNCATE TABLE &lt;Table&gt;
        TruncateTable = 26,
        /// CREATE EXTERNAL TABLE &lt;TABLE&gt;
        CreateExternalTable = 27,
        /// EXPORT DATA;
        ExportData = 28,
        /// CALL &lt;stored procedure&gt;
        Call = 29,
    }
    impl QueryStatementType {
        /// 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 {
                QueryStatementType::Unspecified => "QUERY_STATEMENT_TYPE_UNSPECIFIED",
                QueryStatementType::Select => "SELECT",
                QueryStatementType::Assert => "ASSERT",
                QueryStatementType::Insert => "INSERT",
                QueryStatementType::Update => "UPDATE",
                QueryStatementType::Delete => "DELETE",
                QueryStatementType::Merge => "MERGE",
                QueryStatementType::CreateTable => "CREATE_TABLE",
                QueryStatementType::CreateTableAsSelect => "CREATE_TABLE_AS_SELECT",
                QueryStatementType::CreateView => "CREATE_VIEW",
                QueryStatementType::CreateModel => "CREATE_MODEL",
                QueryStatementType::CreateMaterializedView => "CREATE_MATERIALIZED_VIEW",
                QueryStatementType::CreateFunction => "CREATE_FUNCTION",
                QueryStatementType::CreateTableFunction => "CREATE_TABLE_FUNCTION",
                QueryStatementType::CreateProcedure => "CREATE_PROCEDURE",
                QueryStatementType::CreateRowAccessPolicy => "CREATE_ROW_ACCESS_POLICY",
                QueryStatementType::CreateSchema => "CREATE_SCHEMA",
                QueryStatementType::CreateSnapshotTable => "CREATE_SNAPSHOT_TABLE",
                QueryStatementType::DropTable => "DROP_TABLE",
                QueryStatementType::DropExternalTable => "DROP_EXTERNAL_TABLE",
                QueryStatementType::DropView => "DROP_VIEW",
                QueryStatementType::DropModel => "DROP_MODEL",
                QueryStatementType::DropMaterializedView => "DROP_MATERIALIZED_VIEW",
                QueryStatementType::DropFunction => "DROP_FUNCTION",
                QueryStatementType::DropProcedure => "DROP_PROCEDURE",
                QueryStatementType::DropSchema => "DROP_SCHEMA",
                QueryStatementType::DropRowAccessPolicy => "DROP_ROW_ACCESS_POLICY",
                QueryStatementType::DropSnapshotTable => "DROP_SNAPSHOT_TABLE",
                QueryStatementType::AlterTable => "ALTER_TABLE",
                QueryStatementType::AlterView => "ALTER_VIEW",
                QueryStatementType::AlterMaterializedView => "ALTER_MATERIALIZED_VIEW",
                QueryStatementType::AlterSchema => "ALTER_SCHEMA",
                QueryStatementType::Script => "SCRIPT",
                QueryStatementType::TruncateTable => "TRUNCATE_TABLE",
                QueryStatementType::CreateExternalTable => "CREATE_EXTERNAL_TABLE",
                QueryStatementType::ExportData => "EXPORT_DATA",
                QueryStatementType::Call => "CALL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "QUERY_STATEMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SELECT" => Some(Self::Select),
                "ASSERT" => Some(Self::Assert),
                "INSERT" => Some(Self::Insert),
                "UPDATE" => Some(Self::Update),
                "DELETE" => Some(Self::Delete),
                "MERGE" => Some(Self::Merge),
                "CREATE_TABLE" => Some(Self::CreateTable),
                "CREATE_TABLE_AS_SELECT" => Some(Self::CreateTableAsSelect),
                "CREATE_VIEW" => Some(Self::CreateView),
                "CREATE_MODEL" => Some(Self::CreateModel),
                "CREATE_MATERIALIZED_VIEW" => Some(Self::CreateMaterializedView),
                "CREATE_FUNCTION" => Some(Self::CreateFunction),
                "CREATE_TABLE_FUNCTION" => Some(Self::CreateTableFunction),
                "CREATE_PROCEDURE" => Some(Self::CreateProcedure),
                "CREATE_ROW_ACCESS_POLICY" => Some(Self::CreateRowAccessPolicy),
                "CREATE_SCHEMA" => Some(Self::CreateSchema),
                "CREATE_SNAPSHOT_TABLE" => Some(Self::CreateSnapshotTable),
                "DROP_TABLE" => Some(Self::DropTable),
                "DROP_EXTERNAL_TABLE" => Some(Self::DropExternalTable),
                "DROP_VIEW" => Some(Self::DropView),
                "DROP_MODEL" => Some(Self::DropModel),
                "DROP_MATERIALIZED_VIEW" => Some(Self::DropMaterializedView),
                "DROP_FUNCTION" => Some(Self::DropFunction),
                "DROP_PROCEDURE" => Some(Self::DropProcedure),
                "DROP_SCHEMA" => Some(Self::DropSchema),
                "DROP_ROW_ACCESS_POLICY" => Some(Self::DropRowAccessPolicy),
                "DROP_SNAPSHOT_TABLE" => Some(Self::DropSnapshotTable),
                "ALTER_TABLE" => Some(Self::AlterTable),
                "ALTER_VIEW" => Some(Self::AlterView),
                "ALTER_MATERIALIZED_VIEW" => Some(Self::AlterMaterializedView),
                "ALTER_SCHEMA" => Some(Self::AlterSchema),
                "SCRIPT" => Some(Self::Script),
                "TRUNCATE_TABLE" => Some(Self::TruncateTable),
                "CREATE_EXTERNAL_TABLE" => Some(Self::CreateExternalTable),
                "EXPORT_DATA" => Some(Self::ExportData),
                "CALL" => Some(Self::Call),
                _ => None,
            }
        }
    }
    /// BigQuery event information.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Event {
        /// Job insertion event.
        #[prost(message, tag = "1")]
        JobInsertion(JobInsertion),
        /// Job state change event.
        #[prost(message, tag = "2")]
        JobChange(JobChange),
        /// Job deletion event.
        #[prost(message, tag = "23")]
        JobDeletion(JobDeletion),
        /// Dataset creation event.
        #[prost(message, tag = "3")]
        DatasetCreation(DatasetCreation),
        /// Dataset change event.
        #[prost(message, tag = "4")]
        DatasetChange(DatasetChange),
        /// Dataset deletion event.
        #[prost(message, tag = "5")]
        DatasetDeletion(DatasetDeletion),
        /// Table creation event.
        #[prost(message, tag = "6")]
        TableCreation(TableCreation),
        /// Table metadata change event.
        #[prost(message, tag = "8")]
        TableChange(TableChange),
        /// Table deletion event.
        #[prost(message, tag = "9")]
        TableDeletion(TableDeletion),
        /// Table data read event.
        #[prost(message, tag = "10")]
        TableDataRead(TableDataRead),
        /// Table data change event.
        #[prost(message, tag = "11")]
        TableDataChange(TableDataChange),
        /// Model deletion event.
        #[prost(message, tag = "12")]
        ModelDeletion(ModelDeletion),
        /// Model creation event.
        #[prost(message, tag = "13")]
        ModelCreation(ModelCreation),
        /// Model metadata change event.
        #[prost(message, tag = "14")]
        ModelMetadataChange(ModelMetadataChange),
        /// Model data change event.
        #[prost(message, tag = "15")]
        ModelDataChange(ModelDataChange),
        /// Model data read event.
        #[prost(message, tag = "19")]
        ModelDataRead(ModelDataRead),
        /// Routine creation event.
        #[prost(message, tag = "16")]
        RoutineCreation(RoutineCreation),
        /// Routine change event.
        #[prost(message, tag = "17")]
        RoutineChange(RoutineChange),
        /// Routine deletion event.
        #[prost(message, tag = "18")]
        RoutineDeletion(RoutineDeletion),
        /// Row access policy create event.
        #[prost(message, tag = "20")]
        RowAccessPolicyCreation(RowAccessPolicyCreation),
        /// Row access policy change event.
        #[prost(message, tag = "21")]
        RowAccessPolicyChange(RowAccessPolicyChange),
        /// Row access policy deletion event.
        #[prost(message, tag = "22")]
        RowAccessPolicyDeletion(RowAccessPolicyDeletion),
        /// Unlink linked dataset from its source dataset event
        #[prost(message, tag = "25")]
        UnlinkDataset(UnlinkDataset),
    }
}
/// Common audit log format for Google Cloud Platform API operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuditLog {
    /// The name of the API service performing the operation. For example,
    /// `"compute.googleapis.com"`.
    #[prost(string, tag = "7")]
    pub service_name: ::prost::alloc::string::String,
    /// The name of the service method or operation.
    /// For API calls, this should be the name of the API method.
    /// For example,
    ///
    ///      "google.cloud.bigquery.v2.TableService.InsertTable"
    ///      "google.logging.v2.ConfigServiceV2.CreateSink"
    #[prost(string, tag = "8")]
    pub method_name: ::prost::alloc::string::String,
    /// The resource or collection that is the target of the operation.
    /// The name is a scheme-less URI, not including the API service name.
    /// For example:
    ///
    ///      "projects/PROJECT_ID/zones/us-central1-a/instances"
    ///      "projects/PROJECT_ID/datasets/DATASET_ID"
    #[prost(string, tag = "11")]
    pub resource_name: ::prost::alloc::string::String,
    /// The resource location information.
    #[prost(message, optional, tag = "20")]
    pub resource_location: ::core::option::Option<ResourceLocation>,
    /// The resource's original state before mutation. Present only for
    /// operations which have successfully modified the targeted resource(s).
    /// In general, this field should contain all changed fields, except those
    /// that are already been included in `request`, `response`, `metadata` or
    /// `service_data` fields.
    /// When the JSON object represented here has a proto equivalent,
    /// the proto name will be indicated in the `@type` property.
    #[prost(message, optional, tag = "19")]
    pub resource_original_state: ::core::option::Option<::prost_types::Struct>,
    /// The number of items returned from a List or Query API method,
    /// if applicable.
    #[prost(int64, tag = "12")]
    pub num_response_items: i64,
    /// The status of the overall operation.
    #[prost(message, optional, tag = "2")]
    pub status: ::core::option::Option<super::super::rpc::Status>,
    /// Authentication information.
    #[prost(message, optional, tag = "3")]
    pub authentication_info: ::core::option::Option<AuthenticationInfo>,
    /// Authorization information. If there are multiple
    /// resources or permissions involved, then there is
    /// one AuthorizationInfo element for each {resource, permission} tuple.
    #[prost(message, repeated, tag = "9")]
    pub authorization_info: ::prost::alloc::vec::Vec<AuthorizationInfo>,
    /// Indicates the policy violations for this request. If the request
    /// is denied by the policy, violation information will be logged
    /// here.
    #[prost(message, optional, tag = "25")]
    pub policy_violation_info: ::core::option::Option<PolicyViolationInfo>,
    /// Metadata about the operation.
    #[prost(message, optional, tag = "4")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// The operation request. This may not include all request parameters,
    /// such as those that are too large, privacy-sensitive, or duplicated
    /// elsewhere in the log record.
    /// It should never include user-generated data, such as file contents.
    /// When the JSON object represented here has a proto equivalent, the proto
    /// name will be indicated in the `@type` property.
    #[prost(message, optional, tag = "16")]
    pub request: ::core::option::Option<::prost_types::Struct>,
    /// The operation response. This may not include all response elements,
    /// such as those that are too large, privacy-sensitive, or duplicated
    /// elsewhere in the log record.
    /// It should never include user-generated data, such as file contents.
    /// When the JSON object represented here has a proto equivalent, the proto
    /// name will be indicated in the `@type` property.
    #[prost(message, optional, tag = "17")]
    pub response: ::core::option::Option<::prost_types::Struct>,
    /// Other service-specific data about the request, response, and other
    /// information associated with the current audited event.
    #[prost(message, optional, tag = "18")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    /// Deprecated. Use the `metadata` field instead.
    /// Other service-specific data about the request, response, and other
    /// activities.
    #[deprecated]
    #[prost(message, optional, tag = "15")]
    pub service_data: ::core::option::Option<::prost_types::Any>,
}
/// Authentication information for the operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthenticationInfo {
    /// The email address of the authenticated user (or service account on behalf
    /// of third party principal) making the request. For third party identity
    /// callers, the `principal_subject` field is populated instead of this field.
    /// For privacy reasons, the principal email address is sometimes redacted.
    /// For more information, see [Caller identities in audit
    /// logs](<https://cloud.google.com/logging/docs/audit#user-id>).
    #[prost(string, tag = "1")]
    pub principal_email: ::prost::alloc::string::String,
    /// The authority selector specified by the requestor, if any.
    /// It is not guaranteed that the principal was allowed to use this authority.
    #[prost(string, tag = "2")]
    pub authority_selector: ::prost::alloc::string::String,
    /// The third party identification (if any) of the authenticated user making
    /// the request.
    /// When the JSON object represented here has a proto equivalent, the proto
    /// name will be indicated in the `@type` property.
    #[prost(message, optional, tag = "4")]
    pub third_party_principal: ::core::option::Option<::prost_types::Struct>,
    /// The name of the service account key used to create or exchange
    /// credentials for authenticating the service account making the request.
    /// This is a scheme-less URI full resource name. For example:
    ///
    /// "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
    #[prost(string, tag = "5")]
    pub service_account_key_name: ::prost::alloc::string::String,
    /// Identity delegation history of an authenticated service account that makes
    /// the request. It contains information on the real authorities that try to
    /// access GCP resources by delegating on a service account. When multiple
    /// authorities present, they are guaranteed to be sorted based on the original
    /// ordering of the identity delegation events.
    #[prost(message, repeated, tag = "6")]
    pub service_account_delegation_info: ::prost::alloc::vec::Vec<
        ServiceAccountDelegationInfo,
    >,
    /// String representation of identity of requesting party.
    /// Populated for both first and third party identities.
    #[prost(string, tag = "8")]
    pub principal_subject: ::prost::alloc::string::String,
}
/// Authorization information for the operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationInfo {
    /// The resource being accessed, as a REST-style or cloud resource string.
    /// For example:
    ///
    ///      bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
    /// or
    ///      projects/PROJECTID/datasets/DATASETID
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    /// The required IAM permission.
    #[prost(string, tag = "2")]
    pub permission: ::prost::alloc::string::String,
    /// Whether or not authorization for `resource` and `permission`
    /// was granted.
    #[prost(bool, tag = "3")]
    pub granted: bool,
    /// Resource attributes used in IAM condition evaluation. This field contains
    /// resource attributes like resource type and resource name.
    ///
    /// To get the whole view of the attributes used in IAM
    /// condition evaluation, the user must also look into
    /// `AuditLog.request_metadata.request_attributes`.
    #[prost(message, optional, tag = "5")]
    pub resource_attributes: ::core::option::Option<
        super::super::rpc::context::attribute_context::Resource,
    >,
}
/// Metadata about the request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestMetadata {
    /// The IP address of the caller.
    /// For a caller from the internet, this will be the public IPv4 or IPv6
    /// address. For calls made from inside Google's internal production network
    /// from one GCP service to another, `caller_ip` will be redacted to "private".
    /// For a caller from a Compute Engine VM with a external IP address,
    /// `caller_ip` will be the VM's external IP address. For a caller from a
    /// Compute Engine VM without a external IP address, if the VM is in the same
    /// organization (or project) as the accessed resource, `caller_ip` will be the
    /// VM's internal IPv4 address, otherwise `caller_ip` will be redacted to
    /// "gce-internal-ip". See <https://cloud.google.com/compute/docs/vpc/> for more
    /// information.
    #[prost(string, tag = "1")]
    pub caller_ip: ::prost::alloc::string::String,
    /// The user agent of the caller.
    /// This information is not authenticated and should be treated accordingly.
    /// For example:
    ///
    /// +   `google-api-python-client/1.4.0`:
    ///      The request was made by the Google API client for Python.
    /// +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
    ///      The request was made by the Google Cloud SDK CLI (gcloud).
    /// +   `AppEngine-Google; (+<http://code.google.com/appengine;> appid:
    /// s~my-project`:
    ///      The request was made from the `my-project` App Engine app.
    #[prost(string, tag = "2")]
    pub caller_supplied_user_agent: ::prost::alloc::string::String,
    /// The network of the caller.
    /// Set only if the network host project is part of the same GCP organization
    /// (or project) as the accessed resource.
    /// See <https://cloud.google.com/compute/docs/vpc/> for more information.
    /// This is a scheme-less URI full resource name. For example:
    ///
    ///      "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID"
    #[prost(string, tag = "3")]
    pub caller_network: ::prost::alloc::string::String,
    /// Request attributes used in IAM condition evaluation. This field contains
    /// request attributes like request time and access levels associated with
    /// the request.
    ///
    ///
    /// To get the whole view of the attributes used in IAM
    /// condition evaluation, the user must also look into
    /// `AuditLog.authentication_info.resource_attributes`.
    #[prost(message, optional, tag = "7")]
    pub request_attributes: ::core::option::Option<
        super::super::rpc::context::attribute_context::Request,
    >,
    /// The destination of a network activity, such as accepting a TCP connection.
    /// In a multi hop network activity, the destination represents the receiver of
    /// the last hop. Only two fields are used in this message, Peer.port and
    /// Peer.ip. These fields are optionally populated by those services utilizing
    /// the IAM condition feature.
    #[prost(message, optional, tag = "8")]
    pub destination_attributes: ::core::option::Option<
        super::super::rpc::context::attribute_context::Peer,
    >,
}
/// Location information about a resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceLocation {
    /// The locations of a resource after the execution of the operation.
    /// Requests to create or delete a location based resource must populate
    /// the 'current_locations' field and not the 'original_locations' field.
    /// For example:
    ///
    ///      "europe-west1-a"
    ///      "us-east1"
    ///      "nam3"
    #[prost(string, repeated, tag = "1")]
    pub current_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The locations of a resource prior to the execution of the operation.
    /// Requests that mutate the resource's location must populate both the
    /// 'original_locations' as well as the 'current_locations' fields.
    /// For example:
    ///
    ///      "europe-west1-a"
    ///      "us-east1"
    ///      "nam3"
    #[prost(string, repeated, tag = "2")]
    pub original_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Identity delegation history of an authenticated service account.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceAccountDelegationInfo {
    /// A string representing the principal_subject associated with the identity.
    /// For most identities, the format will be
    /// `principal://iam.googleapis.com/{identity pool name}/subject/{subject)`
    /// except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD)
    /// that are still in the legacy format `serviceAccount:{identity pool
    /// name}\[{subject}\]`
    #[prost(string, tag = "3")]
    pub principal_subject: ::prost::alloc::string::String,
    /// Entity that creates credentials for service account and assumes its
    /// identity for authentication.
    #[prost(oneof = "service_account_delegation_info::Authority", tags = "1, 2")]
    pub authority: ::core::option::Option<service_account_delegation_info::Authority>,
}
/// Nested message and enum types in `ServiceAccountDelegationInfo`.
pub mod service_account_delegation_info {
    /// First party identity principal.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FirstPartyPrincipal {
        /// The email address of a Google account.
        #[prost(string, tag = "1")]
        pub principal_email: ::prost::alloc::string::String,
        /// Metadata about the service that uses the service account.
        #[prost(message, optional, tag = "2")]
        pub service_metadata: ::core::option::Option<::prost_types::Struct>,
    }
    /// Third party identity principal.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ThirdPartyPrincipal {
        /// Metadata about third party identity.
        #[prost(message, optional, tag = "1")]
        pub third_party_claims: ::core::option::Option<::prost_types::Struct>,
    }
    /// Entity that creates credentials for service account and assumes its
    /// identity for authentication.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Authority {
        /// First party (Google) identity as the real authority.
        #[prost(message, tag = "1")]
        FirstPartyPrincipal(FirstPartyPrincipal),
        /// Third party identity as the real authority.
        #[prost(message, tag = "2")]
        ThirdPartyPrincipal(ThirdPartyPrincipal),
    }
}
/// Information related to policy violations for this request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyViolationInfo {
    /// Indicates the orgpolicy violations for this resource.
    #[prost(message, optional, tag = "1")]
    pub org_policy_violation_info: ::core::option::Option<OrgPolicyViolationInfo>,
}
/// Represents OrgPolicy Violation information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrgPolicyViolationInfo {
    /// Optional. Resource payload that is currently in scope and is subjected to orgpolicy
    /// conditions. This payload may be the subset of the actual Resource that may
    /// come in the request. This payload should not contain any core content.
    #[prost(message, optional, tag = "1")]
    pub payload: ::core::option::Option<::prost_types::Struct>,
    /// Optional. Resource type that the orgpolicy is checked against.
    /// Example: compute.googleapis.com/Instance, store.googleapis.com/bucket
    #[prost(string, tag = "2")]
    pub resource_type: ::prost::alloc::string::String,
    /// Optional. Tags referenced on the resource at the time of evaluation. These also
    /// include the federated tags, if they are supplied in the CheckOrgPolicy
    /// or CheckCustomConstraints Requests.
    ///
    /// Optional field as of now. These tags are the Cloud tags that are
    /// available on the resource during the policy evaluation and will
    /// be available as part of the OrgPolicy check response for logging purposes.
    #[prost(btree_map = "string, string", tag = "3")]
    pub resource_tags: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. Policy violations
    #[prost(message, repeated, tag = "4")]
    pub violation_info: ::prost::alloc::vec::Vec<ViolationInfo>,
}
/// Provides information about the Policy violation info for this request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViolationInfo {
    /// Optional. Constraint name
    #[prost(string, tag = "1")]
    pub constraint: ::prost::alloc::string::String,
    /// Optional. Error message that policy is indicating.
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
    /// Optional. Value that is being checked for the policy.
    /// This could be in encrypted form (if pii sensitive).
    /// This field will only be emitted in LIST_POLICY types
    #[prost(string, tag = "3")]
    pub checked_value: ::prost::alloc::string::String,
    /// Optional. Indicates the type of the policy.
    #[prost(enumeration = "violation_info::PolicyType", tag = "4")]
    pub policy_type: i32,
}
/// Nested message and enum types in `ViolationInfo`.
pub mod violation_info {
    /// Policy Type enum
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PolicyType {
        /// Default value. This value should not be used.
        Unspecified = 0,
        /// Indicates boolean policy constraint
        BooleanConstraint = 1,
        /// Indicates list policy constraint
        ListConstraint = 2,
        /// Indicates custom policy constraint
        CustomConstraint = 3,
    }
    impl PolicyType {
        /// 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 {
                PolicyType::Unspecified => "POLICY_TYPE_UNSPECIFIED",
                PolicyType::BooleanConstraint => "BOOLEAN_CONSTRAINT",
                PolicyType::ListConstraint => "LIST_CONSTRAINT",
                PolicyType::CustomConstraint => "CUSTOM_CONSTRAINT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "POLICY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "BOOLEAN_CONSTRAINT" => Some(Self::BooleanConstraint),
                "LIST_CONSTRAINT" => Some(Self::ListConstraint),
                "CUSTOM_CONSTRAINT" => Some(Self::CustomConstraint),
                _ => None,
            }
        }
    }
}