1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
// This file is @generated by prost-build.
/// Request message for DeleteBucket.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBucketRequest {
    /// Required. Name of a bucket to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// If set, only deletes the bucket if its metageneration matches this value.
    #[prost(int64, optional, tag = "2")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// If set, only deletes the bucket if its metageneration does not match this
    /// value.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
}
/// Request message for GetBucket.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBucketRequest {
    /// Required. Name of a bucket.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// If set, and if the bucket's current metageneration does not match the
    /// specified value, the request will return an error.
    #[prost(int64, optional, tag = "2")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// If set, and if the bucket's current metageneration matches the specified
    /// value, the request will return an error.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Mask specifying which fields to read.
    /// A "*" field may be used to indicate all fields.
    /// If no mask is specified, will default to all fields.
    #[prost(message, optional, tag = "5")]
    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request message for CreateBucket.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBucketRequest {
    /// Required. The project to which this bucket will belong.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Properties of the new bucket being inserted.
    /// The name of the bucket is specified in the `bucket_id` field. Populating
    /// `bucket.name` field will result in an error.
    /// The project of the bucket must be specified in the `bucket.project` field.
    /// This field must be in `projects/{projectIdentifier}` format,
    /// {projectIdentifier} can be the project ID or project number. The `parent`
    /// field must be either empty or `projects/_`.
    #[prost(message, optional, tag = "2")]
    pub bucket: ::core::option::Option<Bucket>,
    /// Required. The ID to use for this bucket, which will become the final
    /// component of the bucket's resource name. For example, the value `foo` might
    /// result in a bucket with the name `projects/123456/buckets/foo`.
    #[prost(string, tag = "3")]
    pub bucket_id: ::prost::alloc::string::String,
    /// Apply a predefined set of access controls to this bucket.
    /// Valid values are "authenticatedRead", "private", "projectPrivate",
    /// "publicRead", or "publicReadWrite".
    #[prost(string, tag = "6")]
    pub predefined_acl: ::prost::alloc::string::String,
    /// Apply a predefined set of default object access controls to this bucket.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "7")]
    pub predefined_default_object_acl: ::prost::alloc::string::String,
}
/// Request message for ListBuckets.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBucketsRequest {
    /// Required. The project whose buckets we are listing.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of buckets to return in a single response. The service will
    /// use this parameter or 1,000 items, whichever is smaller. If "acl" is
    /// present in the read_mask, the service will use this parameter of 200 items,
    /// whichever is smaller.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A previously-returned page token representing part of the larger set of
    /// results to view.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter results to buckets whose names begin with this prefix.
    #[prost(string, tag = "4")]
    pub prefix: ::prost::alloc::string::String,
    /// Mask specifying which fields to read from each result.
    /// If no mask is specified, will default to all fields except items.owner,
    /// items.acl, and items.default_object_acl.
    /// * may be used to mean "all fields".
    #[prost(message, optional, tag = "5")]
    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The result of a call to Buckets.ListBuckets
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBucketsResponse {
    /// The list of items.
    #[prost(message, repeated, tag = "1")]
    pub buckets: ::prost::alloc::vec::Vec<Bucket>,
    /// The continuation token, used to page through large result sets. Provide
    /// this value in a subsequent request to return the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for LockBucketRetentionPolicyRequest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LockBucketRetentionPolicyRequest {
    /// Required. Name of a bucket.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. Makes the operation conditional on whether bucket's current
    /// metageneration matches the given value. Must be positive.
    #[prost(int64, tag = "2")]
    pub if_metageneration_match: i64,
}
/// Request for UpdateBucket method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBucketRequest {
    /// Required. The bucket to update.
    /// The bucket's `name` field will be used to identify the bucket.
    #[prost(message, optional, tag = "1")]
    pub bucket: ::core::option::Option<Bucket>,
    /// If set, will only modify the bucket if its metageneration matches this
    /// value.
    #[prost(int64, optional, tag = "2")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// If set, will only modify the bucket if its metageneration does not match
    /// this value.
    #[prost(int64, optional, tag = "3")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Apply a predefined set of access controls to this bucket.
    /// Valid values are "authenticatedRead", "private", "projectPrivate",
    /// "publicRead", or "publicReadWrite".
    #[prost(string, tag = "8")]
    pub predefined_acl: ::prost::alloc::string::String,
    /// Apply a predefined set of default object access controls to this bucket.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "9")]
    pub predefined_default_object_acl: ::prost::alloc::string::String,
    /// Required. List of fields to be updated.
    ///
    /// To specify ALL fields, equivalent to the JSON API's "update" function,
    /// specify a single field with the value `*`. Note: not recommended. If a new
    /// field is introduced at a later time, an older client updating with the `*`
    /// may accidentally reset the new field's value.
    ///
    /// Not specifying any fields is an error.
    #[prost(message, optional, tag = "6")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request message for DeleteNotificationConfig.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteNotificationConfigRequest {
    /// Required. The parent bucket of the NotificationConfig.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for GetNotificationConfig.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNotificationConfigRequest {
    /// Required. The parent bucket of the NotificationConfig.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for CreateNotificationConfig.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNotificationConfigRequest {
    /// Required. The bucket to which this NotificationConfig belongs.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Properties of the NotificationConfig to be inserted.
    #[prost(message, optional, tag = "2")]
    pub notification_config: ::core::option::Option<NotificationConfig>,
}
/// Request message for ListNotifications.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNotificationConfigsRequest {
    /// Required. Name of a Google Cloud Storage bucket.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of NotificationConfigs to return. The service may
    /// return fewer than this value. The default value is 100. Specifying a value
    /// above 100 will result in a page_size of 100.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A page token, received from a previous `ListNotificationConfigs` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListNotificationConfigs`
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// The result of a call to ListNotificationConfigs
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNotificationConfigsResponse {
    /// The list of items.
    #[prost(message, repeated, tag = "1")]
    pub notification_configs: ::prost::alloc::vec::Vec<NotificationConfig>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for ComposeObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComposeObjectRequest {
    /// Required. Properties of the resulting object.
    #[prost(message, optional, tag = "1")]
    pub destination: ::core::option::Option<Object>,
    /// The list of source objects that will be concatenated into a single object.
    #[prost(message, repeated, tag = "2")]
    pub source_objects: ::prost::alloc::vec::Vec<compose_object_request::SourceObject>,
    /// Apply a predefined set of access controls to the destination object.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "9")]
    pub destination_predefined_acl: ::prost::alloc::string::String,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "4")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "5")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Resource name of the Cloud KMS key, of the form
    /// `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
    /// that will be used to encrypt the object. Overrides the object
    /// metadata's `kms_key_name` value, if any.
    #[prost(string, tag = "6")]
    pub kms_key: ::prost::alloc::string::String,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "7")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// The checksums of the complete object. This will be validated against the
    /// combined checksums of the component objects.
    #[prost(message, optional, tag = "10")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
}
/// Nested message and enum types in `ComposeObjectRequest`.
pub mod compose_object_request {
    /// Description of a source object for a composition request.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SourceObject {
        /// Required. The source object's name. All source objects must reside in the
        /// same bucket.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// The generation of this object to use as the source.
        #[prost(int64, tag = "2")]
        pub generation: i64,
        /// Conditions that must be met for this operation to execute.
        #[prost(message, optional, tag = "3")]
        pub object_preconditions: ::core::option::Option<
            source_object::ObjectPreconditions,
        >,
    }
    /// Nested message and enum types in `SourceObject`.
    pub mod source_object {
        /// Preconditions for a source object of a composition request.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct ObjectPreconditions {
            /// Only perform the composition if the generation of the source object
            /// that would be used matches this value.  If this value and a generation
            /// are both specified, they must be the same value or the call will fail.
            #[prost(int64, optional, tag = "1")]
            pub if_generation_match: ::core::option::Option<i64>,
        }
    }
}
/// Message for deleting an object.
/// `bucket` and `object` **must** be set.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteObjectRequest {
    /// Required. Name of the bucket in which the object resides.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. The name of the finalized object to delete.
    /// Note: If you want to delete an unfinalized resumable upload please use
    /// `CancelResumableWrite`.
    #[prost(string, tag = "2")]
    pub object: ::prost::alloc::string::String,
    /// If present, permanently deletes a specific revision of this object (as
    /// opposed to the latest version, the default).
    #[prost(int64, tag = "4")]
    pub generation: i64,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "5")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "6")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "7")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "8")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "10")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
}
/// Message for restoring an object.
/// `bucket`, `object`, and `generation` **must** be set.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreObjectRequest {
    /// Required. Name of the bucket in which the object resides.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. The name of the object to restore.
    #[prost(string, tag = "2")]
    pub object: ::prost::alloc::string::String,
    /// Required. The specific revision of the object to restore.
    #[prost(int64, tag = "3")]
    pub generation: i64,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "4")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "5")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "6")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "7")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// If false or unset, the bucket's default object ACL will be used.
    /// If true, copy the source object's access controls.
    /// Return an error if bucket has UBLA enabled.
    #[prost(bool, optional, tag = "9")]
    pub copy_source_acl: ::core::option::Option<bool>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "8")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
}
/// Message for canceling an in-progress resumable upload.
/// `upload_id` **must** be set.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelResumableWriteRequest {
    /// Required. The upload_id of the resumable upload to cancel. This should be
    /// copied from the `upload_id` field of `StartResumableWriteResponse`.
    #[prost(string, tag = "1")]
    pub upload_id: ::prost::alloc::string::String,
}
/// Empty response message for canceling an in-progress resumable upload, will be
/// extended as needed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelResumableWriteResponse {}
/// Request message for ReadObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadObjectRequest {
    /// Required. The name of the bucket containing the object to read.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. The name of the object to read.
    #[prost(string, tag = "2")]
    pub object: ::prost::alloc::string::String,
    /// If present, selects a specific revision of this object (as opposed
    /// to the latest version, the default).
    #[prost(int64, tag = "3")]
    pub generation: i64,
    /// The offset for the first byte to return in the read, relative to the start
    /// of the object.
    ///
    /// A negative `read_offset` value will be interpreted as the number of bytes
    /// back from the end of the object to be returned. For example, if an object's
    /// length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and
    /// `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting
    /// a negative offset with magnitude larger than the size of the object will
    /// return the entire object.
    #[prost(int64, tag = "4")]
    pub read_offset: i64,
    /// The maximum number of `data` bytes the server is allowed to return in the
    /// sum of all `Object` messages. A `read_limit` of zero indicates that there
    /// is no limit, and a negative `read_limit` will cause an error.
    ///
    /// If the stream returns fewer bytes than allowed by the `read_limit` and no
    /// error occurred, the stream includes all data from the `read_offset` to the
    /// end of the resource.
    #[prost(int64, tag = "5")]
    pub read_limit: i64,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "6")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "7")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "8")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "9")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "10")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// Mask specifying which fields to read.
    /// The checksummed_data field and its children will always be present.
    /// If no mask is specified, will default to all fields except metadata.owner
    /// and metadata.acl.
    /// * may be used to mean "all fields".
    #[prost(message, optional, tag = "12")]
    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request message for GetObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetObjectRequest {
    /// Required. Name of the bucket in which the object resides.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. Name of the object.
    #[prost(string, tag = "2")]
    pub object: ::prost::alloc::string::String,
    /// If present, selects a specific revision of this object (as opposed to the
    /// latest version, the default).
    #[prost(int64, tag = "3")]
    pub generation: i64,
    /// If true, return the soft-deleted version of this object.
    #[prost(bool, optional, tag = "11")]
    pub soft_deleted: ::core::option::Option<bool>,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "4")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "5")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "6")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "7")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "8")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// Mask specifying which fields to read.
    /// If no mask is specified, will default to all fields except metadata.acl and
    /// metadata.owner.
    /// * may be used to mean "all fields".
    #[prost(message, optional, tag = "10")]
    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Response message for ReadObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadObjectResponse {
    /// A portion of the data for the object. The service **may** leave `data`
    /// empty for any given `ReadResponse`. This enables the service to inform the
    /// client that the request is still live while it is running an operation to
    /// generate more data.
    #[prost(message, optional, tag = "1")]
    pub checksummed_data: ::core::option::Option<ChecksummedData>,
    /// The checksums of the complete object. If the object is downloaded in full,
    /// the client should compute one of these checksums over the downloaded object
    /// and compare it against the value provided here.
    #[prost(message, optional, tag = "2")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
    /// If read_offset and or read_limit was specified on the
    /// ReadObjectRequest, ContentRange will be populated on the first
    /// ReadObjectResponse message of the read stream.
    #[prost(message, optional, tag = "3")]
    pub content_range: ::core::option::Option<ContentRange>,
    /// Metadata of the object whose media is being returned.
    /// Only populated in the first response in the stream.
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<Object>,
}
/// Describes an attempt to insert an object, possibly over multiple requests.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectSpec {
    /// Required. Destination object, including its name and its metadata.
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Object>,
    /// Apply a predefined set of access controls to this object.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "7")]
    pub predefined_acl: ::prost::alloc::string::String,
    /// Makes the operation conditional on whether the object's current
    /// generation matches the given value. Setting to 0 makes the operation
    /// succeed only if there are no live versions of the object.
    #[prost(int64, optional, tag = "3")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live
    /// generation does not match the given value. If no live object exists, the
    /// precondition fails. Setting to 0 makes the operation succeed only if
    /// there is a live version of the object.
    #[prost(int64, optional, tag = "4")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "5")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "6")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// The expected final object size being uploaded.
    /// If this value is set, closing the stream after writing fewer or more than
    /// `object_size` bytes will result in an OUT_OF_RANGE error.
    ///
    /// This situation is considered a client error, and if such an error occurs
    /// you must start the upload over from scratch, this time sending the correct
    /// number of bytes.
    #[prost(int64, optional, tag = "8")]
    pub object_size: ::core::option::Option<i64>,
}
/// Request message for WriteObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectRequest {
    /// Required. The offset from the beginning of the object at which the data
    /// should be written.
    ///
    /// In the first `WriteObjectRequest` of a `WriteObject()` action, it
    /// indicates the initial offset for the `Write()` call. The value **must** be
    /// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
    /// return (0 if this is the first write to the object).
    ///
    /// On subsequent calls, this value **must** be no larger than the sum of the
    /// first `write_offset` and the sizes of all `data` chunks sent previously on
    /// this stream.
    ///
    /// An incorrect value will cause an error.
    #[prost(int64, tag = "3")]
    pub write_offset: i64,
    /// Checksums for the complete object. If the checksums computed by the service
    /// don't match the specified checksums the call will fail. May only be
    /// provided in the first or last request (either with first_message, or
    /// finish_write set).
    #[prost(message, optional, tag = "6")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
    /// If `true`, this indicates that the write is complete. Sending any
    /// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
    /// will cause an error.
    /// For a non-resumable write (where the upload_id was not set in the first
    /// message), it is an error not to set this field in the final message of the
    /// stream.
    #[prost(bool, tag = "7")]
    pub finish_write: bool,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "8")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// The first message of each stream should set one of the following.
    #[prost(oneof = "write_object_request::FirstMessage", tags = "1, 2")]
    pub first_message: ::core::option::Option<write_object_request::FirstMessage>,
    /// A portion of the data for the object.
    #[prost(oneof = "write_object_request::Data", tags = "4")]
    pub data: ::core::option::Option<write_object_request::Data>,
}
/// Nested message and enum types in `WriteObjectRequest`.
pub mod write_object_request {
    /// The first message of each stream should set one of the following.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FirstMessage {
        /// For resumable uploads. This should be the `upload_id` returned from a
        /// call to `StartResumableWriteResponse`.
        #[prost(string, tag = "1")]
        UploadId(::prost::alloc::string::String),
        /// For non-resumable uploads. Describes the overall upload, including the
        /// destination bucket and object name, preconditions, etc.
        #[prost(message, tag = "2")]
        WriteObjectSpec(super::WriteObjectSpec),
    }
    /// A portion of the data for the object.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// The data to insert. If a crc32c checksum is provided that doesn't match
        /// the checksum computed by the service, the request will fail.
        #[prost(message, tag = "4")]
        ChecksummedData(super::ChecksummedData),
    }
}
/// Response message for WriteObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectResponse {
    /// The response will set one of the following.
    #[prost(oneof = "write_object_response::WriteStatus", tags = "1, 2")]
    pub write_status: ::core::option::Option<write_object_response::WriteStatus>,
}
/// Nested message and enum types in `WriteObjectResponse`.
pub mod write_object_response {
    /// The response will set one of the following.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum WriteStatus {
        /// The total number of bytes that have been processed for the given object
        /// from all `WriteObject` calls. Only set if the upload has not finalized.
        #[prost(int64, tag = "1")]
        PersistedSize(i64),
        /// A resource containing the metadata for the uploaded object. Only set if
        /// the upload has finalized.
        #[prost(message, tag = "2")]
        Resource(super::Object),
    }
}
/// Request message for BidiWriteObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BidiWriteObjectRequest {
    /// Required. The offset from the beginning of the object at which the data
    /// should be written.
    ///
    /// In the first `WriteObjectRequest` of a `WriteObject()` action, it
    /// indicates the initial offset for the `Write()` call. The value **must** be
    /// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
    /// return (0 if this is the first write to the object).
    ///
    /// On subsequent calls, this value **must** be no larger than the sum of the
    /// first `write_offset` and the sizes of all `data` chunks sent previously on
    /// this stream.
    ///
    /// An invalid value will cause an error.
    #[prost(int64, tag = "3")]
    pub write_offset: i64,
    /// Checksums for the complete object. If the checksums computed by the service
    /// don't match the specified checksums the call will fail. May only be
    /// provided in the first or last request (either with first_message, or
    /// finish_write set).
    #[prost(message, optional, tag = "6")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
    /// For each BidiWriteObjectRequest where state_lookup is `true` or the client
    /// closes the stream, the service will send a BidiWriteObjectResponse
    /// containing the current persisted size. The persisted size sent in responses
    /// covers all the bytes the server has persisted thus far and can be used to
    /// decide what data is safe for the client to drop. Note that the object's
    /// current size reported by the BidiWriteObjectResponse may lag behind the
    /// number of bytes written by the client. This field is ignored if
    /// `finish_write` is set to true.
    #[prost(bool, tag = "7")]
    pub state_lookup: bool,
    /// Persists data written on the stream, up to and including the current
    /// message, to permanent storage. This option should be used sparingly as it
    /// may reduce performance. Ongoing writes will periodically be persisted on
    /// the server even when `flush` is not set. This field is ignored if
    /// `finish_write` is set to true since there's no need to checkpoint or flush
    /// if this message completes the write.
    #[prost(bool, tag = "8")]
    pub flush: bool,
    /// If `true`, this indicates that the write is complete. Sending any
    /// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
    /// will cause an error.
    /// For a non-resumable write (where the upload_id was not set in the first
    /// message), it is an error not to set this field in the final message of the
    /// stream.
    #[prost(bool, tag = "9")]
    pub finish_write: bool,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "10")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// The first message of each stream should set one of the following.
    #[prost(oneof = "bidi_write_object_request::FirstMessage", tags = "1, 2")]
    pub first_message: ::core::option::Option<bidi_write_object_request::FirstMessage>,
    /// A portion of the data for the object.
    #[prost(oneof = "bidi_write_object_request::Data", tags = "4")]
    pub data: ::core::option::Option<bidi_write_object_request::Data>,
}
/// Nested message and enum types in `BidiWriteObjectRequest`.
pub mod bidi_write_object_request {
    /// The first message of each stream should set one of the following.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FirstMessage {
        /// For resumable uploads. This should be the `upload_id` returned from a
        /// call to `StartResumableWriteResponse`.
        #[prost(string, tag = "1")]
        UploadId(::prost::alloc::string::String),
        /// For non-resumable uploads. Describes the overall upload, including the
        /// destination bucket and object name, preconditions, etc.
        #[prost(message, tag = "2")]
        WriteObjectSpec(super::WriteObjectSpec),
    }
    /// A portion of the data for the object.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// The data to insert. If a crc32c checksum is provided that doesn't match
        /// the checksum computed by the service, the request will fail.
        #[prost(message, tag = "4")]
        ChecksummedData(super::ChecksummedData),
    }
}
/// Response message for BidiWriteObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BidiWriteObjectResponse {
    /// The response will set one of the following.
    #[prost(oneof = "bidi_write_object_response::WriteStatus", tags = "1, 2")]
    pub write_status: ::core::option::Option<bidi_write_object_response::WriteStatus>,
}
/// Nested message and enum types in `BidiWriteObjectResponse`.
pub mod bidi_write_object_response {
    /// The response will set one of the following.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum WriteStatus {
        /// The total number of bytes that have been processed for the given object
        /// from all `WriteObject` calls. Only set if the upload has not finalized.
        #[prost(int64, tag = "1")]
        PersistedSize(i64),
        /// A resource containing the metadata for the uploaded object. Only set if
        /// the upload has finalized.
        #[prost(message, tag = "2")]
        Resource(super::Object),
    }
}
/// Request message for ListObjects.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListObjectsRequest {
    /// Required. Name of the bucket in which to look for objects.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of `items` plus `prefixes` to return
    /// in a single page of responses. As duplicate `prefixes` are
    /// omitted, fewer total results may be returned than requested. The service
    /// will use this parameter or 1,000 items, whichever is smaller.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A previously-returned page token representing part of the larger set of
    /// results to view.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// If set, returns results in a directory-like mode. `items` will contain
    /// only objects whose names, aside from the `prefix`, do not
    /// contain `delimiter`. Objects whose names, aside from the
    /// `prefix`, contain `delimiter` will have their name,
    /// truncated after the `delimiter`, returned in
    /// `prefixes`. Duplicate `prefixes` are omitted.
    #[prost(string, tag = "4")]
    pub delimiter: ::prost::alloc::string::String,
    /// If true, objects that end in exactly one instance of `delimiter`
    /// will have their metadata included in `items` in addition to
    /// `prefixes`.
    #[prost(bool, tag = "5")]
    pub include_trailing_delimiter: bool,
    /// Filter results to objects whose names begin with this prefix.
    #[prost(string, tag = "6")]
    pub prefix: ::prost::alloc::string::String,
    /// If `true`, lists all versions of an object as distinct results.
    /// For more information, see
    /// [Object
    /// Versioning](<https://cloud.google.com/storage/docs/object-versioning>).
    #[prost(bool, tag = "7")]
    pub versions: bool,
    /// Mask specifying which fields to read from each result.
    /// If no mask is specified, will default to all fields except items.acl and
    /// items.owner.
    /// * may be used to mean "all fields".
    #[prost(message, optional, tag = "8")]
    pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. Filter results to objects whose names are lexicographically equal
    /// to or after lexicographic_start. If lexicographic_end is also set, the
    /// objects listed have names between lexicographic_start (inclusive) and
    /// lexicographic_end (exclusive).
    #[prost(string, tag = "10")]
    pub lexicographic_start: ::prost::alloc::string::String,
    /// Optional. Filter results to objects whose names are lexicographically
    /// before lexicographic_end. If lexicographic_start is also set, the objects
    /// listed have names between lexicographic_start (inclusive) and
    /// lexicographic_end (exclusive).
    #[prost(string, tag = "11")]
    pub lexicographic_end: ::prost::alloc::string::String,
    /// Optional. If true, only list all soft-deleted versions of the object.
    /// Soft delete policy is required to set this option.
    #[prost(bool, tag = "12")]
    pub soft_deleted: bool,
    /// Optional. If true, will also include folders and managed folders (besides
    /// objects) in the returned `prefixes`. Requires `delimiter` to be set to '/'.
    #[prost(bool, tag = "13")]
    pub include_folders_as_prefixes: bool,
    /// Optional. Filter results to objects and prefixes that match this glob
    /// pattern. See [List Objects Using
    /// Glob](<https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob>)
    /// for the full syntax.
    #[prost(string, tag = "14")]
    pub match_glob: ::prost::alloc::string::String,
}
/// Request object for `QueryWriteStatus`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryWriteStatusRequest {
    /// Required. The name of the resume token for the object whose write status is
    /// being requested.
    #[prost(string, tag = "1")]
    pub upload_id: ::prost::alloc::string::String,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "2")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
}
/// Response object for `QueryWriteStatus`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryWriteStatusResponse {
    /// The response will set one of the following.
    #[prost(oneof = "query_write_status_response::WriteStatus", tags = "1, 2")]
    pub write_status: ::core::option::Option<query_write_status_response::WriteStatus>,
}
/// Nested message and enum types in `QueryWriteStatusResponse`.
pub mod query_write_status_response {
    /// The response will set one of the following.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum WriteStatus {
        /// The total number of bytes that have been processed for the given object
        /// from all `WriteObject` calls. This is the correct value for the
        /// 'write_offset' field to use when resuming the `WriteObject` operation.
        /// Only set if the upload has not finalized.
        #[prost(int64, tag = "1")]
        PersistedSize(i64),
        /// A resource containing the metadata for the uploaded object. Only set if
        /// the upload has finalized.
        #[prost(message, tag = "2")]
        Resource(super::Object),
    }
}
/// Request message for RewriteObject.
/// If the source object is encrypted using a Customer-Supplied Encryption Key
/// the key information must be provided in the copy_source_encryption_algorithm,
/// copy_source_encryption_key_bytes, and copy_source_encryption_key_sha256_bytes
/// fields. If the destination object should be encrypted the keying information
/// should be provided in the encryption_algorithm, encryption_key_bytes, and
/// encryption_key_sha256_bytes fields of the
/// common_object_request_params.customer_encryption field.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RewriteObjectRequest {
    /// Required. Immutable. The name of the destination object.
    /// See the
    /// [Naming Guidelines](<https://cloud.google.com/storage/docs/objects#naming>).
    /// Example: `test.txt`
    /// The `name` field by itself does not uniquely identify a Cloud Storage
    /// object. A Cloud Storage object is uniquely identified by the tuple of
    /// (bucket, object, generation).
    #[prost(string, tag = "24")]
    pub destination_name: ::prost::alloc::string::String,
    /// Required. Immutable. The name of the bucket containing the destination
    /// object.
    #[prost(string, tag = "25")]
    pub destination_bucket: ::prost::alloc::string::String,
    /// The name of the Cloud KMS key that will be used to encrypt the destination
    /// object. The Cloud KMS key must be located in same location as the object.
    /// If the parameter is not specified, the request uses the destination
    /// bucket's default encryption key, if any, or else the Google-managed
    /// encryption key.
    #[prost(string, tag = "27")]
    pub destination_kms_key: ::prost::alloc::string::String,
    /// Properties of the destination, post-rewrite object.
    /// The `name`, `bucket` and `kms_key` fields must not be populated (these
    /// values are specified in the `destination_name`, `destination_bucket`, and
    /// `destination_kms_key` fields).
    /// If `destination` is present it will be used to construct the destination
    /// object's metadata; otherwise the destination object's metadata will be
    /// copied from the source object.
    #[prost(message, optional, tag = "1")]
    pub destination: ::core::option::Option<Object>,
    /// Required. Name of the bucket in which to find the source object.
    #[prost(string, tag = "2")]
    pub source_bucket: ::prost::alloc::string::String,
    /// Required. Name of the source object.
    #[prost(string, tag = "3")]
    pub source_object: ::prost::alloc::string::String,
    /// If present, selects a specific revision of the source object (as opposed to
    /// the latest version, the default).
    #[prost(int64, tag = "4")]
    pub source_generation: i64,
    /// Include this field (from the previous rewrite response) on each rewrite
    /// request after the first one, until the rewrite response 'done' flag is
    /// true. Calls that provide a rewriteToken can omit all other request fields,
    /// but if included those fields must match the values provided in the first
    /// rewrite request.
    #[prost(string, tag = "5")]
    pub rewrite_token: ::prost::alloc::string::String,
    /// Apply a predefined set of access controls to the destination object.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "28")]
    pub destination_predefined_acl: ::prost::alloc::string::String,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "7")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "8")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the destination object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "9")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the destination object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "10")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the source object's live
    /// generation matches the given value.
    #[prost(int64, optional, tag = "11")]
    pub if_source_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the source object's live
    /// generation does not match the given value.
    #[prost(int64, optional, tag = "12")]
    pub if_source_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the source object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "13")]
    pub if_source_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the source object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "14")]
    pub if_source_metageneration_not_match: ::core::option::Option<i64>,
    /// The maximum number of bytes that will be rewritten per rewrite request.
    /// Most callers
    /// shouldn't need to specify this parameter - it is primarily in place to
    /// support testing. If specified the value must be an integral multiple of
    /// 1 MiB (1048576). Also, this only applies to requests where the source and
    /// destination span locations and/or storage classes. Finally, this value must
    /// not change across rewrite calls else you'll get an error that the
    /// `rewriteToken` is invalid.
    #[prost(int64, tag = "15")]
    pub max_bytes_rewritten_per_call: i64,
    /// The algorithm used to encrypt the source object, if any. Used if the source
    /// object was encrypted with a Customer-Supplied Encryption Key.
    #[prost(string, tag = "16")]
    pub copy_source_encryption_algorithm: ::prost::alloc::string::String,
    /// The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
    /// the source object, if it was encrypted with a Customer-Supplied Encryption
    /// Key.
    #[prost(bytes = "bytes", tag = "21")]
    pub copy_source_encryption_key_bytes: ::prost::bytes::Bytes,
    /// The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
    /// to encrypt the source object, if it was encrypted with a Customer-Supplied
    /// Encryption Key.
    #[prost(bytes = "bytes", tag = "22")]
    pub copy_source_encryption_key_sha256_bytes: ::prost::bytes::Bytes,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "19")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// The checksums of the complete object. This will be used to validate the
    /// destination object after rewriting.
    #[prost(message, optional, tag = "29")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
}
/// A rewrite response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RewriteResponse {
    /// The total bytes written so far, which can be used to provide a waiting user
    /// with a progress indicator. This property is always present in the response.
    #[prost(int64, tag = "1")]
    pub total_bytes_rewritten: i64,
    /// The total size of the object being copied in bytes. This property is always
    /// present in the response.
    #[prost(int64, tag = "2")]
    pub object_size: i64,
    /// `true` if the copy is finished; otherwise, `false` if
    /// the copy is in progress. This property is always present in the response.
    #[prost(bool, tag = "3")]
    pub done: bool,
    /// A token to use in subsequent requests to continue copying data. This token
    /// is present in the response only when there is more data to copy.
    #[prost(string, tag = "4")]
    pub rewrite_token: ::prost::alloc::string::String,
    /// A resource containing the metadata for the copied-to object. This property
    /// is present in the response only when copying completes.
    #[prost(message, optional, tag = "5")]
    pub resource: ::core::option::Option<Object>,
}
/// Request message StartResumableWrite.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartResumableWriteRequest {
    /// Required. The destination bucket, object, and metadata, as well as any
    /// preconditions.
    #[prost(message, optional, tag = "1")]
    pub write_object_spec: ::core::option::Option<WriteObjectSpec>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "3")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
    /// The checksums of the complete object. This will be used to validate the
    /// uploaded object. For each upload, object_checksums can be provided with
    /// either StartResumableWriteRequest or the WriteObjectRequest with
    /// finish_write set to `true`.
    #[prost(message, optional, tag = "5")]
    pub object_checksums: ::core::option::Option<ObjectChecksums>,
}
/// Response object for `StartResumableWrite`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartResumableWriteResponse {
    /// The upload_id of the newly started resumable write operation. This
    /// value should be copied into the `WriteObjectRequest.upload_id` field.
    #[prost(string, tag = "1")]
    pub upload_id: ::prost::alloc::string::String,
}
/// Request message for UpdateObject.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateObjectRequest {
    /// Required. The object to update.
    /// The object's bucket and name fields are used to identify the object to
    /// update. If present, the object's generation field selects a specific
    /// revision of this object whose metadata should be updated. Otherwise,
    /// assumes the live version of the object.
    #[prost(message, optional, tag = "1")]
    pub object: ::core::option::Option<Object>,
    /// Makes the operation conditional on whether the object's current generation
    /// matches the given value. Setting to 0 makes the operation succeed only if
    /// there are no live versions of the object.
    #[prost(int64, optional, tag = "2")]
    pub if_generation_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's live generation
    /// does not match the given value. If no live object exists, the precondition
    /// fails. Setting to 0 makes the operation succeed only if there is a live
    /// version of the object.
    #[prost(int64, optional, tag = "3")]
    pub if_generation_not_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration matches the given value.
    #[prost(int64, optional, tag = "4")]
    pub if_metageneration_match: ::core::option::Option<i64>,
    /// Makes the operation conditional on whether the object's current
    /// metageneration does not match the given value.
    #[prost(int64, optional, tag = "5")]
    pub if_metageneration_not_match: ::core::option::Option<i64>,
    /// Apply a predefined set of access controls to this object.
    /// Valid values are "authenticatedRead", "bucketOwnerFullControl",
    /// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
    #[prost(string, tag = "10")]
    pub predefined_acl: ::prost::alloc::string::String,
    /// Required. List of fields to be updated.
    ///
    /// To specify ALL fields, equivalent to the JSON API's "update" function,
    /// specify a single field with the value `*`. Note: not recommended. If a new
    /// field is introduced at a later time, an older client updating with the `*`
    /// may accidentally reset the new field's value.
    ///
    /// Not specifying any fields is an error.
    #[prost(message, optional, tag = "7")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// A set of parameters common to Storage API requests concerning an object.
    #[prost(message, optional, tag = "8")]
    pub common_object_request_params: ::core::option::Option<CommonObjectRequestParams>,
}
/// Request message for GetServiceAccount.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceAccountRequest {
    /// Required. Project ID, in the format of "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "1")]
    pub project: ::prost::alloc::string::String,
}
/// Request message for CreateHmacKey.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateHmacKeyRequest {
    /// Required. The project that the HMAC-owning service account lives in, in the
    /// format of "projects/{projectIdentifier}". {projectIdentifier} can be the
    /// project ID or project number.
    #[prost(string, tag = "1")]
    pub project: ::prost::alloc::string::String,
    /// Required. The service account to create the HMAC for.
    #[prost(string, tag = "2")]
    pub service_account_email: ::prost::alloc::string::String,
}
/// Create hmac response.  The only time the secret for an HMAC will be returned.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateHmacKeyResponse {
    /// Key metadata.
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<HmacKeyMetadata>,
    /// HMAC key secret material.
    /// In raw bytes format (not base64-encoded).
    #[prost(bytes = "bytes", tag = "3")]
    pub secret_key_bytes: ::prost::bytes::Bytes,
}
/// Request object to delete a given HMAC key.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteHmacKeyRequest {
    /// Required. The identifying key for the HMAC to delete.
    #[prost(string, tag = "1")]
    pub access_id: ::prost::alloc::string::String,
    /// Required. The project that owns the HMAC key, in the format of
    /// "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "2")]
    pub project: ::prost::alloc::string::String,
}
/// Request object to get metadata on a given HMAC key.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHmacKeyRequest {
    /// Required. The identifying key for the HMAC to delete.
    #[prost(string, tag = "1")]
    pub access_id: ::prost::alloc::string::String,
    /// Required. The project the HMAC key lies in, in the format of
    /// "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "2")]
    pub project: ::prost::alloc::string::String,
}
/// Request to fetch a list of HMAC keys under a given project.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHmacKeysRequest {
    /// Required. The project to list HMAC keys for, in the format of
    /// "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "1")]
    pub project: ::prost::alloc::string::String,
    /// The maximum number of keys to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A previously returned token from ListHmacKeysResponse to get the next page.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// If set, filters to only return HMAC keys for specified service account.
    #[prost(string, tag = "4")]
    pub service_account_email: ::prost::alloc::string::String,
    /// If set, return deleted keys that have not yet been wiped out.
    #[prost(bool, tag = "5")]
    pub show_deleted_keys: bool,
}
/// Hmac key list response with next page information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHmacKeysResponse {
    /// The list of items.
    #[prost(message, repeated, tag = "1")]
    pub hmac_keys: ::prost::alloc::vec::Vec<HmacKeyMetadata>,
    /// The continuation token, used to page through large result sets. Provide
    /// this value in a subsequent request to return the next page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request object to update an HMAC key state.
/// HmacKeyMetadata.state is required and the only writable field in
/// UpdateHmacKey operation. Specifying fields other than state will result in an
/// error.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHmacKeyRequest {
    /// Required. The HMAC key to update.
    /// If present, the hmac_key's `id` field will be used to identify the key.
    /// Otherwise, the hmac_key's access_id and project fields will be used to
    /// identify the key.
    #[prost(message, optional, tag = "1")]
    pub hmac_key: ::core::option::Option<HmacKeyMetadata>,
    /// Update mask for hmac_key.
    /// Not specifying any fields will mean only the `state` field is updated to
    /// the value specified in `hmac_key`.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Parameters that can be passed to any object request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommonObjectRequestParams {
    /// Encryption algorithm used with the Customer-Supplied Encryption Keys
    /// feature.
    #[prost(string, tag = "1")]
    pub encryption_algorithm: ::prost::alloc::string::String,
    /// Encryption key used with the Customer-Supplied Encryption Keys feature.
    /// In raw bytes format (not base64-encoded).
    #[prost(bytes = "bytes", tag = "4")]
    pub encryption_key_bytes: ::prost::bytes::Bytes,
    /// SHA256 hash of encryption key used with the Customer-Supplied Encryption
    /// Keys feature.
    #[prost(bytes = "bytes", tag = "5")]
    pub encryption_key_sha256_bytes: ::prost::bytes::Bytes,
}
/// Shared constants.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceConstants {}
/// Nested message and enum types in `ServiceConstants`.
pub mod service_constants {
    /// A collection of constant values meaningful to the Storage API.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Values {
        /// Unused. Proto3 requires first enum to be 0.
        Unspecified = 0,
        /// The maximum size chunk that can will be returned in a single
        /// ReadRequest.
        /// 2 MiB.
        MaxReadChunkBytes = 2097152,
        /// The maximum size of an object in MB - whether written in a single stream
        /// or composed from multiple other objects.
        /// 5 TiB.
        MaxObjectSizeMb = 5242880,
        /// The maximum length field name that can be sent in a single
        /// custom metadata field.
        /// 1 KiB.
        MaxCustomMetadataFieldNameBytes = 1024,
        /// The maximum length field value that can be sent in a single
        /// custom_metadata field.
        /// 4 KiB.
        MaxCustomMetadataFieldValueBytes = 4096,
        /// The maximum total bytes that can be populated into all field names and
        /// values of the custom_metadata for one object.
        /// 8 KiB.
        MaxCustomMetadataTotalSizeBytes = 8192,
        /// The maximum total bytes that can be populated into all bucket metadata
        /// fields.
        /// 20 KiB.
        MaxBucketMetadataTotalSizeBytes = 20480,
        /// The maximum number of NotificationConfigs that can be registered
        /// for a given bucket.
        MaxNotificationConfigsPerBucket = 100,
        /// The maximum number of custom attributes per NotificationConfigs.
        MaxNotificationCustomAttributes = 5,
        /// The maximum length of a custom attribute key included in
        /// NotificationConfig.
        MaxNotificationCustomAttributeKeyLength = 256,
        /// The maximum number of key/value entries per bucket label.
        MaxLabelsEntriesCount = 64,
        /// The maximum character length of the key or value in a bucket
        /// label map.
        MaxLabelsKeyValueLength = 63,
        /// The maximum byte size of the key or value in a bucket label
        /// map.
        MaxLabelsKeyValueBytes = 128,
        /// The maximum number of object IDs that can be included in a
        /// DeleteObjectsRequest.
        MaxObjectIdsPerDeleteObjectsRequest = 1000,
        /// The maximum number of days for which a token returned by the
        /// GetListObjectsSplitPoints RPC is valid.
        SplitTokenMaxValidDays = 14,
    }
    impl Values {
        /// 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 {
                Values::Unspecified => "VALUES_UNSPECIFIED",
                Values::MaxReadChunkBytes => "MAX_READ_CHUNK_BYTES",
                Values::MaxObjectSizeMb => "MAX_OBJECT_SIZE_MB",
                Values::MaxCustomMetadataFieldNameBytes => {
                    "MAX_CUSTOM_METADATA_FIELD_NAME_BYTES"
                }
                Values::MaxCustomMetadataFieldValueBytes => {
                    "MAX_CUSTOM_METADATA_FIELD_VALUE_BYTES"
                }
                Values::MaxCustomMetadataTotalSizeBytes => {
                    "MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES"
                }
                Values::MaxBucketMetadataTotalSizeBytes => {
                    "MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES"
                }
                Values::MaxNotificationConfigsPerBucket => {
                    "MAX_NOTIFICATION_CONFIGS_PER_BUCKET"
                }
                Values::MaxNotificationCustomAttributes => {
                    "MAX_NOTIFICATION_CUSTOM_ATTRIBUTES"
                }
                Values::MaxNotificationCustomAttributeKeyLength => {
                    "MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KEY_LENGTH"
                }
                Values::MaxLabelsEntriesCount => "MAX_LABELS_ENTRIES_COUNT",
                Values::MaxLabelsKeyValueLength => "MAX_LABELS_KEY_VALUE_LENGTH",
                Values::MaxLabelsKeyValueBytes => "MAX_LABELS_KEY_VALUE_BYTES",
                Values::MaxObjectIdsPerDeleteObjectsRequest => {
                    "MAX_OBJECT_IDS_PER_DELETE_OBJECTS_REQUEST"
                }
                Values::SplitTokenMaxValidDays => "SPLIT_TOKEN_MAX_VALID_DAYS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "VALUES_UNSPECIFIED" => Some(Self::Unspecified),
                "MAX_READ_CHUNK_BYTES" => Some(Self::MaxReadChunkBytes),
                "MAX_OBJECT_SIZE_MB" => Some(Self::MaxObjectSizeMb),
                "MAX_CUSTOM_METADATA_FIELD_NAME_BYTES" => {
                    Some(Self::MaxCustomMetadataFieldNameBytes)
                }
                "MAX_CUSTOM_METADATA_FIELD_VALUE_BYTES" => {
                    Some(Self::MaxCustomMetadataFieldValueBytes)
                }
                "MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES" => {
                    Some(Self::MaxCustomMetadataTotalSizeBytes)
                }
                "MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES" => {
                    Some(Self::MaxBucketMetadataTotalSizeBytes)
                }
                "MAX_NOTIFICATION_CONFIGS_PER_BUCKET" => {
                    Some(Self::MaxNotificationConfigsPerBucket)
                }
                "MAX_NOTIFICATION_CUSTOM_ATTRIBUTES" => {
                    Some(Self::MaxNotificationCustomAttributes)
                }
                "MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KEY_LENGTH" => {
                    Some(Self::MaxNotificationCustomAttributeKeyLength)
                }
                "MAX_LABELS_ENTRIES_COUNT" => Some(Self::MaxLabelsEntriesCount),
                "MAX_LABELS_KEY_VALUE_LENGTH" => Some(Self::MaxLabelsKeyValueLength),
                "MAX_LABELS_KEY_VALUE_BYTES" => Some(Self::MaxLabelsKeyValueBytes),
                "MAX_OBJECT_IDS_PER_DELETE_OBJECTS_REQUEST" => {
                    Some(Self::MaxObjectIdsPerDeleteObjectsRequest)
                }
                "SPLIT_TOKEN_MAX_VALID_DAYS" => Some(Self::SplitTokenMaxValidDays),
                _ => None,
            }
        }
    }
}
/// A bucket.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bucket {
    /// Immutable. The name of the bucket.
    /// Format: `projects/{project}/buckets/{bucket}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The user-chosen part of the bucket name. The `{bucket}`
    /// portion of the `name` field. For globally unique buckets, this is equal to
    /// the "bucket name" of other Cloud Storage APIs. Example: "pub".
    #[prost(string, tag = "2")]
    pub bucket_id: ::prost::alloc::string::String,
    /// The etag of the bucket.
    /// If included in the metadata of an UpdateBucketRequest, the operation will
    /// only be performed if the etag matches that of the bucket.
    #[prost(string, tag = "29")]
    pub etag: ::prost::alloc::string::String,
    /// Immutable. The project which owns this bucket, in the format of
    /// "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "3")]
    pub project: ::prost::alloc::string::String,
    /// Output only. The metadata generation of this bucket.
    #[prost(int64, tag = "4")]
    pub metageneration: i64,
    /// Immutable. The location of the bucket. Object data for objects in the
    /// bucket resides in physical storage within this region.  Defaults to `US`.
    /// See the
    /// [<https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's>
    /// guide] for the authoritative list. Attempting to update this field after
    /// the bucket is created will result in an error.
    #[prost(string, tag = "5")]
    pub location: ::prost::alloc::string::String,
    /// Output only. The location type of the bucket (region, dual-region,
    /// multi-region, etc).
    #[prost(string, tag = "6")]
    pub location_type: ::prost::alloc::string::String,
    /// The bucket's default storage class, used whenever no storageClass is
    /// specified for a newly-created object. This defines how objects in the
    /// bucket are stored and determines the SLA and the cost of storage.
    /// If this value is not specified when the bucket is created, it will default
    /// to `STANDARD`. For more information, see
    /// <https://developers.google.com/storage/docs/storage-classes.>
    #[prost(string, tag = "7")]
    pub storage_class: ::prost::alloc::string::String,
    /// The recovery point objective for cross-region replication of the bucket.
    /// Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
    /// replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
    /// buckets only. If rpo is not specified when the bucket is created, it
    /// defaults to "DEFAULT". For more information, see
    /// <https://cloud.google.com/storage/docs/availability-durability#turbo-replication.>
    #[prost(string, tag = "27")]
    pub rpo: ::prost::alloc::string::String,
    /// Access controls on the bucket.
    /// If iam_config.uniform_bucket_level_access is enabled on this bucket,
    /// requests to set, read, or modify acl is an error.
    #[prost(message, repeated, tag = "8")]
    pub acl: ::prost::alloc::vec::Vec<BucketAccessControl>,
    /// Default access controls to apply to new objects when no ACL is provided.
    /// If iam_config.uniform_bucket_level_access is enabled on this bucket,
    /// requests to set, read, or modify acl is an error.
    #[prost(message, repeated, tag = "9")]
    pub default_object_acl: ::prost::alloc::vec::Vec<ObjectAccessControl>,
    /// The bucket's lifecycle config. See
    /// \[<https://developers.google.com/storage/docs/lifecycle\]Lifecycle> Management]
    /// for more information.
    #[prost(message, optional, tag = "10")]
    pub lifecycle: ::core::option::Option<bucket::Lifecycle>,
    /// Output only. The creation time of the bucket.
    #[prost(message, optional, tag = "11")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The bucket's [<https://www.w3.org/TR/cors/][Cross-Origin> Resource Sharing]
    /// (CORS) config.
    #[prost(message, repeated, tag = "12")]
    pub cors: ::prost::alloc::vec::Vec<bucket::Cors>,
    /// Output only. The modification time of the bucket.
    #[prost(message, optional, tag = "13")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The default value for event-based hold on newly created objects in this
    /// bucket.  Event-based hold is a way to retain objects indefinitely until an
    /// event occurs, signified by the
    /// hold's release. After being released, such objects will be subject to
    /// bucket-level retention (if any).  One sample use case of this flag is for
    /// banks to hold loan documents for at least 3 years after loan is paid in
    /// full. Here, bucket-level retention is 3 years and the event is loan being
    /// paid in full. In this example, these objects will be held intact for any
    /// number of years until the event has occurred (event-based hold on the
    /// object is released) and then 3 more years after that. That means retention
    /// duration of the objects begins from the moment event-based hold
    /// transitioned from true to false.  Objects under event-based hold cannot be
    /// deleted, overwritten or archived until the hold is removed.
    #[prost(bool, tag = "14")]
    pub default_event_based_hold: bool,
    /// User-provided labels, in key/value pairs.
    #[prost(btree_map = "string, string", tag = "15")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The bucket's website config, controlling how the service behaves
    /// when accessing bucket contents as a web site. See the
    /// [<https://cloud.google.com/storage/docs/static-website][Static> Website
    /// Examples] for more information.
    #[prost(message, optional, tag = "16")]
    pub website: ::core::option::Option<bucket::Website>,
    /// The bucket's versioning config.
    #[prost(message, optional, tag = "17")]
    pub versioning: ::core::option::Option<bucket::Versioning>,
    /// The bucket's logging config, which defines the destination bucket
    /// and name prefix (if any) for the current bucket's logs.
    #[prost(message, optional, tag = "18")]
    pub logging: ::core::option::Option<bucket::Logging>,
    /// Output only. The owner of the bucket. This is always the project team's
    /// owner group.
    #[prost(message, optional, tag = "19")]
    pub owner: ::core::option::Option<Owner>,
    /// Encryption config for a bucket.
    #[prost(message, optional, tag = "20")]
    pub encryption: ::core::option::Option<bucket::Encryption>,
    /// The bucket's billing config.
    #[prost(message, optional, tag = "21")]
    pub billing: ::core::option::Option<bucket::Billing>,
    /// The bucket's retention policy. The retention policy enforces a minimum
    /// retention time for all objects contained in the bucket, based on their
    /// creation time. Any attempt to overwrite or delete objects younger than the
    /// retention period will result in a PERMISSION_DENIED error.  An unlocked
    /// retention policy can be modified or removed from the bucket via a
    /// storage.buckets.update operation. A locked retention policy cannot be
    /// removed or shortened in duration for the lifetime of the bucket.
    /// Attempting to remove or decrease period of a locked retention policy will
    /// result in a PERMISSION_DENIED error.
    #[prost(message, optional, tag = "22")]
    pub retention_policy: ::core::option::Option<bucket::RetentionPolicy>,
    /// The bucket's IAM config.
    #[prost(message, optional, tag = "23")]
    pub iam_config: ::core::option::Option<bucket::IamConfig>,
    /// Reserved for future use.
    #[prost(bool, tag = "25")]
    pub satisfies_pzs: bool,
    /// Configuration that, if present, specifies the data placement for a
    /// [<https://cloud.google.com/storage/docs/use-dual-regions][Dual> Region].
    #[prost(message, optional, tag = "26")]
    pub custom_placement_config: ::core::option::Option<bucket::CustomPlacementConfig>,
    /// The bucket's Autoclass configuration. If there is no configuration, the
    /// Autoclass feature will be disabled and have no effect on the bucket.
    #[prost(message, optional, tag = "28")]
    pub autoclass: ::core::option::Option<bucket::Autoclass>,
    /// Optional. The bucket's hierarchical namespace configuration. If there is no
    /// configuration, the hierarchical namespace feature will be disabled and have
    /// no effect on the bucket.
    #[prost(message, optional, tag = "32")]
    pub hierarchical_namespace: ::core::option::Option<bucket::HierarchicalNamespace>,
    /// Optional. The bucket's soft delete policy. The soft delete policy prevents
    /// soft-deleted objects from being permanently deleted.
    #[prost(message, optional, tag = "31")]
    pub soft_delete_policy: ::core::option::Option<bucket::SoftDeletePolicy>,
}
/// Nested message and enum types in `Bucket`.
pub mod bucket {
    /// Billing properties of a bucket.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Billing {
        /// When set to true, Requester Pays is enabled for this bucket.
        #[prost(bool, tag = "1")]
        pub requester_pays: bool,
    }
    /// Cross-Origin Response sharing (CORS) properties for a bucket.
    /// For more on Cloud Storage and CORS, see
    /// <https://cloud.google.com/storage/docs/cross-origin.>
    /// For more on CORS in general, see <https://tools.ietf.org/html/rfc6454.>
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Cors {
        /// The list of Origins eligible to receive CORS response headers. See
        /// [<https://tools.ietf.org/html/rfc6454][RFC> 6454] for more on origins.
        /// Note: "*" is permitted in the list of origins, and means "any Origin".
        #[prost(string, repeated, tag = "1")]
        pub origin: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The list of HTTP methods on which to include CORS response headers,
        /// (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
        /// methods, and means "any method".
        #[prost(string, repeated, tag = "2")]
        pub method: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The list of HTTP headers other than the
        /// [<https://www.w3.org/TR/cors/#simple-response-header][simple> response
        /// headers] to give permission for the user-agent to share across domains.
        #[prost(string, repeated, tag = "3")]
        pub response_header: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The value, in seconds, to return in the
        /// [<https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age>
        /// header] used in preflight responses.
        #[prost(int32, tag = "4")]
        pub max_age_seconds: i32,
    }
    /// Encryption properties of a bucket.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Encryption {
        /// The name of the Cloud KMS key that will be used to encrypt objects
        /// inserted into this bucket, if no encryption method is specified.
        #[prost(string, tag = "1")]
        pub default_kms_key: ::prost::alloc::string::String,
    }
    /// Bucket restriction options.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct IamConfig {
        /// Bucket restriction options currently enforced on the bucket.
        #[prost(message, optional, tag = "1")]
        pub uniform_bucket_level_access: ::core::option::Option<
            iam_config::UniformBucketLevelAccess,
        >,
        /// Whether IAM will enforce public access prevention. Valid values are
        /// "enforced" or "inherited".
        #[prost(string, tag = "3")]
        pub public_access_prevention: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `IamConfig`.
    pub mod iam_config {
        /// Settings for Uniform Bucket level access.
        /// See <https://cloud.google.com/storage/docs/uniform-bucket-level-access.>
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct UniformBucketLevelAccess {
            /// If set, access checks only use bucket-level IAM policies or above.
            #[prost(bool, tag = "1")]
            pub enabled: bool,
            /// The deadline time for changing
            /// `iam_config.uniform_bucket_level_access.enabled` from `true` to
            /// `false`. Mutable until the specified deadline is reached, but not
            /// afterward.
            #[prost(message, optional, tag = "2")]
            pub lock_time: ::core::option::Option<::prost_types::Timestamp>,
        }
    }
    /// Lifecycle properties of a bucket.
    /// For more information, see <https://cloud.google.com/storage/docs/lifecycle.>
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Lifecycle {
        /// A lifecycle management rule, which is made of an action to take and the
        /// condition(s) under which the action will be taken.
        #[prost(message, repeated, tag = "1")]
        pub rule: ::prost::alloc::vec::Vec<lifecycle::Rule>,
    }
    /// Nested message and enum types in `Lifecycle`.
    pub mod lifecycle {
        /// A lifecycle Rule, combining an action to take on an object and a
        /// condition which will trigger that action.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Rule {
            /// The action to take.
            #[prost(message, optional, tag = "1")]
            pub action: ::core::option::Option<rule::Action>,
            /// The condition(s) under which the action will be taken.
            #[prost(message, optional, tag = "2")]
            pub condition: ::core::option::Option<rule::Condition>,
        }
        /// Nested message and enum types in `Rule`.
        pub mod rule {
            /// An action to take on an object.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct Action {
                /// Type of the action. Currently, only `Delete`, `SetStorageClass`, and
                /// `AbortIncompleteMultipartUpload` are supported.
                #[prost(string, tag = "1")]
                pub r#type: ::prost::alloc::string::String,
                /// Target storage class. Required iff the type of the action is
                /// SetStorageClass.
                #[prost(string, tag = "2")]
                pub storage_class: ::prost::alloc::string::String,
            }
            /// A condition of an object which triggers some action.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct Condition {
                /// Age of an object (in days). This condition is satisfied when an
                /// object reaches the specified age.
                /// A value of 0 indicates that all objects immediately match this
                /// condition.
                #[prost(int32, optional, tag = "1")]
                pub age_days: ::core::option::Option<i32>,
                /// This condition is satisfied when an object is created before midnight
                /// of the specified date in UTC.
                #[prost(message, optional, tag = "2")]
                pub created_before: ::core::option::Option<
                    super::super::super::super::super::r#type::Date,
                >,
                /// Relevant only for versioned objects. If the value is
                /// `true`, this condition matches live objects; if the value
                /// is `false`, it matches archived objects.
                #[prost(bool, optional, tag = "3")]
                pub is_live: ::core::option::Option<bool>,
                /// Relevant only for versioned objects. If the value is N, this
                /// condition is satisfied when there are at least N versions (including
                /// the live version) newer than this version of the object.
                #[prost(int32, optional, tag = "4")]
                pub num_newer_versions: ::core::option::Option<i32>,
                /// Objects having any of the storage classes specified by this condition
                /// will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
                /// `NEARLINE`, `COLDLINE`, `STANDARD`, and
                /// `DURABLE_REDUCED_AVAILABILITY`.
                #[prost(string, repeated, tag = "5")]
                pub matches_storage_class: ::prost::alloc::vec::Vec<
                    ::prost::alloc::string::String,
                >,
                /// Number of days that have elapsed since the custom timestamp set on an
                /// object.
                /// The value of the field must be a nonnegative integer.
                #[prost(int32, optional, tag = "7")]
                pub days_since_custom_time: ::core::option::Option<i32>,
                /// An object matches this condition if the custom timestamp set on the
                /// object is before the specified date in UTC.
                #[prost(message, optional, tag = "8")]
                pub custom_time_before: ::core::option::Option<
                    super::super::super::super::super::r#type::Date,
                >,
                /// This condition is relevant only for versioned objects. An object
                /// version satisfies this condition only if these many days have been
                /// passed since it became noncurrent. The value of the field must be a
                /// nonnegative integer. If it's zero, the object version will become
                /// eligible for Lifecycle action as soon as it becomes noncurrent.
                #[prost(int32, optional, tag = "9")]
                pub days_since_noncurrent_time: ::core::option::Option<i32>,
                /// This condition is relevant only for versioned objects. An object
                /// version satisfies this condition only if it became noncurrent before
                /// the specified date in UTC.
                #[prost(message, optional, tag = "10")]
                pub noncurrent_time_before: ::core::option::Option<
                    super::super::super::super::super::r#type::Date,
                >,
                /// List of object name prefixes. If any prefix exactly matches the
                /// beginning of the object name, the condition evaluates to true.
                #[prost(string, repeated, tag = "11")]
                pub matches_prefix: ::prost::alloc::vec::Vec<
                    ::prost::alloc::string::String,
                >,
                /// List of object name suffixes. If any suffix exactly matches the
                /// end of the object name, the condition evaluates to true.
                #[prost(string, repeated, tag = "12")]
                pub matches_suffix: ::prost::alloc::vec::Vec<
                    ::prost::alloc::string::String,
                >,
            }
        }
    }
    /// Logging-related properties of a bucket.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Logging {
        /// The destination bucket where the current bucket's logs should be placed,
        /// using path format (like `projects/123456/buckets/foo`).
        #[prost(string, tag = "1")]
        pub log_bucket: ::prost::alloc::string::String,
        /// A prefix for log object names.
        #[prost(string, tag = "2")]
        pub log_object_prefix: ::prost::alloc::string::String,
    }
    /// Retention policy properties of a bucket.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RetentionPolicy {
        /// Server-determined value that indicates the time from which policy was
        /// enforced and effective.
        #[prost(message, optional, tag = "1")]
        pub effective_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Once locked, an object retention policy cannot be modified.
        #[prost(bool, tag = "2")]
        pub is_locked: bool,
        /// The duration that objects need to be retained. Retention duration must be
        /// greater than zero and less than 100 years. Note that enforcement of
        /// retention periods less than a day is not guaranteed. Such periods should
        /// only be used for testing purposes. Any `nanos` value specified will be
        /// rounded down to the nearest second.
        #[prost(message, optional, tag = "4")]
        pub retention_duration: ::core::option::Option<::prost_types::Duration>,
    }
    /// Soft delete policy properties of a bucket.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SoftDeletePolicy {
        /// The period of time that soft-deleted objects in the bucket must be
        /// retained and cannot be permanently deleted. The duration must be greater
        /// than or equal to 7 days and less than 1 year.
        #[prost(message, optional, tag = "1")]
        pub retention_duration: ::core::option::Option<::prost_types::Duration>,
        /// Time from which the policy was effective. This is service-provided.
        #[prost(message, optional, tag = "2")]
        pub effective_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// Properties of a bucket related to versioning.
    /// For more on Cloud Storage versioning, see
    /// <https://cloud.google.com/storage/docs/object-versioning.>
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Versioning {
        /// While set to true, versioning is fully enabled for this bucket.
        #[prost(bool, tag = "1")]
        pub enabled: bool,
    }
    /// Properties of a bucket related to accessing the contents as a static
    /// website. For more on hosting a static website via Cloud Storage, see
    /// <https://cloud.google.com/storage/docs/hosting-static-website.>
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Website {
        /// If the requested object path is missing, the service will ensure the path
        /// has a trailing '/', append this suffix, and attempt to retrieve the
        /// resulting object. This allows the creation of `index.html`
        /// objects to represent directory pages.
        #[prost(string, tag = "1")]
        pub main_page_suffix: ::prost::alloc::string::String,
        /// If the requested object path is missing, and any
        /// `mainPageSuffix` object is missing, if applicable, the service
        /// will return the named object from this bucket as the content for a
        /// [<https://tools.ietf.org/html/rfc7231#section-6.5.4][404> Not Found]
        /// result.
        #[prost(string, tag = "2")]
        pub not_found_page: ::prost::alloc::string::String,
    }
    /// Configuration for Custom Dual Regions.  It should specify precisely two
    /// eligible regions within the same Multiregion. More information on regions
    /// may be found [<https://cloud.google.com/storage/docs/locations][here].>
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CustomPlacementConfig {
        /// List of locations to use for data placement.
        #[prost(string, repeated, tag = "1")]
        pub data_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// Configuration for a bucket's Autoclass feature.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Autoclass {
        /// Enables Autoclass.
        #[prost(bool, tag = "1")]
        pub enabled: bool,
        /// Output only. Latest instant at which the `enabled` field was set to true
        /// after being disabled/unconfigured or set to false after being enabled. If
        /// Autoclass is enabled when the bucket is created, the toggle_time is set
        /// to the bucket creation time.
        #[prost(message, optional, tag = "2")]
        pub toggle_time: ::core::option::Option<::prost_types::Timestamp>,
        /// An object in an Autoclass bucket will eventually cool down to the
        /// terminal storage class if there is no access to the object.
        /// The only valid values are NEARLINE and ARCHIVE.
        #[prost(string, optional, tag = "3")]
        pub terminal_storage_class: ::core::option::Option<
            ::prost::alloc::string::String,
        >,
        /// Output only. Latest instant at which the autoclass terminal storage class
        /// was updated.
        #[prost(message, optional, tag = "4")]
        pub terminal_storage_class_update_time: ::core::option::Option<
            ::prost_types::Timestamp,
        >,
    }
    /// Configuration for a bucket's hierarchical namespace feature.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct HierarchicalNamespace {
        /// Optional. Enables the hierarchical namespace feature.
        #[prost(bool, tag = "1")]
        pub enabled: bool,
    }
}
/// An access-control entry.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BucketAccessControl {
    /// The access permission for the entity.
    #[prost(string, tag = "1")]
    pub role: ::prost::alloc::string::String,
    /// The ID of the access-control entry.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    /// The entity holding the permission, in one of the following forms:
    /// * `user-{userid}`
    /// * `user-{email}`
    /// * `group-{groupid}`
    /// * `group-{email}`
    /// * `domain-{domain}`
    /// * `project-{team}-{projectnumber}`
    /// * `project-{team}-{projectid}`
    /// * `allUsers`
    /// * `allAuthenticatedUsers`
    /// Examples:
    /// * The user `liz@example.com` would be `user-liz@example.com`.
    /// * The group `example@googlegroups.com` would be
    /// `group-example@googlegroups.com`
    /// * All members of the Google Apps for Business domain `example.com` would be
    /// `domain-example.com`
    /// For project entities, `project-{team}-{projectnumber}` format will be
    /// returned on response.
    #[prost(string, tag = "3")]
    pub entity: ::prost::alloc::string::String,
    /// Output only. The alternative entity format, if exists. For project
    /// entities, `project-{team}-{projectid}` format will be returned on response.
    #[prost(string, tag = "9")]
    pub entity_alt: ::prost::alloc::string::String,
    /// The ID for the entity, if any.
    #[prost(string, tag = "4")]
    pub entity_id: ::prost::alloc::string::String,
    /// The etag of the BucketAccessControl.
    /// If included in the metadata of an update or delete request message, the
    /// operation operation will only be performed if the etag matches that of the
    /// bucket's BucketAccessControl.
    #[prost(string, tag = "8")]
    pub etag: ::prost::alloc::string::String,
    /// The email address associated with the entity, if any.
    #[prost(string, tag = "5")]
    pub email: ::prost::alloc::string::String,
    /// The domain associated with the entity, if any.
    #[prost(string, tag = "6")]
    pub domain: ::prost::alloc::string::String,
    /// The project team associated with the entity, if any.
    #[prost(message, optional, tag = "7")]
    pub project_team: ::core::option::Option<ProjectTeam>,
}
/// Message used to convey content being read or written, along with an optional
/// checksum.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChecksummedData {
    /// Optional. The data.
    #[prost(bytes = "bytes", tag = "1")]
    pub content: ::prost::bytes::Bytes,
    /// If set, the CRC32C digest of the content field.
    #[prost(fixed32, optional, tag = "2")]
    pub crc32c: ::core::option::Option<u32>,
}
/// Message used for storing full (not subrange) object checksums.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectChecksums {
    /// CRC32C digest of the object data. Computed by the Cloud Storage service for
    /// all written objects.
    /// If set in a WriteObjectRequest, service will validate that the stored
    /// object matches this checksum.
    #[prost(fixed32, optional, tag = "1")]
    pub crc32c: ::core::option::Option<u32>,
    /// 128 bit MD5 hash of the object data.
    /// For more information about using the MD5 hash, see
    /// [<https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes> and
    /// ETags: Best Practices].
    /// Not all objects will provide an MD5 hash. For example, composite objects
    /// provide only crc32c hashes.
    /// This value is equivalent to running `cat object.txt | openssl md5 -binary`
    #[prost(bytes = "bytes", tag = "2")]
    pub md5_hash: ::prost::bytes::Bytes,
}
/// Hmac Key Metadata, which includes all information other than the secret.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HmacKeyMetadata {
    /// Immutable. Resource name ID of the key in the format
    /// {projectIdentifier}/{accessId}.
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Immutable. Globally unique id for keys.
    #[prost(string, tag = "2")]
    pub access_id: ::prost::alloc::string::String,
    /// Immutable. Identifies the project that owns the service account of the
    /// specified HMAC key, in the format "projects/{projectIdentifier}".
    /// {projectIdentifier} can be the project ID or project number.
    #[prost(string, tag = "3")]
    pub project: ::prost::alloc::string::String,
    /// Output only. Email of the service account the key authenticates as.
    #[prost(string, tag = "4")]
    pub service_account_email: ::prost::alloc::string::String,
    /// State of the key. One of ACTIVE, INACTIVE, or DELETED.
    /// Writable, can be updated by UpdateHmacKey operation.
    #[prost(string, tag = "5")]
    pub state: ::prost::alloc::string::String,
    /// Output only. The creation time of the HMAC key.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The last modification time of the HMAC key metadata.
    #[prost(message, optional, tag = "7")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The etag of the HMAC key.
    #[prost(string, tag = "8")]
    pub etag: ::prost::alloc::string::String,
}
/// A directive to publish Pub/Sub notifications upon changes to a bucket.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotificationConfig {
    /// Required. The resource name of this NotificationConfig.
    /// Format:
    /// `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
    /// The `{project}` portion may be `_` for globally unique buckets.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The Pub/Sub topic to which this subscription publishes. Formatted
    /// as:
    /// '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    #[prost(string, tag = "2")]
    pub topic: ::prost::alloc::string::String,
    /// The etag of the NotificationConfig.
    /// If included in the metadata of GetNotificationConfigRequest, the operation
    /// will only be performed if the etag matches that of the NotificationConfig.
    #[prost(string, tag = "7")]
    pub etag: ::prost::alloc::string::String,
    /// If present, only send notifications about listed event types. If
    /// empty, sent notifications for all event types.
    #[prost(string, repeated, tag = "3")]
    pub event_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A list of additional attributes to attach to each Pub/Sub
    /// message published for this NotificationConfig.
    #[prost(btree_map = "string, string", tag = "4")]
    pub custom_attributes: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// If present, only apply this NotificationConfig to object names that
    /// begin with this prefix.
    #[prost(string, tag = "5")]
    pub object_name_prefix: ::prost::alloc::string::String,
    /// Required. The desired content of the Payload.
    #[prost(string, tag = "6")]
    pub payload_format: ::prost::alloc::string::String,
}
/// Describes the Customer-Supplied Encryption Key mechanism used to store an
/// Object's data at rest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerEncryption {
    /// The encryption algorithm.
    #[prost(string, tag = "1")]
    pub encryption_algorithm: ::prost::alloc::string::String,
    /// SHA256 hash value of the encryption key.
    /// In raw bytes format (not base64-encoded).
    #[prost(bytes = "bytes", tag = "3")]
    pub key_sha256_bytes: ::prost::bytes::Bytes,
}
/// An object.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Object {
    /// Immutable. The name of this object. Nearly any sequence of unicode
    /// characters is valid. See
    /// [Guidelines](<https://cloud.google.com/storage/docs/objects#naming>).
    /// Example: `test.txt`
    /// The `name` field by itself does not uniquely identify a Cloud Storage
    /// object. A Cloud Storage object is uniquely identified by the tuple of
    /// (bucket, object, generation).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Immutable. The name of the bucket containing this object.
    #[prost(string, tag = "2")]
    pub bucket: ::prost::alloc::string::String,
    /// The etag of the object.
    /// If included in the metadata of an update or delete request message, the
    /// operation will only be performed if the etag matches that of the live
    /// object.
    #[prost(string, tag = "27")]
    pub etag: ::prost::alloc::string::String,
    /// Immutable. The content generation of this object. Used for object
    /// versioning.
    #[prost(int64, tag = "3")]
    pub generation: i64,
    /// Output only. The version of the metadata for this generation of this
    /// object. Used for preconditions and for detecting changes in metadata. A
    /// metageneration number is only meaningful in the context of a particular
    /// generation of a particular object.
    #[prost(int64, tag = "4")]
    pub metageneration: i64,
    /// Storage class of the object.
    #[prost(string, tag = "5")]
    pub storage_class: ::prost::alloc::string::String,
    /// Output only. Content-Length of the object data in bytes, matching
    /// [<https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC> 7230 §3.3.2].
    #[prost(int64, tag = "6")]
    pub size: i64,
    /// Content-Encoding of the object data, matching
    /// [<https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC> 7231 §3.1.2.2]
    #[prost(string, tag = "7")]
    pub content_encoding: ::prost::alloc::string::String,
    /// Content-Disposition of the object data, matching
    /// [<https://tools.ietf.org/html/rfc6266][RFC> 6266].
    #[prost(string, tag = "8")]
    pub content_disposition: ::prost::alloc::string::String,
    /// Cache-Control directive for the object data, matching
    /// [<https://tools.ietf.org/html/rfc7234#section-5.2"][RFC> 7234 §5.2].
    /// If omitted, and the object is accessible to all anonymous users, the
    /// default will be `public, max-age=3600`.
    #[prost(string, tag = "9")]
    pub cache_control: ::prost::alloc::string::String,
    /// Access controls on the object.
    /// If iam_config.uniform_bucket_level_access is enabled on the parent
    /// bucket, requests to set, read, or modify acl is an error.
    #[prost(message, repeated, tag = "10")]
    pub acl: ::prost::alloc::vec::Vec<ObjectAccessControl>,
    /// Content-Language of the object data, matching
    /// [<https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC> 7231 §3.1.3.2].
    #[prost(string, tag = "11")]
    pub content_language: ::prost::alloc::string::String,
    /// Output only. If this object is noncurrent, this is the time when the object
    /// became noncurrent.
    #[prost(message, optional, tag = "12")]
    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Content-Type of the object data, matching
    /// [<https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC> 7231 §3.1.1.5].
    /// If an object is stored without a Content-Type, it is served as
    /// `application/octet-stream`.
    #[prost(string, tag = "13")]
    pub content_type: ::prost::alloc::string::String,
    /// Output only. The creation time of the object.
    #[prost(message, optional, tag = "14")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Number of underlying components that make up this object.
    /// Components are accumulated by compose operations.
    #[prost(int32, tag = "15")]
    pub component_count: i32,
    /// Output only. Hashes for the data part of this object. This field is used
    /// for output only and will be silently ignored if provided in requests.
    #[prost(message, optional, tag = "16")]
    pub checksums: ::core::option::Option<ObjectChecksums>,
    /// Output only. The modification time of the object metadata.
    /// Set initially to object creation time and then updated whenever any
    /// metadata of the object changes. This includes changes made by a requester,
    /// such as modifying custom metadata, as well as changes made by Cloud Storage
    /// on behalf of a requester, such as changing the storage class based on an
    /// Object Lifecycle Configuration.
    #[prost(message, optional, tag = "17")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Cloud KMS Key used to encrypt this object, if the object is encrypted by
    /// such a key.
    #[prost(string, tag = "18")]
    pub kms_key: ::prost::alloc::string::String,
    /// Output only. The time at which the object's storage class was last changed.
    /// When the object is initially created, it will be set to time_created.
    #[prost(message, optional, tag = "19")]
    pub update_storage_class_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Whether an object is under temporary hold. While this flag is set to true,
    /// the object is protected against deletion and overwrites.  A common use case
    /// of this flag is regulatory investigations where objects need to be retained
    /// while the investigation is ongoing. Note that unlike event-based hold,
    /// temporary hold does not impact retention expiration time of an object.
    #[prost(bool, tag = "20")]
    pub temporary_hold: bool,
    /// A server-determined value that specifies the earliest time that the
    /// object's retention period expires.
    /// Note 1: This field is not provided for objects with an active event-based
    /// hold, since retention expiration is unknown until the hold is removed.
    /// Note 2: This value can be provided even when temporary hold is set (so that
    /// the user can reason about policy without having to first unset the
    /// temporary hold).
    #[prost(message, optional, tag = "21")]
    pub retention_expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-provided metadata, in key/value pairs.
    #[prost(btree_map = "string, string", tag = "22")]
    pub metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Whether an object is under event-based hold.
    /// An event-based hold is a way to force the retention of an object until
    /// after some event occurs. Once the hold is released by explicitly setting
    /// this field to false, the object will become subject to any bucket-level
    /// retention policy, except that the retention duration will be calculated
    /// from the time the event based hold was lifted, rather than the time the
    /// object was created.
    ///
    /// In a WriteObject request, not setting this field implies that the value
    /// should be taken from the parent bucket's "default_event_based_hold" field.
    /// In a response, this field will always be set to true or false.
    #[prost(bool, optional, tag = "23")]
    pub event_based_hold: ::core::option::Option<bool>,
    /// Output only. The owner of the object. This will always be the uploader of
    /// the object.
    #[prost(message, optional, tag = "24")]
    pub owner: ::core::option::Option<Owner>,
    /// Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
    /// such a key.
    #[prost(message, optional, tag = "25")]
    pub customer_encryption: ::core::option::Option<CustomerEncryption>,
    /// A user-specified timestamp set on an object.
    #[prost(message, optional, tag = "26")]
    pub custom_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. This is the time when the object became soft-deleted.
    ///
    /// Soft-deleted objects are only accessible if a soft_delete_policy is
    /// enabled. Also see hard_delete_time.
    #[prost(message, optional, tag = "28")]
    pub soft_delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the object will be permanently deleted.
    ///
    /// Only set when an object becomes soft-deleted with a soft_delete_policy.
    /// Otherwise, the object will not be accessible.
    #[prost(message, optional, tag = "29")]
    pub hard_delete_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// An access-control entry.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectAccessControl {
    /// The access permission for the entity.
    #[prost(string, tag = "1")]
    pub role: ::prost::alloc::string::String,
    /// The ID of the access-control entry.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    /// The entity holding the permission, in one of the following forms:
    /// * `user-{userid}`
    /// * `user-{email}`
    /// * `group-{groupid}`
    /// * `group-{email}`
    /// * `domain-{domain}`
    /// * `project-{team}-{projectnumber}`
    /// * `project-{team}-{projectid}`
    /// * `allUsers`
    /// * `allAuthenticatedUsers`
    /// Examples:
    /// * The user `liz@example.com` would be `user-liz@example.com`.
    /// * The group `example@googlegroups.com` would be
    /// `group-example@googlegroups.com`.
    /// * All members of the Google Apps for Business domain `example.com` would be
    /// `domain-example.com`.
    /// For project entities, `project-{team}-{projectnumber}` format will be
    /// returned on response.
    #[prost(string, tag = "3")]
    pub entity: ::prost::alloc::string::String,
    /// Output only. The alternative entity format, if exists. For project
    /// entities, `project-{team}-{projectid}` format will be returned on response.
    #[prost(string, tag = "9")]
    pub entity_alt: ::prost::alloc::string::String,
    /// The ID for the entity, if any.
    #[prost(string, tag = "4")]
    pub entity_id: ::prost::alloc::string::String,
    /// The etag of the ObjectAccessControl.
    /// If included in the metadata of an update or delete request message, the
    /// operation will only be performed if the etag matches that of the live
    /// object's ObjectAccessControl.
    #[prost(string, tag = "8")]
    pub etag: ::prost::alloc::string::String,
    /// The email address associated with the entity, if any.
    #[prost(string, tag = "5")]
    pub email: ::prost::alloc::string::String,
    /// The domain associated with the entity, if any.
    #[prost(string, tag = "6")]
    pub domain: ::prost::alloc::string::String,
    /// The project team associated with the entity, if any.
    #[prost(message, optional, tag = "7")]
    pub project_team: ::core::option::Option<ProjectTeam>,
}
/// The result of a call to Objects.ListObjects
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListObjectsResponse {
    /// The list of items.
    #[prost(message, repeated, tag = "1")]
    pub objects: ::prost::alloc::vec::Vec<Object>,
    /// The list of prefixes of objects matching-but-not-listed up to and including
    /// the requested delimiter.
    #[prost(string, repeated, tag = "2")]
    pub prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The continuation token, used to page through large result sets. Provide
    /// this value in a subsequent request to return the next page of results.
    #[prost(string, tag = "3")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Represents the Viewers, Editors, or Owners of a given project.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectTeam {
    /// The project number.
    #[prost(string, tag = "1")]
    pub project_number: ::prost::alloc::string::String,
    /// The team.
    #[prost(string, tag = "2")]
    pub team: ::prost::alloc::string::String,
}
/// A service account, owned by Cloud Storage, which may be used when taking
/// action on behalf of a given project, for example to publish Pub/Sub
/// notifications or to retrieve security keys.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceAccount {
    /// The ID of the notification.
    #[prost(string, tag = "1")]
    pub email_address: ::prost::alloc::string::String,
}
/// The owner of a specific resource.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Owner {
    /// The entity, in the form `user-`*userId*.
    #[prost(string, tag = "1")]
    pub entity: ::prost::alloc::string::String,
    /// The ID for the entity.
    #[prost(string, tag = "2")]
    pub entity_id: ::prost::alloc::string::String,
}
/// Specifies a requested range of bytes to download.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContentRange {
    /// The starting offset of the object data. This value is inclusive.
    #[prost(int64, tag = "1")]
    pub start: i64,
    /// The ending offset of the object data. This value is exclusive.
    #[prost(int64, tag = "2")]
    pub end: i64,
    /// The complete length of the object data.
    #[prost(int64, tag = "3")]
    pub complete_length: i64,
}
/// Generated client implementations.
pub mod storage_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// ## API Overview and Naming Syntax
    ///
    /// The Cloud Storage gRPC API allows applications to read and write data through
    /// the abstractions of buckets and objects. For a description of these
    /// abstractions please see https://cloud.google.com/storage/docs.
    ///
    /// Resources are named as follows:
    ///   - Projects are referred to as they are defined by the Resource Manager API,
    ///     using strings like `projects/123456` or `projects/my-string-id`.
    ///   - Buckets are named using string names of the form:
    ///     `projects/{project}/buckets/{bucket}`
    ///     For globally unique buckets, `_` may be substituted for the project.
    ///   - Objects are uniquely identified by their name along with the name of the
    ///     bucket they belong to, as separate strings in this API. For example:
    ///
    ///       ReadObjectRequest {
    ///         bucket: 'projects/_/buckets/my-bucket'
    ///         object: 'my-object'
    ///       }
    ///     Note that object names can contain `/` characters, which are treated as
    ///     any other character (no special directory semantics).
    #[derive(Debug, Clone)]
    pub struct StorageClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> StorageClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> StorageClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            StorageClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Permanently deletes an empty bucket.
        pub async fn delete_bucket(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteBucketRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/DeleteBucket",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "DeleteBucket"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns metadata for the specified bucket.
        pub async fn get_bucket(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBucketRequest>,
        ) -> std::result::Result<tonic::Response<super::Bucket>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetBucket",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "GetBucket"));
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new bucket.
        pub async fn create_bucket(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateBucketRequest>,
        ) -> std::result::Result<tonic::Response<super::Bucket>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/CreateBucket",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "CreateBucket"));
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of buckets for a given project.
        pub async fn list_buckets(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBucketsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBucketsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ListBuckets",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "ListBuckets"));
            self.inner.unary(req, path, codec).await
        }
        /// Locks retention policy on a bucket.
        pub async fn lock_bucket_retention_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::LockBucketRetentionPolicyRequest>,
        ) -> std::result::Result<tonic::Response<super::Bucket>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/LockBucketRetentionPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.v2.Storage",
                        "LockBucketRetentionPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the IAM policy for a specified bucket.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}`.
        pub async fn get_iam_policy(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::iam::v1::GetIamPolicyRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::iam::v1::Policy>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetIamPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "GetIamPolicy"));
            self.inner.unary(req, path, codec).await
        }
        /// Updates an IAM policy for the specified bucket.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}`.
        pub async fn set_iam_policy(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::iam::v1::SetIamPolicyRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::iam::v1::Policy>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/SetIamPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "SetIamPolicy"));
            self.inner.unary(req, path, codec).await
        }
        /// Tests a set of permissions on the given bucket or object to see which, if
        /// any, are held by the caller.
        /// The `resource` field in the request should be
        /// `projects/_/buckets/{bucket}` for a bucket or
        /// `projects/_/buckets/{bucket}/objects/{object}` for an object.
        pub async fn test_iam_permissions(
            &mut self,
            request: impl tonic::IntoRequest<
                super::super::super::iam::v1::TestIamPermissionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::iam::v1::TestIamPermissionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/TestIamPermissions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "TestIamPermissions"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a bucket. Equivalent to JSON API's storage.buckets.patch method.
        pub async fn update_bucket(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateBucketRequest>,
        ) -> std::result::Result<tonic::Response<super::Bucket>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/UpdateBucket",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "UpdateBucket"));
            self.inner.unary(req, path, codec).await
        }
        /// Permanently deletes a NotificationConfig.
        pub async fn delete_notification_config(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteNotificationConfigRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/DeleteNotificationConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.v2.Storage",
                        "DeleteNotificationConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// View a NotificationConfig.
        pub async fn get_notification_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetNotificationConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotificationConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetNotificationConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "GetNotificationConfig"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a NotificationConfig for a given bucket.
        /// These NotificationConfigs, when triggered, publish messages to the
        /// specified Pub/Sub topics. See
        /// https://cloud.google.com/storage/docs/pubsub-notifications.
        pub async fn create_notification_config(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateNotificationConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotificationConfig>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/CreateNotificationConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.v2.Storage",
                        "CreateNotificationConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of NotificationConfigs for a given bucket.
        pub async fn list_notification_configs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListNotificationConfigsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListNotificationConfigsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ListNotificationConfigs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.storage.v2.Storage",
                        "ListNotificationConfigs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Concatenates a list of existing objects into a new object in the same
        /// bucket.
        pub async fn compose_object(
            &mut self,
            request: impl tonic::IntoRequest<super::ComposeObjectRequest>,
        ) -> std::result::Result<tonic::Response<super::Object>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ComposeObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "ComposeObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Deletes an object and its metadata.
        ///
        /// Deletions are normally permanent when versioning is disabled or whenever
        /// the generation parameter is used. However, if soft delete is enabled for
        /// the bucket, deleted objects can be restored using RestoreObject until the
        /// soft delete retention period has passed.
        pub async fn delete_object(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteObjectRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/DeleteObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "DeleteObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Restores a soft-deleted object.
        pub async fn restore_object(
            &mut self,
            request: impl tonic::IntoRequest<super::RestoreObjectRequest>,
        ) -> std::result::Result<tonic::Response<super::Object>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/RestoreObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "RestoreObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Cancels an in-progress resumable upload.
        ///
        /// Any attempts to write to the resumable upload after cancelling the upload
        /// will fail.
        ///
        /// The behavior for currently in progress write operations is not guaranteed -
        /// they could either complete before the cancellation or fail if the
        /// cancellation completes first.
        pub async fn cancel_resumable_write(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelResumableWriteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CancelResumableWriteResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/CancelResumableWrite",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "CancelResumableWrite"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves an object's metadata.
        pub async fn get_object(
            &mut self,
            request: impl tonic::IntoRequest<super::GetObjectRequest>,
        ) -> std::result::Result<tonic::Response<super::Object>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "GetObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Reads an object's data.
        pub async fn read_object(
            &mut self,
            request: impl tonic::IntoRequest<super::ReadObjectRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::ReadObjectResponse>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ReadObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "ReadObject"));
            self.inner.server_streaming(req, path, codec).await
        }
        /// Updates an object's metadata.
        /// Equivalent to JSON API's storage.objects.patch.
        pub async fn update_object(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateObjectRequest>,
        ) -> std::result::Result<tonic::Response<super::Object>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/UpdateObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "UpdateObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Stores a new object and metadata.
        ///
        /// An object can be written either in a single message stream or in a
        /// resumable sequence of message streams. To write using a single stream,
        /// the client should include in the first message of the stream an
        /// `WriteObjectSpec` describing the destination bucket, object, and any
        /// preconditions. Additionally, the final message must set 'finish_write' to
        /// true, or else it is an error.
        ///
        /// For a resumable write, the client should instead call
        /// `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
        /// They should then attach the returned `upload_id` to the first message of
        /// each following call to `WriteObject`. If the stream is closed before
        /// finishing the upload (either explicitly by the client or due to a network
        /// error or an error response from the server), the client should do as
        /// follows:
        ///   - Check the result Status of the stream, to determine if writing can be
        ///     resumed on this stream or must be restarted from scratch (by calling
        ///     `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED,
        ///     INTERNAL, and UNAVAILABLE. For each case, the client should use binary
        ///     exponential backoff before retrying.  Additionally, writes can be
        ///     resumed after RESOURCE_EXHAUSTED errors, but only after taking
        ///     appropriate measures, which may include reducing aggregate send rate
        ///     across clients and/or requesting a quota increase for your project.
        ///   - If the call to `WriteObject` returns `ABORTED`, that indicates
        ///     concurrent attempts to update the resumable write, caused either by
        ///     multiple racing clients or by a single client where the previous
        ///     request was timed out on the client side but nonetheless reached the
        ///     server. In this case the client should take steps to prevent further
        ///     concurrent writes (e.g., increase the timeouts, stop using more than
        ///     one process to perform the upload, etc.), and then should follow the
        ///     steps below for resuming the upload.
        ///   - For resumable errors, the client should call `QueryWriteStatus()` and
        ///     then continue writing from the returned `persisted_size`. This may be
        ///     less than the amount of data the client previously sent. Note also that
        ///     it is acceptable to send data starting at an offset earlier than the
        ///     returned `persisted_size`; in this case, the service will skip data at
        ///     offsets that were already persisted (without checking that it matches
        ///     the previously written data), and write only the data starting from the
        ///     persisted offset. Even though the data isn't written, it may still
        ///     incur a performance cost over resuming at the correct write offset.
        ///     This behavior can make client-side handling simpler in some cases.
        ///   - Clients must only send data that is a multiple of 256 KiB per message,
        ///     unless the object is being finished with `finish_write` set to `true`.
        ///
        /// The service will not view the object as complete until the client has
        /// sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
        /// requests on a stream after sending a request with `finish_write` set to
        /// `true` will cause an error. The client **should** check the response it
        /// receives to determine how much data the service was able to commit and
        /// whether the service views the object as complete.
        ///
        /// Attempting to resume an already finalized object will result in an OK
        /// status, with a WriteObjectResponse containing the finalized object's
        /// metadata.
        ///
        /// Alternatively, the BidiWriteObject operation may be used to write an
        /// object with controls over flushing and the ability to fetch the ability to
        /// determine the current persisted size.
        pub async fn write_object(
            &mut self,
            request: impl tonic::IntoStreamingRequest<
                Message = super::WriteObjectRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::WriteObjectResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/WriteObject",
            );
            let mut req = request.into_streaming_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "WriteObject"));
            self.inner.client_streaming(req, path, codec).await
        }
        /// Stores a new object and metadata.
        ///
        /// This is similar to the WriteObject call with the added support for
        /// manual flushing of persisted state, and the ability to determine current
        /// persisted size without closing the stream.
        ///
        /// The client may specify one or both of the `state_lookup` and `flush` fields
        /// in each BidiWriteObjectRequest. If `flush` is specified, the data written
        /// so far will be persisted to storage. If `state_lookup` is specified, the
        /// service will respond with a BidiWriteObjectResponse that contains the
        /// persisted size. If both `flush` and `state_lookup` are specified, the flush
        /// will always occur before a `state_lookup`, so that both may be set in the
        /// same request and the returned state will be the state of the object
        /// post-flush. When the stream is closed, a BidiWriteObjectResponse will
        /// always be sent to the client, regardless of the value of `state_lookup`.
        pub async fn bidi_write_object(
            &mut self,
            request: impl tonic::IntoStreamingRequest<
                Message = super::BidiWriteObjectRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::BidiWriteObjectResponse>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/BidiWriteObject",
            );
            let mut req = request.into_streaming_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "BidiWriteObject"));
            self.inner.streaming(req, path, codec).await
        }
        /// Retrieves a list of objects matching the criteria.
        pub async fn list_objects(
            &mut self,
            request: impl tonic::IntoRequest<super::ListObjectsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListObjectsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ListObjects",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "ListObjects"));
            self.inner.unary(req, path, codec).await
        }
        /// Rewrites a source object to a destination object. Optionally overrides
        /// metadata.
        pub async fn rewrite_object(
            &mut self,
            request: impl tonic::IntoRequest<super::RewriteObjectRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RewriteResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/RewriteObject",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "RewriteObject"));
            self.inner.unary(req, path, codec).await
        }
        /// Starts a resumable write. How long the write operation remains valid, and
        /// what happens when the write operation becomes invalid, are
        /// service-dependent.
        pub async fn start_resumable_write(
            &mut self,
            request: impl tonic::IntoRequest<super::StartResumableWriteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::StartResumableWriteResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/StartResumableWrite",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "StartResumableWrite"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Determines the `persisted_size` for an object that is being written, which
        /// can then be used as the `write_offset` for the next `Write()` call.
        ///
        /// If the object does not exist (i.e., the object has been deleted, or the
        /// first `Write()` has not yet reached the service), this method returns the
        /// error `NOT_FOUND`.
        ///
        /// The client **may** call `QueryWriteStatus()` at any time to determine how
        /// much data has been processed for this object. This is useful if the
        /// client is buffering data and needs to know which data can be safely
        /// evicted. For any sequence of `QueryWriteStatus()` calls for a given
        /// object name, the sequence of returned `persisted_size` values will be
        /// non-decreasing.
        pub async fn query_write_status(
            &mut self,
            request: impl tonic::IntoRequest<super::QueryWriteStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<super::QueryWriteStatusResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/QueryWriteStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "QueryWriteStatus"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the name of a project's Google Cloud Storage service account.
        pub async fn get_service_account(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceAccountRequest>,
        ) -> std::result::Result<tonic::Response<super::ServiceAccount>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetServiceAccount",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.storage.v2.Storage", "GetServiceAccount"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new HMAC key for the given service account.
        pub async fn create_hmac_key(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateHmacKeyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateHmacKeyResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/CreateHmacKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "CreateHmacKey"));
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a given HMAC key.  Key must be in an INACTIVE state.
        pub async fn delete_hmac_key(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteHmacKeyRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/DeleteHmacKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "DeleteHmacKey"));
            self.inner.unary(req, path, codec).await
        }
        /// Gets an existing HMAC key metadata for the given id.
        pub async fn get_hmac_key(
            &mut self,
            request: impl tonic::IntoRequest<super::GetHmacKeyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::HmacKeyMetadata>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/GetHmacKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "GetHmacKey"));
            self.inner.unary(req, path, codec).await
        }
        /// Lists HMAC keys under a given project with the additional filters provided.
        pub async fn list_hmac_keys(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHmacKeysRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHmacKeysResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/ListHmacKeys",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "ListHmacKeys"));
            self.inner.unary(req, path, codec).await
        }
        /// Updates a given HMAC key state between ACTIVE and INACTIVE.
        pub async fn update_hmac_key(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateHmacKeyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::HmacKeyMetadata>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.storage.v2.Storage/UpdateHmacKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.storage.v2.Storage", "UpdateHmacKey"));
            self.inner.unary(req, path, codec).await
        }
    }
}