googleapis_tonic_google_chat_v1/vec_u8_hash_map/
google.chat.v1.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
// This file is @generated by prost-build.
/// Represents the status for a request to either invoke or submit a
/// [dialog](<https://developers.google.com/workspace/chat/dialogs>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionStatus {
    /// The status code.
    #[prost(enumeration = "super::super::rpc::Code", tag = "1")]
    pub status_code: i32,
    /// The message to send users about the status of their request.
    /// If unset, a generic message based on the `status_code` is sent.
    #[prost(string, tag = "2")]
    pub user_facing_message: ::prost::alloc::string::String,
}
/// An attachment in Google Chat.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attachment {
    /// Optional. Resource name of the attachment, in the form
    /// `spaces/{space}/messages/{message}/attachments/{attachment}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The original file name for the content, not the full path.
    #[prost(string, tag = "2")]
    pub content_name: ::prost::alloc::string::String,
    /// Output only. The content type (MIME type) of the file.
    #[prost(string, tag = "3")]
    pub content_type: ::prost::alloc::string::String,
    /// Output only. The thumbnail URL which should be used to preview the
    /// attachment to a human user. Chat apps shouldn't use this URL to download
    /// attachment content.
    #[prost(string, tag = "5")]
    pub thumbnail_uri: ::prost::alloc::string::String,
    /// Output only. The download URL which should be used to allow a human user to
    /// download the attachment. Chat apps shouldn't use this URL to download
    /// attachment content.
    #[prost(string, tag = "6")]
    pub download_uri: ::prost::alloc::string::String,
    /// Output only. The source of the attachment.
    #[prost(enumeration = "attachment::Source", tag = "9")]
    pub source: i32,
    /// The data reference to the attachment.
    #[prost(oneof = "attachment::DataRef", tags = "4, 7")]
    pub data_ref: ::core::option::Option<attachment::DataRef>,
}
/// Nested message and enum types in `Attachment`.
pub mod attachment {
    /// The source of the attachment.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Source {
        /// Reserved.
        Unspecified = 0,
        /// The file is a Google Drive file.
        DriveFile = 1,
        /// The file is uploaded to Chat.
        UploadedContent = 2,
    }
    impl Source {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "SOURCE_UNSPECIFIED",
                Self::DriveFile => "DRIVE_FILE",
                Self::UploadedContent => "UPLOADED_CONTENT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
                "DRIVE_FILE" => Some(Self::DriveFile),
                "UPLOADED_CONTENT" => Some(Self::UploadedContent),
                _ => None,
            }
        }
    }
    /// The data reference to the attachment.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DataRef {
        /// Optional. A reference to the attachment data. This field is used to
        /// create or update messages with attachments, or with the media API to
        /// download the attachment data.
        #[prost(message, tag = "4")]
        AttachmentDataRef(super::AttachmentDataRef),
        /// Output only. A reference to the Google Drive attachment. This field is
        /// used with the Google Drive API.
        #[prost(message, tag = "7")]
        DriveDataRef(super::DriveDataRef),
    }
}
/// A reference to the data of a drive attachment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveDataRef {
    /// The ID for the drive file. Use with the Drive API.
    #[prost(string, tag = "2")]
    pub drive_file_id: ::prost::alloc::string::String,
}
/// A reference to the attachment data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttachmentDataRef {
    /// Optional. The resource name of the attachment data. This field is used with
    /// the media API to download the attachment data.
    #[prost(string, tag = "1")]
    pub resource_name: ::prost::alloc::string::String,
    /// Optional. Opaque token containing a reference to an uploaded attachment.
    /// Treated by clients as an opaque string and used to create or update Chat
    /// messages with attachments.
    #[prost(string, tag = "2")]
    pub attachment_upload_token: ::prost::alloc::string::String,
}
/// Request to get an attachment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAttachmentRequest {
    /// Required. Resource name of the attachment, in the form
    /// `spaces/{space}/messages/{message}/attachments/{attachment}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request to upload an attachment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadAttachmentRequest {
    /// Required. Resource name of the Chat space in which the attachment is
    /// uploaded. Format "spaces/{space}".
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The filename of the attachment, including the file extension.
    #[prost(string, tag = "4")]
    pub filename: ::prost::alloc::string::String,
}
/// Response of uploading an attachment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadAttachmentResponse {
    /// Reference to the uploaded attachment.
    #[prost(message, optional, tag = "1")]
    pub attachment_data_ref: ::core::option::Option<AttachmentDataRef>,
}
/// A user in Google Chat.
/// When returned as an output from a request, if your Chat app [authenticates as
/// a
/// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
/// the output for a `User` resource only populates the user's `name` and `type`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
    /// Resource name for a Google Chat [user][google.chat.v1.User].
    ///
    /// Format: `users/{user}`. `users/app` can be used as an alias for the calling
    /// app [bot][google.chat.v1.User.Type.BOT] user.
    ///
    /// For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same
    /// user identifier as:
    ///
    /// - the `id` for the
    /// [Person](<https://developers.google.com/people/api/rest/v1/people>) in the
    /// People API. For example, `users/123456789` in Chat API represents the same
    /// person as the `123456789` Person profile ID in People API.
    ///
    /// - the `id` for a
    /// [user](<https://developers.google.com/admin-sdk/directory/reference/rest/v1/users>)
    /// in the Admin SDK Directory API.
    ///
    /// - the user's email address can be used as an alias for `{user}` in API
    /// requests. For example, if the People API Person profile ID for
    /// `user@example.com` is `123456789`, you can use `users/user@example.com` as
    /// an alias to reference `users/123456789`. Only the canonical resource name
    /// (for example `users/123456789`) will be returned from the API.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The user's display name.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Unique identifier of the user's Google Workspace domain.
    #[prost(string, tag = "6")]
    pub domain_id: ::prost::alloc::string::String,
    /// User type.
    #[prost(enumeration = "user::Type", tag = "5")]
    pub r#type: i32,
    /// Output only. When `true`, the user is deleted or their profile is not
    /// visible.
    #[prost(bool, tag = "7")]
    pub is_anonymous: bool,
}
/// Nested message and enum types in `User`.
pub mod user {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Default value for the enum. DO NOT USE.
        Unspecified = 0,
        /// Human user.
        Human = 1,
        /// Chat app user.
        Bot = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Human => "HUMAN",
                Self::Bot => "BOT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "HUMAN" => Some(Self::Human),
                "BOT" => Some(Self::Bot),
                _ => None,
            }
        }
    }
}
/// Output only. Annotations associated with the plain-text body of the message.
/// To add basic formatting to a text message, see
/// [Format text
/// messages](<https://developers.google.com/workspace/chat/format-messages>).
///
/// Example plain-text message body:
/// ```
/// Hello @FooBot how are you!"
/// ```
///
/// The corresponding annotations metadata:
/// ```
/// "annotations":[{
///    "type":"USER_MENTION",
///    "startIndex":6,
///    "length":7,
///    "userMention": {
///      "user": {
///        "name":"users/{user}",
///        "displayName":"FooBot",
///        "avatarUrl":"<https://goo.gl/aeDtrS",>
///        "type":"BOT"
///      },
///      "type":"MENTION"
///     }
/// }]
/// ```
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Annotation {
    /// The type of this annotation.
    #[prost(enumeration = "AnnotationType", tag = "1")]
    pub r#type: i32,
    /// Start index (0-based, inclusive) in the plain-text message body this
    /// annotation corresponds to.
    #[prost(int32, optional, tag = "2")]
    pub start_index: ::core::option::Option<i32>,
    /// Length of the substring in the plain-text message body this annotation
    /// corresponds to.
    #[prost(int32, tag = "3")]
    pub length: i32,
    /// Additional metadata about the annotation.
    #[prost(oneof = "annotation::Metadata", tags = "4, 5, 6")]
    pub metadata: ::core::option::Option<annotation::Metadata>,
}
/// Nested message and enum types in `Annotation`.
pub mod annotation {
    /// Additional metadata about the annotation.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Metadata {
        /// The metadata of user mention.
        #[prost(message, tag = "4")]
        UserMention(super::UserMentionMetadata),
        /// The metadata for a slash command.
        #[prost(message, tag = "5")]
        SlashCommand(super::SlashCommandMetadata),
        /// The metadata for a rich link.
        #[prost(message, tag = "6")]
        RichLinkMetadata(super::RichLinkMetadata),
    }
}
/// Annotation metadata for user mentions (@).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserMentionMetadata {
    /// The user mentioned.
    #[prost(message, optional, tag = "1")]
    pub user: ::core::option::Option<User>,
    /// The type of user mention.
    #[prost(enumeration = "user_mention_metadata::Type", tag = "2")]
    pub r#type: i32,
}
/// Nested message and enum types in `UserMentionMetadata`.
pub mod user_mention_metadata {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Default value for the enum. Don't use.
        Unspecified = 0,
        /// Add user to space.
        Add = 1,
        /// Mention user in space.
        Mention = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Add => "ADD",
                Self::Mention => "MENTION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ADD" => Some(Self::Add),
                "MENTION" => Some(Self::Mention),
                _ => None,
            }
        }
    }
}
/// Annotation metadata for slash commands (/).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlashCommandMetadata {
    /// The Chat app whose command was invoked.
    #[prost(message, optional, tag = "1")]
    pub bot: ::core::option::Option<User>,
    /// The type of slash command.
    #[prost(enumeration = "slash_command_metadata::Type", tag = "2")]
    pub r#type: i32,
    /// The name of the invoked slash command.
    #[prost(string, tag = "3")]
    pub command_name: ::prost::alloc::string::String,
    /// The command ID of the invoked slash command.
    #[prost(int64, tag = "4")]
    pub command_id: i64,
    /// Indicates whether the slash command is for a dialog.
    #[prost(bool, tag = "5")]
    pub triggers_dialog: bool,
}
/// Nested message and enum types in `SlashCommandMetadata`.
pub mod slash_command_metadata {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Default value for the enum. Don't use.
        Unspecified = 0,
        /// Add Chat app to space.
        Add = 1,
        /// Invoke slash command in space.
        Invoke = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Add => "ADD",
                Self::Invoke => "INVOKE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ADD" => Some(Self::Add),
                "INVOKE" => Some(Self::Invoke),
                _ => None,
            }
        }
    }
}
/// A rich link to a resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RichLinkMetadata {
    /// The URI of this link.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// The rich link type.
    #[prost(enumeration = "rich_link_metadata::RichLinkType", tag = "2")]
    pub rich_link_type: i32,
    /// Data for the linked resource.
    #[prost(oneof = "rich_link_metadata::Data", tags = "3, 4")]
    pub data: ::core::option::Option<rich_link_metadata::Data>,
}
/// Nested message and enum types in `RichLinkMetadata`.
pub mod rich_link_metadata {
    /// The rich link type. More types might be added in the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RichLinkType {
        /// Default value for the enum. Don't use.
        Unspecified = 0,
        /// A Google Drive rich link type.
        DriveFile = 1,
        /// A Chat space rich link type. For example, a space smart chip.
        ChatSpace = 2,
    }
    impl RichLinkType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "RICH_LINK_TYPE_UNSPECIFIED",
                Self::DriveFile => "DRIVE_FILE",
                Self::ChatSpace => "CHAT_SPACE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RICH_LINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "DRIVE_FILE" => Some(Self::DriveFile),
                "CHAT_SPACE" => Some(Self::ChatSpace),
                _ => None,
            }
        }
    }
    /// Data for the linked resource.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// Data for a drive link.
        #[prost(message, tag = "3")]
        DriveLinkData(super::DriveLinkData),
        /// Data for a chat space link.
        #[prost(message, tag = "4")]
        ChatSpaceLinkData(super::ChatSpaceLinkData),
    }
}
/// Data for Google Drive links.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveLinkData {
    /// A
    /// [DriveDataRef](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref>)
    /// which references a Google Drive file.
    #[prost(message, optional, tag = "1")]
    pub drive_data_ref: ::core::option::Option<DriveDataRef>,
    /// The mime type of the linked Google Drive resource.
    #[prost(string, tag = "2")]
    pub mime_type: ::prost::alloc::string::String,
}
/// Data for Chat space links.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatSpaceLinkData {
    /// The space of the linked Chat space resource.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub space: ::prost::alloc::string::String,
    /// The thread of the linked Chat space resource.
    ///
    /// Format: `spaces/{space}/threads/{thread}`
    #[prost(string, tag = "2")]
    pub thread: ::prost::alloc::string::String,
    /// The message of the linked Chat space resource.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    #[prost(string, tag = "3")]
    pub message: ::prost::alloc::string::String,
}
/// Type of the annotation.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AnnotationType {
    /// Default value for the enum. Don't use.
    Unspecified = 0,
    /// A user is mentioned.
    UserMention = 1,
    /// A slash command is invoked.
    SlashCommand = 2,
    /// A rich link annotation.
    RichLink = 3,
}
impl AnnotationType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "ANNOTATION_TYPE_UNSPECIFIED",
            Self::UserMention => "USER_MENTION",
            Self::SlashCommand => "SLASH_COMMAND",
            Self::RichLink => "RICH_LINK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ANNOTATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "USER_MENTION" => Some(Self::UserMention),
            "SLASH_COMMAND" => Some(Self::SlashCommand),
            "RICH_LINK" => Some(Self::RichLink),
            _ => None,
        }
    }
}
/// A Google Group in Google Chat.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
    /// Resource name for a Google Group.
    ///
    /// Represents a
    /// [group](<https://cloud.google.com/identity/docs/reference/rest/v1/groups>) in
    /// Cloud Identity Groups API.
    ///
    /// Format: groups/{group}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Represents a membership relation in Google Chat, such as whether a user or
/// Chat app is invited to, part of, or absent from a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Membership {
    /// Identifier. Resource name of the membership, assigned by the server.
    ///
    /// Format: `spaces/{space}/members/{member}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. State of the membership.
    #[prost(enumeration = "membership::MembershipState", tag = "2")]
    pub state: i32,
    /// Optional. User's role within a Chat space, which determines their permitted
    /// actions in the space.
    ///
    /// This field can only be used as input in `UpdateMembership`.
    #[prost(enumeration = "membership::MembershipRole", tag = "7")]
    pub role: i32,
    /// Optional. Immutable. The creation time of the membership, such as when a
    /// member joined or was invited to join a space. This field is output only,
    /// except when used to import historical memberships in import mode spaces.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Immutable. The deletion time of the membership, such as when a
    /// member left or was removed from a space. This field is output only, except
    /// when used to import historical memberships in import mode spaces.
    #[prost(message, optional, tag = "8")]
    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Member associated with this membership. Other member types might be
    /// supported in the future.
    #[prost(oneof = "membership::MemberType", tags = "3, 5")]
    pub member_type: ::core::option::Option<membership::MemberType>,
}
/// Nested message and enum types in `Membership`.
pub mod membership {
    /// Specifies the member's relationship with a space. Other membership states
    /// might be supported in the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MembershipState {
        /// Default value. Don't use.
        Unspecified = 0,
        /// The user is added to the space, and can participate in the space.
        Joined = 1,
        /// The user is invited to join the space, but hasn't joined it.
        Invited = 2,
        /// The user doesn't belong to the space and doesn't have a pending
        /// invitation to join the space.
        NotAMember = 3,
    }
    impl MembershipState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "MEMBERSHIP_STATE_UNSPECIFIED",
                Self::Joined => "JOINED",
                Self::Invited => "INVITED",
                Self::NotAMember => "NOT_A_MEMBER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MEMBERSHIP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "JOINED" => Some(Self::Joined),
                "INVITED" => Some(Self::Invited),
                "NOT_A_MEMBER" => Some(Self::NotAMember),
                _ => None,
            }
        }
    }
    /// Represents a user's permitted actions in a Chat space. More enum values
    /// might be added in the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MembershipRole {
        /// Default value. For [users][google.chat.v1.Membership.member]: they
        /// aren't a member of the space, but can be invited. For
        /// [Google Groups][google.chat.v1.Membership.group_member]: they're always
        ///   assigned this role (other enum values might be used in the future).
        Unspecified = 0,
        /// A member of the space. The user has basic permissions, like sending
        /// messages to the space. In 1:1 and unnamed group conversations, everyone
        /// has this role.
        RoleMember = 1,
        /// A space manager. The user has all basic permissions plus administrative
        /// permissions that let them manage the space, like adding or removing
        /// members. Only supported in
        /// [SpaceType.SPACE][google.chat.v1.Space.SpaceType].
        RoleManager = 2,
    }
    impl MembershipRole {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "MEMBERSHIP_ROLE_UNSPECIFIED",
                Self::RoleMember => "ROLE_MEMBER",
                Self::RoleManager => "ROLE_MANAGER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MEMBERSHIP_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
                "ROLE_MEMBER" => Some(Self::RoleMember),
                "ROLE_MANAGER" => Some(Self::RoleManager),
                _ => None,
            }
        }
    }
    /// Member associated with this membership. Other member types might be
    /// supported in the future.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MemberType {
        /// Optional. The Google Chat user or app the membership corresponds to.
        /// If your Chat app [authenticates as a
        /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
        /// the output populates the
        /// [user](<https://developers.google.com/workspace/chat/api/reference/rest/v1/User>)
        /// `name` and `type`.
        #[prost(message, tag = "3")]
        Member(super::User),
        /// Optional. The Google Group the membership corresponds to.
        ///
        /// Reading or mutating memberships for Google Groups requires [user
        /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
        #[prost(message, tag = "5")]
        GroupMember(super::Group),
    }
}
/// Request message for creating a membership.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMembershipRequest {
    /// Required. The resource name of the space for which to create the
    /// membership.
    ///
    /// Format: spaces/{space}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The membership relation to create.
    ///
    /// The `memberType` field must contain a user with the `user.name` and
    /// `user.type` fields populated. The server will assign a resource name
    /// and overwrite anything specified.
    ///
    /// When a Chat app creates a membership relation for a human user, it must use
    /// certain authorization scopes and set specific values for certain fields:
    ///
    /// - When [authenticating as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// the `chat.memberships` authorization scope is required.
    ///
    /// - When [authenticating as an
    /// app](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>),
    /// the `chat.app.memberships` authorization scope is required.
    /// Authenticating as an app is available in [Developer
    /// Preview](<https://developers.google.com/workspace/preview>).
    ///
    /// - Set `user.type` to `HUMAN`, and set `user.name` with format
    /// `users/{user}`, where `{user}` can be the email address for the user. For
    /// users in the same Workspace organization `{user}` can also be the `id` of
    /// the [person](<https://developers.google.com/people/api/rest/v1/people>) from
    /// the People API, or the `id` for the user in the Directory API. For example,
    /// if the People API Person profile ID for `user@example.com` is `123456789`,
    /// you can add the user to the space by setting the `membership.member.name`
    /// to `users/user@example.com` or `users/123456789`.
    ///
    /// Inviting users external to the Workspace organization that owns the space
    /// requires [user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    ///
    /// When a Chat app creates a membership relation for itself, it must
    /// [authenticate as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>)
    /// and use the `chat.memberships.app` scope, set `user.type` to `BOT`, and set
    /// `user.name` to `users/app`.
    #[prost(message, optional, tag = "2")]
    pub membership: ::core::option::Option<Membership>,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.memberships` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// Creating app memberships or creating memberships for users outside the
    /// administrator's Google Workspace organization isn't supported using admin
    /// access.
    #[prost(bool, tag = "5")]
    pub use_admin_access: bool,
}
/// Request message for updating a membership.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMembershipRequest {
    /// Required. The membership to update. Only fields specified by `update_mask`
    /// are updated.
    #[prost(message, optional, tag = "1")]
    pub membership: ::core::option::Option<Membership>,
    /// Required. The field paths to update. Separate multiple values with commas
    /// or use `*` to update all field paths.
    ///
    /// Currently supported field paths:
    ///
    /// - `role`
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.memberships` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Request message for listing memberships.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMembershipsRequest {
    /// Required. The resource name of the space for which to fetch a membership
    /// list.
    ///
    /// Format: spaces/{space}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of memberships to return. The service might
    /// return fewer than this value.
    ///
    /// If unspecified, at most 100 memberships are returned.
    ///
    /// The maximum value is 1000. If you use a value more than 1000, it's
    /// automatically changed to 1000.
    ///
    /// Negative values return an `INVALID_ARGUMENT` error.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous call to list memberships.
    /// Provide this parameter to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided should match the call that
    /// provided the page token. Passing different values to the other parameters
    /// might lead to unexpected results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A query filter.
    ///
    /// You can filter memberships by a member's role
    /// ([`role`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole>))
    /// and type
    /// ([`member.type`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type>)).
    ///
    /// To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
    ///
    /// To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
    /// filter for `member.type` using the `!=` operator.
    ///
    /// To filter by both role and type, use the `AND` operator. To filter by
    /// either role or type, use the `OR` operator.
    ///
    /// Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
    /// when `use_admin_access` is set to true. Other member type filters will be
    /// rejected.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
    /// member.type = "HUMAN" AND role = "ROLE_MANAGER"
    ///
    /// member.type != "BOT"
    /// ```
    ///
    /// The following queries are invalid:
    ///
    /// ```
    /// member.type = "HUMAN" AND member.type = "BOT"
    /// role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
    /// ```
    ///
    /// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
    /// error.
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. When `true`, also returns memberships associated with a
    /// [Google Group][google.chat.v1.Membership.group_member], in
    /// addition to other types of memberships. If a
    /// [filter][google.chat.v1.ListMembershipsRequest.filter] is set,
    /// [Google Group][google.chat.v1.Membership.group_member]
    /// memberships that don't match the filter criteria aren't returned.
    #[prost(bool, tag = "6")]
    pub show_groups: bool,
    /// Optional. When `true`, also returns memberships associated with
    /// [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in
    /// addition to other types of memberships. If a
    /// filter is set,
    /// [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships
    /// that don't match the filter criteria aren't returned.
    ///
    /// Currently requires [user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    #[prost(bool, tag = "7")]
    pub show_invited: bool,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires either the `chat.admin.memberships.readonly` or
    /// `chat.admin.memberships` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// Listing app memberships in a space isn't supported when using admin access.
    #[prost(bool, tag = "8")]
    pub use_admin_access: bool,
}
/// Response to list memberships of the space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMembershipsResponse {
    /// Unordered list. List of memberships in the requested (or first) page.
    #[prost(message, repeated, tag = "1")]
    pub memberships: ::prost::alloc::vec::Vec<Membership>,
    /// A token that you can send as `pageToken` to retrieve the next page of
    /// results. If empty, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request to get a membership of a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMembershipRequest {
    /// Required. Resource name of the membership to retrieve.
    ///
    /// To get the app's own membership [by using user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// you can optionally use `spaces/{space}/members/app`.
    ///
    /// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
    ///
    /// You can use the user's email as an alias for `{member}`. For example,
    /// `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
    /// email of the Google Chat user.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly`
    /// [OAuth 2.0
    /// scopes](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// Getting app memberships in a space isn't supported when using admin access.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Request to delete a membership in a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMembershipRequest {
    /// Required. Resource name of the membership to delete. Chat apps can delete
    /// human users' or their own memberships. Chat apps can't delete other apps'
    /// memberships.
    ///
    /// When deleting a human membership, requires the `chat.memberships` scope and
    /// `spaces/{space}/members/{member}` format. You can use the email as an
    /// alias for `{member}`. For example,
    /// `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
    /// email of the Google Chat user.
    ///
    /// When deleting an app membership, requires the `chat.memberships.app` scope
    /// and `spaces/{space}/members/app` format.
    ///
    /// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.memberships` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// Deleting app memberships in a space isn't supported using admin access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
}
/// A widget is a UI element that presents text and images.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WidgetMarkup {
    /// A list of buttons. Buttons is also `oneof data` and only one of these
    /// fields should be set.
    #[prost(message, repeated, tag = "6")]
    pub buttons: ::prost::alloc::vec::Vec<widget_markup::Button>,
    /// A `WidgetMarkup` can only have one of the following items. You can use
    /// multiple `WidgetMarkup` fields to display more items.
    #[prost(oneof = "widget_markup::Data", tags = "1, 2, 3")]
    pub data: ::core::option::Option<widget_markup::Data>,
}
/// Nested message and enum types in `WidgetMarkup`.
pub mod widget_markup {
    /// A paragraph of text. Formatted text supported. For more information
    /// about formatting text, see
    /// [Formatting text in Google Chat
    /// apps](<https://developers.google.com/workspace/chat/format-messages#card-formatting>)
    /// and
    /// [Formatting
    /// text in Google Workspace
    /// Add-ons](<https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting>).
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TextParagraph {
        #[prost(string, tag = "1")]
        pub text: ::prost::alloc::string::String,
    }
    /// A button. Can be a text button or an image button.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Button {
        #[prost(oneof = "button::Type", tags = "1, 2")]
        pub r#type: ::core::option::Option<button::Type>,
    }
    /// Nested message and enum types in `Button`.
    pub mod button {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Type {
            /// A button with text and `onclick` action.
            #[prost(message, tag = "1")]
            TextButton(super::TextButton),
            /// A button with image and `onclick` action.
            #[prost(message, tag = "2")]
            ImageButton(super::ImageButton),
        }
    }
    /// A button with text and `onclick` action.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TextButton {
        /// The text of the button.
        #[prost(string, tag = "1")]
        pub text: ::prost::alloc::string::String,
        /// The `onclick` action of the button.
        #[prost(message, optional, tag = "2")]
        pub on_click: ::core::option::Option<OnClick>,
    }
    /// A UI element contains a key (label) and a value (content). This
    /// element can also contain some actions such as `onclick` button.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct KeyValue {
        /// The text of the top label. Formatted text supported. For more information
        /// about formatting text, see
        /// [Formatting text in Google Chat
        /// apps](<https://developers.google.com/workspace/chat/format-messages#card-formatting>)
        /// and
        /// [Formatting
        /// text in Google Workspace
        /// Add-ons](<https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting>).
        #[prost(string, tag = "3")]
        pub top_label: ::prost::alloc::string::String,
        /// The text of the content. Formatted text supported and always required.
        /// For more information
        /// about formatting text, see
        /// [Formatting text in Google Chat
        /// apps](<https://developers.google.com/workspace/chat/format-messages#card-formatting>)
        /// and
        /// [Formatting
        /// text in Google Workspace
        /// Add-ons](<https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting>).
        #[prost(string, tag = "4")]
        pub content: ::prost::alloc::string::String,
        /// If the content should be multiline.
        #[prost(bool, tag = "9")]
        pub content_multiline: bool,
        /// The text of the bottom label. Formatted text supported. For more
        /// information about formatting text, see [Formatting text in Google Chat
        /// apps](<https://developers.google.com/workspace/chat/format-messages#card-formatting>)
        /// and
        /// [Formatting
        /// text in Google Workspace
        /// Add-ons](<https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting>).
        #[prost(string, tag = "5")]
        pub bottom_label: ::prost::alloc::string::String,
        /// The `onclick` action. Only the top label, bottom label, and content
        /// region are clickable.
        #[prost(message, optional, tag = "6")]
        pub on_click: ::core::option::Option<OnClick>,
        /// At least one of icons, `top_label` and `bottom_label` must be defined.
        #[prost(oneof = "key_value::Icons", tags = "1, 2")]
        pub icons: ::core::option::Option<key_value::Icons>,
        /// A control widget. You can set either `button` or `switch_widget`,
        /// but not both.
        #[prost(oneof = "key_value::Control", tags = "7")]
        pub control: ::core::option::Option<key_value::Control>,
    }
    /// Nested message and enum types in `KeyValue`.
    pub mod key_value {
        /// At least one of icons, `top_label` and `bottom_label` must be defined.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Icons {
            /// An enum value that's replaced by the Chat API with the
            /// corresponding icon image.
            #[prost(enumeration = "super::Icon", tag = "1")]
            Icon(i32),
            /// The icon specified by a URL.
            #[prost(string, tag = "2")]
            IconUrl(::prost::alloc::string::String),
        }
        /// A control widget. You can set either `button` or `switch_widget`,
        /// but not both.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Control {
            /// A button that can be clicked to trigger an action.
            #[prost(message, tag = "7")]
            Button(super::Button),
        }
    }
    /// An image that's specified by a URL and can have an `onclick` action.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Image {
        /// The URL of the image.
        #[prost(string, tag = "1")]
        pub image_url: ::prost::alloc::string::String,
        /// The `onclick` action.
        #[prost(message, optional, tag = "2")]
        pub on_click: ::core::option::Option<OnClick>,
        /// The aspect ratio of this image (width and height). This field lets you
        /// reserve the right height for the image while waiting for it to load.
        /// It's not meant to override the built-in aspect ratio of the image.
        /// If unset, the server fills it by prefetching the image.
        #[prost(double, tag = "3")]
        pub aspect_ratio: f64,
    }
    /// An image button with an `onclick` action.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ImageButton {
        /// The `onclick` action.
        #[prost(message, optional, tag = "2")]
        pub on_click: ::core::option::Option<OnClick>,
        /// The name of this `image_button` that's used for accessibility.
        /// Default value is provided if this name isn't specified.
        #[prost(string, tag = "4")]
        pub name: ::prost::alloc::string::String,
        /// The icon can be specified by an `Icon` `enum` or a URL.
        #[prost(oneof = "image_button::Icons", tags = "1, 3")]
        pub icons: ::core::option::Option<image_button::Icons>,
    }
    /// Nested message and enum types in `ImageButton`.
    pub mod image_button {
        /// The icon can be specified by an `Icon` `enum` or a URL.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Icons {
            /// The icon specified by an `enum` that indices to an icon provided by
            /// Chat API.
            #[prost(enumeration = "super::Icon", tag = "1")]
            Icon(i32),
            /// The icon specified by a URL.
            #[prost(string, tag = "3")]
            IconUrl(::prost::alloc::string::String),
        }
    }
    /// An `onclick` action (for example, open a link).
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OnClick {
        #[prost(oneof = "on_click::Data", tags = "1, 2")]
        pub data: ::core::option::Option<on_click::Data>,
    }
    /// Nested message and enum types in `OnClick`.
    pub mod on_click {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Data {
            /// A form action is triggered by this `onclick` action if specified.
            #[prost(message, tag = "1")]
            Action(super::FormAction),
            /// This `onclick` action triggers an open link action if specified.
            #[prost(message, tag = "2")]
            OpenLink(super::OpenLink),
        }
    }
    /// A link that opens a new window.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OpenLink {
        /// The URL to open.
        #[prost(string, tag = "1")]
        pub url: ::prost::alloc::string::String,
    }
    /// A form action describes the behavior when the form is submitted.
    /// For example, you can invoke Apps Script to handle the form.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FormAction {
        /// The method name is used to identify which part of the form triggered the
        /// form submission. This information is echoed back to the Chat app as part
        /// of the card click event. You can use the same method name for several
        /// elements that trigger a common behavior.
        #[prost(string, tag = "1")]
        pub action_method_name: ::prost::alloc::string::String,
        /// List of action parameters.
        #[prost(message, repeated, tag = "2")]
        pub parameters: ::prost::alloc::vec::Vec<form_action::ActionParameter>,
    }
    /// Nested message and enum types in `FormAction`.
    pub mod form_action {
        /// List of string parameters to supply when the action method is invoked.
        /// For example, consider three snooze buttons: snooze now, snooze one day,
        /// snooze next week. You might use `action method = snooze()`, passing the
        /// snooze type and snooze time in the list of string parameters.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct ActionParameter {
            /// The name of the parameter for the action script.
            #[prost(string, tag = "1")]
            pub key: ::prost::alloc::string::String,
            /// The value of the parameter.
            #[prost(string, tag = "2")]
            pub value: ::prost::alloc::string::String,
        }
    }
    /// The set of supported icons.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Icon {
        Unspecified = 0,
        Airplane = 1,
        Bookmark = 26,
        Bus = 25,
        Car = 9,
        Clock = 2,
        ConfirmationNumberIcon = 12,
        Dollar = 14,
        Description = 27,
        Email = 10,
        EventPerformer = 20,
        EventSeat = 21,
        FlightArrival = 16,
        FlightDeparture = 15,
        Hotel = 6,
        HotelRoomType = 17,
        Invite = 19,
        MapPin = 3,
        Membership = 24,
        MultiplePeople = 18,
        Offer = 30,
        Person = 11,
        Phone = 13,
        RestaurantIcon = 7,
        ShoppingCart = 8,
        Star = 5,
        Store = 22,
        Ticket = 4,
        Train = 23,
        VideoCamera = 28,
        VideoPlay = 29,
    }
    impl Icon {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "ICON_UNSPECIFIED",
                Self::Airplane => "AIRPLANE",
                Self::Bookmark => "BOOKMARK",
                Self::Bus => "BUS",
                Self::Car => "CAR",
                Self::Clock => "CLOCK",
                Self::ConfirmationNumberIcon => "CONFIRMATION_NUMBER_ICON",
                Self::Dollar => "DOLLAR",
                Self::Description => "DESCRIPTION",
                Self::Email => "EMAIL",
                Self::EventPerformer => "EVENT_PERFORMER",
                Self::EventSeat => "EVENT_SEAT",
                Self::FlightArrival => "FLIGHT_ARRIVAL",
                Self::FlightDeparture => "FLIGHT_DEPARTURE",
                Self::Hotel => "HOTEL",
                Self::HotelRoomType => "HOTEL_ROOM_TYPE",
                Self::Invite => "INVITE",
                Self::MapPin => "MAP_PIN",
                Self::Membership => "MEMBERSHIP",
                Self::MultiplePeople => "MULTIPLE_PEOPLE",
                Self::Offer => "OFFER",
                Self::Person => "PERSON",
                Self::Phone => "PHONE",
                Self::RestaurantIcon => "RESTAURANT_ICON",
                Self::ShoppingCart => "SHOPPING_CART",
                Self::Star => "STAR",
                Self::Store => "STORE",
                Self::Ticket => "TICKET",
                Self::Train => "TRAIN",
                Self::VideoCamera => "VIDEO_CAMERA",
                Self::VideoPlay => "VIDEO_PLAY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ICON_UNSPECIFIED" => Some(Self::Unspecified),
                "AIRPLANE" => Some(Self::Airplane),
                "BOOKMARK" => Some(Self::Bookmark),
                "BUS" => Some(Self::Bus),
                "CAR" => Some(Self::Car),
                "CLOCK" => Some(Self::Clock),
                "CONFIRMATION_NUMBER_ICON" => Some(Self::ConfirmationNumberIcon),
                "DOLLAR" => Some(Self::Dollar),
                "DESCRIPTION" => Some(Self::Description),
                "EMAIL" => Some(Self::Email),
                "EVENT_PERFORMER" => Some(Self::EventPerformer),
                "EVENT_SEAT" => Some(Self::EventSeat),
                "FLIGHT_ARRIVAL" => Some(Self::FlightArrival),
                "FLIGHT_DEPARTURE" => Some(Self::FlightDeparture),
                "HOTEL" => Some(Self::Hotel),
                "HOTEL_ROOM_TYPE" => Some(Self::HotelRoomType),
                "INVITE" => Some(Self::Invite),
                "MAP_PIN" => Some(Self::MapPin),
                "MEMBERSHIP" => Some(Self::Membership),
                "MULTIPLE_PEOPLE" => Some(Self::MultiplePeople),
                "OFFER" => Some(Self::Offer),
                "PERSON" => Some(Self::Person),
                "PHONE" => Some(Self::Phone),
                "RESTAURANT_ICON" => Some(Self::RestaurantIcon),
                "SHOPPING_CART" => Some(Self::ShoppingCart),
                "STAR" => Some(Self::Star),
                "STORE" => Some(Self::Store),
                "TICKET" => Some(Self::Ticket),
                "TRAIN" => Some(Self::Train),
                "VIDEO_CAMERA" => Some(Self::VideoCamera),
                "VIDEO_PLAY" => Some(Self::VideoPlay),
                _ => None,
            }
        }
    }
    /// A `WidgetMarkup` can only have one of the following items. You can use
    /// multiple `WidgetMarkup` fields to display more items.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// Display a text paragraph in this widget.
        #[prost(message, tag = "1")]
        TextParagraph(TextParagraph),
        /// Display an image in this widget.
        #[prost(message, tag = "2")]
        Image(Image),
        /// Display a key value item in this widget.
        #[prost(message, tag = "3")]
        KeyValue(KeyValue),
    }
}
/// The markup for developers to specify the contents of a contextual AddOn.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ContextualAddOnMarkup {}
/// Nested message and enum types in `ContextualAddOnMarkup`.
pub mod contextual_add_on_markup {
    /// A card is a UI element that can contain UI widgets such as text and
    /// images.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Card {
        /// The header of the card. A header usually contains a title and an image.
        #[prost(message, optional, tag = "1")]
        pub header: ::core::option::Option<card::CardHeader>,
        /// Sections are separated by a line divider.
        #[prost(message, repeated, tag = "2")]
        pub sections: ::prost::alloc::vec::Vec<card::Section>,
        /// The actions of this card.
        #[prost(message, repeated, tag = "3")]
        pub card_actions: ::prost::alloc::vec::Vec<card::CardAction>,
        /// Name of the card.
        #[prost(string, tag = "4")]
        pub name: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Card`.
    pub mod card {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct CardHeader {
            /// The title must be specified. The header has a fixed height: if both a
            /// title and subtitle is specified, each takes up one line. If only the
            /// title is specified, it takes up both lines.
            #[prost(string, tag = "1")]
            pub title: ::prost::alloc::string::String,
            /// The subtitle of the card header.
            #[prost(string, tag = "2")]
            pub subtitle: ::prost::alloc::string::String,
            /// The image's type (for example, square border or circular border).
            #[prost(enumeration = "card_header::ImageStyle", tag = "3")]
            pub image_style: i32,
            /// The URL of the image in the card header.
            #[prost(string, tag = "4")]
            pub image_url: ::prost::alloc::string::String,
        }
        /// Nested message and enum types in `CardHeader`.
        pub mod card_header {
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            pub enum ImageStyle {
                Unspecified = 0,
                /// Square border.
                Image = 1,
                /// Circular border.
                Avatar = 2,
            }
            impl ImageStyle {
                /// String value of the enum field names used in the ProtoBuf definition.
                ///
                /// The values are not transformed in any way and thus are considered stable
                /// (if the ProtoBuf definition does not change) and safe for programmatic use.
                pub fn as_str_name(&self) -> &'static str {
                    match self {
                        Self::Unspecified => "IMAGE_STYLE_UNSPECIFIED",
                        Self::Image => "IMAGE",
                        Self::Avatar => "AVATAR",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "IMAGE_STYLE_UNSPECIFIED" => Some(Self::Unspecified),
                        "IMAGE" => Some(Self::Image),
                        "AVATAR" => Some(Self::Avatar),
                        _ => None,
                    }
                }
            }
        }
        /// A section contains a collection of widgets that are rendered
        /// (vertically) in the order that they are specified. Across all platforms,
        /// cards have a narrow fixed width, so
        /// there's currently no need for layout properties (for example, float).
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Section {
            /// The header of the section. Formatted text is
            /// supported. For more information
            /// about formatting text, see
            /// [Formatting text in Google Chat
            /// apps](<https://developers.google.com/workspace/chat/format-messages#card-formatting>)
            /// and
            /// [Formatting
            /// text in Google Workspace
            /// Add-ons](<https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting>).
            #[prost(string, tag = "1")]
            pub header: ::prost::alloc::string::String,
            /// A section must contain at least one widget.
            #[prost(message, repeated, tag = "2")]
            pub widgets: ::prost::alloc::vec::Vec<super::super::WidgetMarkup>,
        }
        /// A card action is
        /// the action associated with the card. For an invoice card, a
        /// typical action would be: delete invoice, email invoice or open the
        /// invoice in browser.
        ///
        /// Not supported by Google Chat apps.
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct CardAction {
            /// The label used to be displayed in the action menu item.
            #[prost(string, tag = "1")]
            pub action_label: ::prost::alloc::string::String,
            /// The onclick action for this action item.
            #[prost(message, optional, tag = "2")]
            pub on_click: ::core::option::Option<super::super::widget_markup::OnClick>,
        }
    }
}
/// Information about a deleted message. A message is deleted when `delete_time`
/// is set.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeletionMetadata {
    /// Indicates who deleted the message.
    #[prost(enumeration = "deletion_metadata::DeletionType", tag = "1")]
    pub deletion_type: i32,
}
/// Nested message and enum types in `DeletionMetadata`.
pub mod deletion_metadata {
    /// Who deleted the message and how it was deleted. More values may be added in
    /// the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DeletionType {
        /// This value is unused.
        Unspecified = 0,
        /// User deleted their own message.
        Creator = 1,
        /// The space owner deleted the message.
        SpaceOwner = 2,
        /// A Google Workspace admin deleted the message.
        Admin = 3,
        /// A Chat app deleted its own message when it expired.
        AppMessageExpiry = 4,
        /// A Chat app deleted the message on behalf of the user.
        CreatorViaApp = 5,
        /// A Chat app deleted the message on behalf of the space owner.
        SpaceOwnerViaApp = 6,
    }
    impl DeletionType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "DELETION_TYPE_UNSPECIFIED",
                Self::Creator => "CREATOR",
                Self::SpaceOwner => "SPACE_OWNER",
                Self::Admin => "ADMIN",
                Self::AppMessageExpiry => "APP_MESSAGE_EXPIRY",
                Self::CreatorViaApp => "CREATOR_VIA_APP",
                Self::SpaceOwnerViaApp => "SPACE_OWNER_VIA_APP",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DELETION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATOR" => Some(Self::Creator),
                "SPACE_OWNER" => Some(Self::SpaceOwner),
                "ADMIN" => Some(Self::Admin),
                "APP_MESSAGE_EXPIRY" => Some(Self::AppMessageExpiry),
                "CREATOR_VIA_APP" => Some(Self::CreatorViaApp),
                "SPACE_OWNER_VIA_APP" => Some(Self::SpaceOwnerViaApp),
                _ => None,
            }
        }
    }
}
/// A matched URL in a Chat message. Chat apps can preview matched URLs. For more
/// information, see [Preview
/// links](<https://developers.google.com/chat/how-tos/preview-links>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatchedUrl {
    /// Output only. The URL that was matched.
    #[prost(string, tag = "2")]
    pub url: ::prost::alloc::string::String,
}
/// A reaction to a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reaction {
    /// Identifier. The resource name of the reaction.
    ///
    /// Format: `spaces/{space}/messages/{message}/reactions/{reaction}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The user who created the reaction.
    #[prost(message, optional, tag = "2")]
    pub user: ::core::option::Option<User>,
    /// Required. The emoji used in the reaction.
    #[prost(message, optional, tag = "3")]
    pub emoji: ::core::option::Option<Emoji>,
}
/// An emoji that is used as a reaction to a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Emoji {
    /// Required. The content of the emoji.
    #[prost(oneof = "emoji::Content", tags = "1, 2")]
    pub content: ::core::option::Option<emoji::Content>,
}
/// Nested message and enum types in `Emoji`.
pub mod emoji {
    /// Required. The content of the emoji.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Content {
        /// Optional. A basic emoji represented by a unicode string.
        #[prost(string, tag = "1")]
        Unicode(::prost::alloc::string::String),
        /// Output only. A custom emoji.
        #[prost(message, tag = "2")]
        CustomEmoji(super::CustomEmoji),
    }
}
/// Represents a custom emoji.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomEmoji {
    /// Output only. Unique key for the custom emoji resource.
    #[prost(string, tag = "1")]
    pub uid: ::prost::alloc::string::String,
}
/// The number of people who reacted to a message with a specific emoji.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmojiReactionSummary {
    /// Output only. Emoji associated with the reactions.
    #[prost(message, optional, tag = "1")]
    pub emoji: ::core::option::Option<Emoji>,
    /// Output only. The total number of reactions using the associated emoji.
    #[prost(int32, optional, tag = "2")]
    pub reaction_count: ::core::option::Option<i32>,
}
/// Creates a reaction to a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateReactionRequest {
    /// Required. The message where the reaction is created.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The reaction to create.
    #[prost(message, optional, tag = "2")]
    pub reaction: ::core::option::Option<Reaction>,
}
/// Lists reactions to a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReactionsRequest {
    /// Required. The message users reacted to.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of reactions returned. The service can return
    /// fewer reactions than this value. If unspecified, the default value is 25.
    /// The maximum value is 200; values above 200 are changed to 200.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. (If resuming from a previous query.)
    ///
    /// A page token received from a previous list reactions call. Provide this
    /// to retrieve the subsequent page.
    ///
    /// When paginating, the filter value should match the call that provided the
    /// page token. Passing a different value might lead to unexpected results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A query filter.
    ///
    /// You can filter reactions by
    /// [emoji](<https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji>)
    /// (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
    /// [user](<https://developers.google.com/workspace/chat/api/reference/rest/v1/User>)
    /// (`user.name`).
    ///
    /// To filter reactions for multiple emojis or users, join similar fields
    /// with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
    /// "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
    ///
    /// To filter reactions by emoji and user, use the `AND` operator, such as
    /// `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
    ///
    /// If your query uses both `AND` and `OR`, group them with parentheses.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// user.name = "users/{user}"
    /// emoji.unicode = "🙂"
    /// emoji.custom_emoji.uid = "{uid}"
    /// emoji.unicode = "🙂" OR emoji.unicode = "👍"
    /// emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
    /// emoji.unicode = "🙂" AND user.name = "users/{user}"
    /// (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
    /// AND user.name = "users/{user}"
    /// ```
    ///
    /// The following queries are invalid:
    ///
    /// ```
    /// emoji.unicode = "🙂" AND emoji.unicode = "👍"
    /// emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
    /// emoji.unicode = "🙂" OR user.name = "users/{user}"
    /// emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
    /// user.name = "users/{user}"
    /// emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
    /// AND user.name = "users/{user}"
    /// ```
    ///
    /// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
    /// error.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response to a list reactions request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReactionsResponse {
    /// List of reactions in the requested (or first) page.
    #[prost(message, repeated, tag = "1")]
    pub reactions: ::prost::alloc::vec::Vec<Reaction>,
    /// Continuation token to retrieve the next page of results. It's empty
    /// for the last page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Deletes a reaction to a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteReactionRequest {
    /// Required. Name of the reaction to delete.
    ///
    /// Format: `spaces/{space}/messages/{message}/reactions/{reaction}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A [slash
/// command](<https://developers.google.com/workspace/chat/slash-commands>) in
/// Google Chat.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SlashCommand {
    /// The ID of the slash command invoked.
    #[prost(int64, tag = "1")]
    pub command_id: i64,
}
/// The history state for messages and spaces. Specifies how long messages and
/// conversation threads are kept after creation.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HistoryState {
    /// Default value. Do not use.
    Unspecified = 0,
    /// History off. [Messages and threads are kept for 24
    /// hours](<https://support.google.com/chat/answer/7664687>).
    HistoryOff = 1,
    /// History on. The organization's [Vault retention
    /// rules](<https://support.google.com/vault/answer/7657597>) specify for
    /// how long messages and threads are kept.
    HistoryOn = 2,
}
impl HistoryState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "HISTORY_STATE_UNSPECIFIED",
            Self::HistoryOff => "HISTORY_OFF",
            Self::HistoryOn => "HISTORY_ON",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "HISTORY_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "HISTORY_OFF" => Some(Self::HistoryOff),
            "HISTORY_ON" => Some(Self::HistoryOn),
            _ => None,
        }
    }
}
/// A space in Google Chat. Spaces are conversations between two or more users
/// or 1:1 messages between a user and a Chat app.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Space {
    /// Identifier. Resource name of the space.
    ///
    /// Format: `spaces/{space}`
    ///
    /// Where `{space}` represents the system-assigned ID for the space. You can
    /// obtain the space ID by calling the
    /// [`spaces.list()`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list>)
    /// method or from the space URL. For example, if the space URL
    /// is `<https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`,> the space ID
    /// is `AAAAAAAAA`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Deprecated: Use `space_type` instead.
    /// The type of a space.
    #[deprecated]
    #[prost(enumeration = "space::Type", tag = "2")]
    pub r#type: i32,
    /// Optional. The type of space. Required when creating a space or updating the
    /// space type of a space. Output only for other usage.
    #[prost(enumeration = "space::SpaceType", tag = "10")]
    pub space_type: i32,
    /// Optional. Whether the space is a DM between a Chat app and a single
    /// human.
    #[prost(bool, tag = "4")]
    pub single_user_bot_dm: bool,
    /// Output only. Deprecated: Use `spaceThreadingState` instead.
    /// Whether messages are threaded in this space.
    #[deprecated]
    #[prost(bool, tag = "5")]
    pub threaded: bool,
    /// Optional. The space's display name. Required when [creating a
    /// space](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create>)
    /// with a `spaceType` of `SPACE`. If you receive the error message
    /// `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a
    /// different `displayName`. An existing space within the Google Workspace
    /// organization might already use this display name.
    ///
    /// For direct messages, this field might be empty.
    ///
    /// Supports up to 128 characters.
    #[prost(string, tag = "3")]
    pub display_name: ::prost::alloc::string::String,
    /// Optional. Immutable. Whether this space permits any Google Chat user as a
    /// member. Input when creating a space in a Google Workspace organization.
    /// Omit this field when creating spaces in the following conditions:
    ///
    ///    * The authenticated user uses a consumer account (unmanaged user
    ///      account). By default, a space created by a consumer account permits any
    ///      Google Chat user.
    ///
    /// For existing spaces, this field is output only.
    #[prost(bool, tag = "8")]
    pub external_user_allowed: bool,
    /// Output only. The threading state in the Chat space.
    #[prost(enumeration = "space::SpaceThreadingState", tag = "9")]
    pub space_threading_state: i32,
    /// Optional. Details about the space including description and rules.
    #[prost(message, optional, tag = "11")]
    pub space_details: ::core::option::Option<space::SpaceDetails>,
    /// Optional. The message history state for messages and threads in this space.
    #[prost(enumeration = "HistoryState", tag = "13")]
    pub space_history_state: i32,
    /// Optional. Whether this space is created in `Import Mode` as part of a data
    /// migration into Google Workspace. While spaces are being imported, they
    /// aren't visible to users until the import is complete.
    ///
    /// Creating a space in `Import Mode`requires [user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    #[prost(bool, tag = "16")]
    pub import_mode: bool,
    /// Optional. Immutable. For spaces created in Chat, the time the space was
    /// created. This field is output only, except when used in import mode spaces.
    ///
    /// For import mode spaces, set this field to the historical timestamp at which
    /// the space was created in the source in order to preserve the original
    /// creation time.
    ///
    /// Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`.
    #[prost(message, optional, tag = "17")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Timestamp of the last message in the space.
    #[prost(message, optional, tag = "18")]
    pub last_active_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. For direct message (DM) spaces with a Chat app, whether the
    /// space was created by a Google Workspace administrator. Administrators can
    /// install and set up a direct message with a Chat app on behalf of users in
    /// their organization.
    ///
    /// To support admin install, your Chat app must feature direct messaging.
    #[prost(bool, tag = "19")]
    pub admin_installed: bool,
    /// Output only. The count of joined memberships grouped by member type.
    /// Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
    /// `GROUP_CHAT`.
    #[prost(message, optional, tag = "20")]
    pub membership_count: ::core::option::Option<space::MembershipCount>,
    /// Optional. Specifies the [access
    /// setting](<https://support.google.com/chat/answer/11971020>) of the space.
    /// Only populated when the `space_type` is `SPACE`.
    #[prost(message, optional, tag = "23")]
    pub access_settings: ::core::option::Option<space::AccessSettings>,
    /// Output only. The URI for a user to access the space.
    #[prost(string, tag = "25")]
    pub space_uri: ::prost::alloc::string::String,
    /// Output only. The time when the space will be automatically deleted by the
    /// system if it remains in import mode.
    ///
    /// Each space created in import mode must exit this mode before this expire
    /// time using `spaces.completeImport`.
    ///
    /// This field is only populated for spaces that were created with import mode.
    #[prost(message, optional, tag = "28")]
    pub import_mode_expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Represents the \[permission settings\]
    /// (<https://support.google.com/chat/answer/13340792>) of a space. Only
    /// populated when the `space_type` is `SPACE`.
    ///
    /// Requires [user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    #[prost(oneof = "space::SpacePermissionSettings", tags = "26, 27")]
    pub space_permission_settings: ::core::option::Option<
        space::SpacePermissionSettings,
    >,
}
/// Nested message and enum types in `Space`.
pub mod space {
    /// Details about the space including description and rules.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SpaceDetails {
        /// Optional. A description of the space. For example, describe the space's
        /// discussion topic, functional purpose, or participants.
        ///
        /// Supports up to 150 characters.
        #[prost(string, tag = "1")]
        pub description: ::prost::alloc::string::String,
        /// Optional. The space's rules, expectations, and etiquette.
        ///
        /// Supports up to 5,000 characters.
        #[prost(string, tag = "2")]
        pub guidelines: ::prost::alloc::string::String,
    }
    /// Represents the count of memberships of a space, grouped into categories.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct MembershipCount {
        /// Output only. Count of human users that have directly joined the space,
        /// not counting users joined by having membership in a joined group.
        #[prost(int32, tag = "4")]
        pub joined_direct_human_user_count: i32,
        /// Output only. Count of all groups that have directly joined the space.
        #[prost(int32, tag = "5")]
        pub joined_group_count: i32,
    }
    /// Represents the [access
    /// setting](<https://support.google.com/chat/answer/11971020>) of the space.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccessSettings {
        /// Output only. Indicates the access state of the space.
        #[prost(enumeration = "access_settings::AccessState", tag = "1")]
        pub access_state: i32,
        /// Optional. The resource name of the [target
        /// audience](<https://support.google.com/a/answer/9934697>) who can discover
        /// the space, join the space, and preview the messages in the space. If
        /// unset, only users or Google Groups who have been individually invited or
        /// added to the space can access it. For details, see [Make a space
        /// discoverable to a target
        /// audience](<https://developers.google.com/workspace/chat/space-target-audience>).
        ///
        /// Format: `audiences/{audience}`
        ///
        /// To use the default target audience for the Google Workspace organization,
        /// set to `audiences/default`.
        ///
        /// Reading the target audience supports:
        ///
        /// - [User
        /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>)
        ///
        /// - [App
        /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>)
        /// with [administrator
        /// approval](<https://support.google.com/a?p=chat-app-auth>)
        /// with the `chat.app.spaces` scope in [Developer
        /// Preview](<https://developers.google.com/workspace/preview>).
        ///
        /// This field is not populated when using the `chat.bot` scope with [app
        /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>).
        ///
        /// Setting the target audience requires [user
        /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
        #[prost(string, tag = "3")]
        pub audience: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `AccessSettings`.
    pub mod access_settings {
        /// Represents the access state of the space.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum AccessState {
            /// Access state is unknown or not supported in this API.
            Unspecified = 0,
            /// Only users or Google Groups that have been individually added or
            /// invited by other users or Google Workspace administrators can discover
            /// and access the space.
            Private = 1,
            /// A space manager has granted a target audience access to
            /// the space. Users or Google Groups that have been individually added or
            /// invited to the space can also discover and access the space. To learn
            /// more, see [Make a space discoverable to specific
            /// users](<https://developers.google.com/workspace/chat/space-target-audience>).
            ///
            /// Creating discoverable spaces requires [user
            /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
            Discoverable = 2,
        }
        impl AccessState {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "ACCESS_STATE_UNSPECIFIED",
                    Self::Private => "PRIVATE",
                    Self::Discoverable => "DISCOVERABLE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "ACCESS_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                    "PRIVATE" => Some(Self::Private),
                    "DISCOVERABLE" => Some(Self::Discoverable),
                    _ => None,
                }
            }
        }
    }
    /// [Permission settings](<https://support.google.com/chat/answer/13340792>)
    /// that you can specify when updating an existing named space.
    ///
    /// To set permission settings when creating a space, specify the
    /// `PredefinedPermissionSettings` field in your request.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct PermissionSettings {
        /// Optional. Setting for managing members and groups in a space.
        #[prost(message, optional, tag = "1")]
        pub manage_members_and_groups: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for updating space name, avatar, description and
        /// guidelines.
        #[prost(message, optional, tag = "2")]
        pub modify_space_details: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for toggling space history on and off.
        #[prost(message, optional, tag = "3")]
        pub toggle_history: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for using @all in a space.
        #[prost(message, optional, tag = "4")]
        pub use_at_mention_all: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for managing apps in a space.
        #[prost(message, optional, tag = "5")]
        pub manage_apps: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for managing webhooks in a space.
        #[prost(message, optional, tag = "6")]
        pub manage_webhooks: ::core::option::Option<PermissionSetting>,
        /// Output only. Setting for posting messages in a space.
        #[prost(message, optional, tag = "7")]
        pub post_messages: ::core::option::Option<PermissionSetting>,
        /// Optional. Setting for replying to messages in a space.
        #[prost(message, optional, tag = "8")]
        pub reply_messages: ::core::option::Option<PermissionSetting>,
    }
    /// Represents a space permission setting.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct PermissionSetting {
        /// Optional. Whether spaces managers have this permission.
        #[prost(bool, tag = "1")]
        pub managers_allowed: bool,
        /// Optional. Whether non-manager members have this permission.
        #[prost(bool, tag = "2")]
        pub members_allowed: bool,
    }
    /// Deprecated: Use `SpaceType` instead.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Reserved.
        Unspecified = 0,
        /// Conversations between two or more humans.
        Room = 1,
        /// 1:1 Direct Message between a human and a Chat app, where all messages are
        /// flat. Note that this doesn't include direct messages between two humans.
        Dm = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::Room => "ROOM",
                Self::Dm => "DM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ROOM" => Some(Self::Room),
                "DM" => Some(Self::Dm),
                _ => None,
            }
        }
    }
    /// The type of space. Required when creating or updating a space. Output only
    /// for other usage.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SpaceType {
        /// Reserved.
        Unspecified = 0,
        /// A place where people send messages, share files, and collaborate.
        /// A `SPACE` can include Chat apps.
        Space = 1,
        /// Group conversations between 3 or more people.
        /// A `GROUP_CHAT` can include Chat apps.
        GroupChat = 2,
        /// 1:1 messages between two humans or a human and a Chat app.
        DirectMessage = 3,
    }
    impl SpaceType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "SPACE_TYPE_UNSPECIFIED",
                Self::Space => "SPACE",
                Self::GroupChat => "GROUP_CHAT",
                Self::DirectMessage => "DIRECT_MESSAGE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SPACE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SPACE" => Some(Self::Space),
                "GROUP_CHAT" => Some(Self::GroupChat),
                "DIRECT_MESSAGE" => Some(Self::DirectMessage),
                _ => None,
            }
        }
    }
    /// Specifies the type of threading state in the Chat space.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SpaceThreadingState {
        /// Reserved.
        Unspecified = 0,
        /// Named spaces that support message threads. When users respond to a
        /// message, they can reply in-thread, which keeps their response in the
        /// context of the original message.
        ThreadedMessages = 2,
        /// Named spaces where the conversation is organized by topic. Topics and
        /// their replies are grouped together.
        GroupedMessages = 3,
        /// Direct messages (DMs) between two people and group conversations between
        /// 3 or more people.
        UnthreadedMessages = 4,
    }
    impl SpaceThreadingState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "SPACE_THREADING_STATE_UNSPECIFIED",
                Self::ThreadedMessages => "THREADED_MESSAGES",
                Self::GroupedMessages => "GROUPED_MESSAGES",
                Self::UnthreadedMessages => "UNTHREADED_MESSAGES",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SPACE_THREADING_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "THREADED_MESSAGES" => Some(Self::ThreadedMessages),
                "GROUPED_MESSAGES" => Some(Self::GroupedMessages),
                "UNTHREADED_MESSAGES" => Some(Self::UnthreadedMessages),
                _ => None,
            }
        }
    }
    /// Predefined permission settings that you can only specify when creating a
    /// named space. More settings might be added in the future.
    /// For details about permission settings for named spaces, see [Learn about
    /// spaces](<https://support.google.com/chat/answer/7659784>).
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PredefinedPermissionSettings {
        /// Unspecified. Don't use.
        Unspecified = 0,
        /// Setting to make the space a collaboration space where all members can
        /// post messages.
        CollaborationSpace = 1,
        /// Setting to make the space an announcement space where only space managers
        /// can post messages.
        AnnouncementSpace = 2,
    }
    impl PredefinedPermissionSettings {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
                Self::CollaborationSpace => "COLLABORATION_SPACE",
                Self::AnnouncementSpace => "ANNOUNCEMENT_SPACE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED" => Some(Self::Unspecified),
                "COLLABORATION_SPACE" => Some(Self::CollaborationSpace),
                "ANNOUNCEMENT_SPACE" => Some(Self::AnnouncementSpace),
                _ => None,
            }
        }
    }
    /// Represents the \[permission settings\]
    /// (<https://support.google.com/chat/answer/13340792>) of a space. Only
    /// populated when the `space_type` is `SPACE`.
    ///
    /// Requires [user
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum SpacePermissionSettings {
        /// Optional. Input only. Predefined space permission settings, input only
        /// when creating a space. If the field is not set, a collaboration space is
        /// created. After you create the space, settings are populated in the
        /// `PermissionSettings` field.
        #[prost(enumeration = "PredefinedPermissionSettings", tag = "26")]
        PredefinedPermissionSettings(i32),
        /// Optional. Space permission settings for existing spaces. Input for
        /// updating exact space permission settings, where existing permission
        /// settings are replaced. Output lists current permission settings.
        #[prost(message, tag = "27")]
        PermissionSettings(PermissionSettings),
    }
}
/// A request to create a named space with no members.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSpaceRequest {
    /// Required. The `displayName` and `spaceType` fields must be populated.  Only
    /// `SpaceType.SPACE`  and `SpaceType.GROUP_CHAT` are supported.
    /// `SpaceType.GROUP_CHAT` can only be used if `importMode` is set to true.
    ///
    /// If you receive the error message `ALREADY_EXISTS`,
    /// try a different `displayName`. An existing space within the Google
    /// Workspace organization might already use this display name.
    ///
    ///
    /// The space `name` is assigned on the server so anything specified in this
    /// field will be ignored.
    #[prost(message, optional, tag = "1")]
    pub space: ::core::option::Option<Space>,
    /// Optional. A unique identifier for this request.
    /// A random UUID is recommended.
    /// Specifying an existing request ID returns the space created with that ID
    /// instead of creating a new space.
    /// Specifying an existing request ID from the same Chat app with a different
    /// authenticated user returns an error.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// A request to list the spaces the caller is a member of.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpacesRequest {
    /// Optional. The maximum number of spaces to return. The service might return
    /// fewer than this value.
    ///
    /// If unspecified, at most 100 spaces are returned.
    ///
    /// The maximum value is 1000. If you use a value more than 1000, it's
    /// automatically changed to 1000.
    ///
    /// Negative values return an `INVALID_ARGUMENT` error.
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous list spaces call.
    /// Provide this parameter to retrieve the subsequent page.
    ///
    /// When paginating, the filter value should match the call that provided the
    /// page token. Passing a different value may lead to unexpected results.
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A query filter.
    ///
    /// You can filter spaces by the space type
    /// ([`space_type`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype>)).
    ///
    /// To filter by space type, you must specify valid enum value, such as
    /// `SPACE` or `GROUP_CHAT` (the `space_type` can't be
    /// `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
    /// operator.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// space_type = "SPACE"
    /// spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
    /// ```
    ///
    /// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
    /// error.
    #[prost(string, tag = "3")]
    pub filter: ::prost::alloc::string::String,
}
/// The response for a list spaces request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpacesResponse {
    /// List of spaces in the requested (or first) page.
    /// Note: The `permissionSettings` field is not returned in the Space
    /// object for list requests.
    #[prost(message, repeated, tag = "1")]
    pub spaces: ::prost::alloc::vec::Vec<Space>,
    /// You can send a token as `pageToken` to retrieve the next page of
    /// results. If empty, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// A request to return a single space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpaceRequest {
    /// Required. Resource name of the space, in the form `spaces/{space}`.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
    /// scopes](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
}
/// A request to get direct message space based on the user resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindDirectMessageRequest {
    /// Required. Resource name of the user to find direct message with.
    ///
    /// Format: `users/{user}`, where `{user}` is either the `id` for the
    /// [person](<https://developers.google.com/people/api/rest/v1/people>) from the
    /// People API, or the `id` for the
    /// [user](<https://developers.google.com/admin-sdk/directory/reference/rest/v1/users>)
    /// in the Directory API. For example, if the People API profile ID is
    /// `123456789`, you can find a direct message with that person by using
    /// `users/123456789` as the `name`. When [authenticated as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// you can use the email as an alias for `{user}`. For example,
    /// `users/example@gmail.com` where `example@gmail.com` is the email of the
    /// Google Chat user.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A request to update a single space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSpaceRequest {
    /// Required. Space with fields to be updated. `Space.name` must be
    /// populated in the form of `spaces/{space}`. Only fields
    /// specified by `update_mask` are updated.
    #[prost(message, optional, tag = "1")]
    pub space: ::core::option::Option<Space>,
    /// Required. The updated field paths, comma separated if there are
    /// multiple.
    ///
    /// You can update the following fields for a space:
    ///
    /// `space_details`: Updates the space's description. Supports up to 150
    /// characters.
    ///
    /// `display_name`: Only supports updating the display name for spaces where
    /// `spaceType` field is `SPACE`.
    ///   If you receive the error message `ALREADY_EXISTS`, try a different
    ///   value. An existing space within the
    /// Google Workspace organization might already use this display name.
    ///
    /// `space_type`: Only supports changing a `GROUP_CHAT` space type to
    /// `SPACE`. Include `display_name` together
    /// with `space_type` in the update mask and ensure that the specified space
    /// has a non-empty display name and the `SPACE` space type. Including the
    /// `space_type` mask and the `SPACE` type in the specified space when updating
    /// the display name is optional if the existing space already has the `SPACE`
    /// type. Trying to update the space type in other ways results in an invalid
    /// argument error.
    /// `space_type` is not supported with `useAdminAccess`.
    ///
    /// `space_history_state`: Updates [space history
    /// settings](<https://support.google.com/chat/answer/7664687>) by turning
    /// history on or off for the space. Only supported if history settings are
    /// enabled for the Google Workspace organization. To update the
    /// space history state, you must omit all other field masks in your request.
    /// `space_history_state` is not supported with `useAdminAccess`.
    ///
    /// `access_settings.audience`: Updates the [access
    /// setting](<https://support.google.com/chat/answer/11971020>) of who can
    /// discover the space, join the space, and preview the messages in named space
    /// where `spaceType` field is `SPACE`. If the existing space has a
    /// target audience, you can remove the audience and restrict space access by
    /// omitting a value for this field mask. To update access settings for a
    /// space, the authenticating user must be a space manager and omit all other
    /// field masks in your request. You can't update this field if the space is in
    /// [import
    /// mode](<https://developers.google.com/workspace/chat/import-data-overview>).
    /// To learn more, see [Make a space discoverable to specific
    /// users](<https://developers.google.com/workspace/chat/space-target-audience>).
    /// `access_settings.audience` is not supported with `useAdminAccess`.
    ///
    /// `permission_settings`: Supports changing the
    /// [permission settings](<https://support.google.com/chat/answer/13340792>)
    /// of a space.
    /// When updating permission settings, you can only specify
    /// `permissionSettings` field masks; you cannot update other field masks
    /// at the same time. `permissionSettings` is not supported with
    /// `useAdminAccess`.
    /// The supported field masks include:
    ///
    /// - `permission_settings.manageMembersAndGroups`
    /// - `permission_settings.modifySpaceDetails`
    /// - `permission_settings.toggleHistory`
    /// - `permission_settings.useAtMentionAll`
    /// - `permission_settings.manageApps`
    /// - `permission_settings.manageWebhooks`
    /// - `permission_settings.replyMessages`
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.spaces` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// Some `FieldMask` values are not supported using admin access. For details,
    /// see the description of `update_mask`.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Request to search for a list of spaces based on a query.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchSpacesRequest {
    /// When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
    /// [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    ///
    /// This method currently only supports admin access, thus only `true` is
    /// accepted for this field.
    #[prost(bool, tag = "1")]
    pub use_admin_access: bool,
    /// The maximum number of spaces to return. The service may return fewer than
    /// this value.
    ///
    /// If unspecified, at most 100 spaces are returned.
    ///
    /// The maximum value is 1000. If you use a value more than 1000, it's
    /// automatically changed to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token, received from the previous search spaces call. Provide this
    /// parameter to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided should match the call that
    /// provided the page token. Passing different values to the other parameters
    /// might lead to unexpected results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Required. A search query.
    ///
    /// You can search by using the following parameters:
    ///
    /// - `create_time`
    /// - `customer`
    /// - `display_name`
    /// - `external_user_allowed`
    /// - `last_active_time`
    /// - `space_history_state`
    /// - `space_type`
    ///
    /// `create_time` and `last_active_time` accept a timestamp in
    /// [RFC-3339](<https://www.rfc-editor.org/rfc/rfc3339>) format and the supported
    /// comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
    ///
    /// `customer` is required and is used to indicate which customer
    /// to fetch spaces from. `customers/my_customer` is the only supported value.
    ///
    /// `display_name` only accepts the `HAS` (`:`) operator. The text to
    /// match is first tokenized into tokens and each token is prefix-matched
    /// case-insensitively and independently as a substring anywhere in the space's
    /// `display_name`. For example, `Fun Eve` matches `Fun event` or `The
    /// evening was fun`, but not `notFun event` or `even`.
    ///
    /// `external_user_allowed` accepts either `true` or `false`.
    ///
    /// `space_history_state` only accepts values from the \[`historyState`\]
    /// (<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState>)
    /// field of a `space` resource.
    ///
    /// `space_type` is required and the only valid value is `SPACE`.
    ///
    /// Across different fields, only `AND` operators are supported. A valid
    /// example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
    /// example is `space_type = "SPACE" OR display_name:"Hello"`.
    ///
    /// Among the same field,
    /// `space_type` doesn't support `AND` or `OR` operators.
    /// `display_name`, 'space_history_state', and 'external_user_allowed' only
    /// support `OR` operators.
    /// `last_active_time` and `create_time` support both `AND` and `OR` operators.
    /// `AND` can only be used to represent an interval, such as `last_active_time
    /// < "2022-01-01T00:00:00+00:00" AND last_active_time >
    /// "2023-01-01T00:00:00+00:00"`.
    ///
    /// The following example queries are valid:
    ///
    /// ```
    /// customer = "customers/my_customer" AND space_type = "SPACE"
    ///
    /// customer = "customers/my_customer" AND space_type = "SPACE" AND
    /// display_name:"Hello World"
    ///
    /// customer = "customers/my_customer" AND space_type = "SPACE" AND
    /// (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
    /// "2022-01-01T00:00:00+00:00")
    ///
    /// customer = "customers/my_customer" AND space_type = "SPACE" AND
    /// (display_name:"Hello World" OR display_name:"Fun event") AND
    /// (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
    /// "2022-01-01T00:00:00+00:00")
    ///
    /// customer = "customers/my_customer" AND space_type = "SPACE" AND
    /// (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
    /// "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
    /// (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
    /// ```
    #[prost(string, tag = "4")]
    pub query: ::prost::alloc::string::String,
    /// Optional. How the list of spaces is ordered.
    ///
    /// Supported attributes to order by are:
    ///
    /// - `membership_count.joined_direct_human_user_count` — Denotes the count of
    /// human users that have directly joined a space.
    /// - `last_active_time` — Denotes the time when last eligible item is added to
    /// any topic of this space.
    /// - `create_time` — Denotes the time of the space creation.
    ///
    /// Valid ordering operation values are:
    ///
    /// - `ASC` for ascending. Default value.
    ///
    /// - `DESC` for descending.
    ///
    /// The supported syntax are:
    ///
    /// - `membership_count.joined_direct_human_user_count DESC`
    /// - `membership_count.joined_direct_human_user_count ASC`
    /// - `last_active_time DESC`
    /// - `last_active_time ASC`
    /// - `create_time DESC`
    /// - `create_time ASC`
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response with a list of spaces corresponding to the search spaces request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchSpacesResponse {
    /// A page of the requested spaces.
    #[prost(message, repeated, tag = "1")]
    pub spaces: ::prost::alloc::vec::Vec<Space>,
    /// A token that can be used to retrieve the next page. If this field is empty,
    /// there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// The total number of spaces that match the query, across all pages. If the
    /// result is over 10,000 spaces, this value is an estimate.
    #[prost(int32, tag = "3")]
    pub total_size: i32,
}
/// Request for deleting a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSpaceRequest {
    /// Required. Resource name of the space to delete.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. When `true`, the method runs using the user's Google Workspace
    /// administrator privileges.
    ///
    /// The calling user must be a Google Workspace administrator with the
    /// [manage chat and spaces conversations
    /// privilege](<https://support.google.com/a/answer/13369245>).
    ///
    /// Requires the `chat.admin.delete` [OAuth 2.0
    /// scope](<https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes>).
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
}
/// Request message for completing the import process for a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteImportSpaceRequest {
    /// Required. Resource name of the import mode space.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Response message for completing the import process for a space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteImportSpaceResponse {
    /// The import mode space.
    #[prost(message, optional, tag = "1")]
    pub space: ::core::option::Option<Space>,
}
/// A message in a Google Chat space.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Message {
    /// Identifier. Resource name of the message.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    ///
    ///
    /// Where `{space}` is the ID of the space where the message is posted and
    /// `{message}` is a system-assigned ID for the message. For example,
    /// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`.
    ///
    /// If you set a custom ID when you create a message, you can use this ID to
    /// specify the message in a request by replacing `{message}` with the value
    /// from the `clientAssignedMessageId` field. For example,
    /// `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name
    /// a
    /// message](<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The user who created the message.
    /// If your Chat app [authenticates as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// the output populates the
    /// [user](<https://developers.google.com/workspace/chat/api/reference/rest/v1/User>)
    /// `name` and `type`.
    #[prost(message, optional, tag = "2")]
    pub sender: ::core::option::Option<User>,
    /// Optional. Immutable. For spaces created in Chat, the time at which the
    /// message was created. This field is output only, except when used in import
    /// mode spaces.
    ///
    /// For import mode spaces, set this field to the historical timestamp at which
    /// the message was created in the source in order to preserve the original
    /// creation time.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time at which the message was last edited by a user. If
    /// the message has never been edited, this field is empty.
    #[prost(message, optional, tag = "23")]
    pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time at which the message was deleted in
    /// Google Chat. If the message is never deleted, this field is empty.
    #[prost(message, optional, tag = "26")]
    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Plain-text body of the message. The first link to an image,
    /// video, or web page generates a [preview
    /// chip](<https://developers.google.com/workspace/chat/preview-links>). You can
    /// also [@mention a Google Chat
    /// user](<https://developers.google.com/workspace/chat/format-messages#messages-@mention>),
    /// or everyone in the space.
    ///
    /// To learn about creating text messages, see [Send a
    /// message](<https://developers.google.com/workspace/chat/create-messages>).
    #[prost(string, tag = "4")]
    pub text: ::prost::alloc::string::String,
    /// Output only. Contains the message `text` with markups added to communicate
    /// formatting. This field might not capture all formatting visible in the UI,
    /// but includes the following:
    ///
    /// * [Markup
    /// syntax](<https://developers.google.com/workspace/chat/format-messages>)
    /// for bold, italic, strikethrough, monospace, monospace block, and bulleted
    /// list.
    ///
    /// * [User
    /// mentions](<https://developers.google.com/workspace/chat/format-messages#messages-@mention>)
    /// using the format `<users/{user}>`.
    ///
    /// * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the
    /// first string is the URL and the second is the rendered text—for example,
    /// `<<http://example.com|custom> text>`.
    ///
    /// * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`.
    /// This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning
    /// face emoji.
    ///
    /// For more information, see [View text formatting sent in a
    /// message](<https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message>)
    #[prost(string, tag = "43")]
    pub formatted_text: ::prost::alloc::string::String,
    /// Deprecated: Use `cards_v2` instead.
    ///
    /// Rich, formatted, and interactive cards that you can use to display UI
    /// elements such as: formatted texts, buttons, and clickable images. Cards are
    /// normally displayed below the plain-text body of the message. `cards` and
    /// `cards_v2` can have a maximum size of 32 KB.
    #[deprecated]
    #[prost(message, repeated, tag = "5")]
    pub cards: ::prost::alloc::vec::Vec<contextual_add_on_markup::Card>,
    /// Optional. An array of
    /// [cards](<https://developers.google.com/workspace/chat/api/reference/rest/v1/cards>).
    ///
    /// Only Chat apps can create cards. If your Chat app [authenticates as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// the messages can't contain cards.
    ///
    /// To learn how to create a message that contains cards, see [Send a
    /// message](<https://developers.google.com/workspace/chat/create-messages>).
    ///
    /// [Card builder](<https://addons.gsuite.google.com/uikit/builder>)
    #[prost(message, repeated, tag = "22")]
    pub cards_v2: ::prost::alloc::vec::Vec<CardWithId>,
    /// Output only. Annotations associated with the `text` in this message.
    #[prost(message, repeated, tag = "10")]
    pub annotations: ::prost::alloc::vec::Vec<Annotation>,
    /// The thread the message belongs to. For example usage, see
    /// [Start or reply to a message
    /// thread](<https://developers.google.com/workspace/chat/create-messages#create-message-thread>).
    #[prost(message, optional, tag = "11")]
    pub thread: ::core::option::Option<Thread>,
    /// Output only. If your Chat app [authenticates as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// the output only populates the
    /// [space](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces>)
    /// `name`.
    #[prost(message, optional, tag = "12")]
    pub space: ::core::option::Option<Space>,
    /// Optional. A plain-text description of the message's cards, used when the
    /// actual cards can't be displayed—for example, mobile notifications.
    #[prost(string, tag = "13")]
    pub fallback_text: ::prost::alloc::string::String,
    /// Input only. Parameters that a Chat app can use to configure how its
    /// response is posted.
    #[prost(message, optional, tag = "14")]
    pub action_response: ::core::option::Option<ActionResponse>,
    /// Output only. Plain-text body of the message with all Chat app mentions
    /// stripped out.
    #[prost(string, tag = "15")]
    pub argument_text: ::prost::alloc::string::String,
    /// Output only. Slash command information, if applicable.
    #[prost(message, optional, tag = "17")]
    pub slash_command: ::core::option::Option<SlashCommand>,
    /// Optional. User-uploaded attachment.
    #[prost(message, repeated, tag = "18")]
    pub attachment: ::prost::alloc::vec::Vec<Attachment>,
    /// Output only. A URL in `spaces.messages.text` that matches a link preview
    /// pattern. For more information, see [Preview
    /// links](<https://developers.google.com/workspace/chat/preview-links>).
    #[prost(message, optional, tag = "20")]
    pub matched_url: ::core::option::Option<MatchedUrl>,
    /// Output only. When `true`, the message is a response in a reply thread. When
    /// `false`, the message is visible in the space's top-level conversation as
    /// either the first message of a thread or a message with no threaded replies.
    ///
    /// If the space doesn't support reply in threads, this field is always
    /// `false`.
    #[prost(bool, tag = "25")]
    pub thread_reply: bool,
    /// Optional. A custom ID for the message. You can use field to identify a
    /// message, or to get, delete, or update a message. To set a custom ID,
    /// specify the
    /// [`messageId`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id>)
    /// field when you create the message. For details, see [Name a
    /// message](<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>).
    #[prost(string, tag = "32")]
    pub client_assigned_message_id: ::prost::alloc::string::String,
    /// Output only. The list of emoji reaction summaries on the message.
    #[prost(message, repeated, tag = "33")]
    pub emoji_reaction_summaries: ::prost::alloc::vec::Vec<EmojiReactionSummary>,
    /// Optional. Immutable. Input for creating a message, otherwise output only.
    /// The user that can view the message. When set, the message is private and
    /// only visible to the specified user and the Chat app. To include this field
    /// in your request, you must call the Chat API using [app
    /// authentication](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>)
    /// and omit the following:
    ///
    /// * [Attachments](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments>)
    /// * [Accessory
    /// widgets](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget>)
    ///
    /// For details, see [Send a message
    /// privately](<https://developers.google.com/workspace/chat/create-messages#private>).
    #[prost(message, optional, tag = "36")]
    pub private_message_viewer: ::core::option::Option<User>,
    /// Output only. Information about a deleted message. A message is deleted when
    /// `delete_time` is set.
    #[prost(message, optional, tag = "38")]
    pub deletion_metadata: ::core::option::Option<DeletionMetadata>,
    /// Output only. Information about a message that's quoted by a Google Chat
    /// user in a space. Google Chat users can quote a message to reply to it.
    #[prost(message, optional, tag = "39")]
    pub quoted_message_metadata: ::core::option::Option<QuotedMessageMetadata>,
    /// Output only. GIF images that are attached to the message.
    #[prost(message, repeated, tag = "42")]
    pub attached_gifs: ::prost::alloc::vec::Vec<AttachedGif>,
    /// Optional. One or more interactive widgets that appear at the bottom of a
    /// message. You can add accessory widgets to messages that contain text,
    /// cards, or both text and cards. Not supported for messages that contain
    /// dialogs. For details, see [Add interactive widgets at the bottom of a
    /// message](<https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets>).
    ///
    /// Creating a message with accessory widgets requires [app
    /// authentication]
    /// (<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>).
    #[prost(message, repeated, tag = "44")]
    pub accessory_widgets: ::prost::alloc::vec::Vec<AccessoryWidget>,
}
/// A GIF image that's specified by a URL.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttachedGif {
    /// Output only. The URL that hosts the GIF image.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
}
/// Information about a quoted message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuotedMessageMetadata {
    /// Output only. Resource name of the quoted message.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the quoted message was created or when the
    /// quoted message was last updated.
    #[prost(message, optional, tag = "2")]
    pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// A thread in a Google Chat space. For example usage, see
/// [Start or reply to a message
/// thread](<https://developers.google.com/workspace/chat/create-messages#create-message-thread>).
///
/// If you specify a thread when creating a message, you can set the
/// [`messageReplyOption`](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption>)
/// field to determine what happens if no matching thread is found.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thread {
    /// Identifier. Resource name of the thread.
    ///
    /// Example: `spaces/{space}/threads/{thread}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. Input for creating or updating a thread. Otherwise, output only.
    /// ID for the thread. Supports up to 4000 characters.
    ///
    /// This ID is unique to the Chat app that sets it. For example, if
    /// multiple Chat apps create a message using the same thread key,
    /// the messages are posted in different threads. To reply in a
    /// thread created by a person or another Chat app, specify the thread `name`
    /// field instead.
    #[prost(string, tag = "3")]
    pub thread_key: ::prost::alloc::string::String,
}
/// Parameters that a Chat app can use to configure how its response is posted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionResponse {
    /// Input only. The type of Chat app response.
    #[prost(enumeration = "action_response::ResponseType", tag = "1")]
    pub r#type: i32,
    /// Input only. URL for users to authenticate or configure. (Only for
    /// `REQUEST_CONFIG` response types.)
    #[prost(string, tag = "2")]
    pub url: ::prost::alloc::string::String,
    /// Input only. A response to an interaction event related to a
    /// [dialog](<https://developers.google.com/workspace/chat/dialogs>). Must be
    /// accompanied by `ResponseType.Dialog`.
    #[prost(message, optional, tag = "3")]
    pub dialog_action: ::core::option::Option<DialogAction>,
    /// Input only. The response of the updated widget.
    #[prost(message, optional, tag = "4")]
    pub updated_widget: ::core::option::Option<action_response::UpdatedWidget>,
}
/// Nested message and enum types in `ActionResponse`.
pub mod action_response {
    /// List of widget autocomplete results.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SelectionItems {
        /// An array of the SelectionItem objects.
        #[prost(message, repeated, tag = "1")]
        pub items: ::prost::alloc::vec::Vec<
            super::super::super::apps::card::v1::selection_input::SelectionItem,
        >,
    }
    /// For `selectionInput` widgets, returns autocomplete suggestions for a
    /// multiselect menu.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdatedWidget {
        /// The ID of the updated widget. The ID must match the one for the
        /// widget that triggered the update request.
        #[prost(string, tag = "2")]
        pub widget: ::prost::alloc::string::String,
        /// The widget updated in response to a user action.
        #[prost(oneof = "updated_widget::UpdatedWidget", tags = "1")]
        pub updated_widget: ::core::option::Option<updated_widget::UpdatedWidget>,
    }
    /// Nested message and enum types in `UpdatedWidget`.
    pub mod updated_widget {
        /// The widget updated in response to a user action.
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum UpdatedWidget {
            /// List of widget autocomplete results
            #[prost(message, tag = "1")]
            Suggestions(super::SelectionItems),
        }
    }
    /// The type of Chat app response.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ResponseType {
        /// Default type that's handled as `NEW_MESSAGE`.
        TypeUnspecified = 0,
        /// Post as a new message in the topic.
        NewMessage = 1,
        /// Update the Chat app's message. This is only permitted on a `CARD_CLICKED`
        /// event where the message sender type is `BOT`.
        UpdateMessage = 2,
        /// Update the cards on a user's message. This is only permitted as a
        /// response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED`
        /// event where the message sender type is `HUMAN`. Text is ignored.
        UpdateUserMessageCards = 6,
        /// Privately ask the user for additional authentication or configuration.
        RequestConfig = 3,
        /// Presents a
        /// [dialog](<https://developers.google.com/workspace/chat/dialogs>).
        Dialog = 4,
        /// Widget text autocomplete options query.
        UpdateWidget = 7,
    }
    impl ResponseType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::TypeUnspecified => "TYPE_UNSPECIFIED",
                Self::NewMessage => "NEW_MESSAGE",
                Self::UpdateMessage => "UPDATE_MESSAGE",
                Self::UpdateUserMessageCards => "UPDATE_USER_MESSAGE_CARDS",
                Self::RequestConfig => "REQUEST_CONFIG",
                Self::Dialog => "DIALOG",
                Self::UpdateWidget => "UPDATE_WIDGET",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::TypeUnspecified),
                "NEW_MESSAGE" => Some(Self::NewMessage),
                "UPDATE_MESSAGE" => Some(Self::UpdateMessage),
                "UPDATE_USER_MESSAGE_CARDS" => Some(Self::UpdateUserMessageCards),
                "REQUEST_CONFIG" => Some(Self::RequestConfig),
                "DIALOG" => Some(Self::Dialog),
                "UPDATE_WIDGET" => Some(Self::UpdateWidget),
                _ => None,
            }
        }
    }
}
/// One or more interactive widgets that appear at the bottom of a message. For
/// details, see [Add interactive widgets at the bottom of a
/// message](<https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessoryWidget {
    /// The type of action.
    #[prost(oneof = "accessory_widget::Action", tags = "1")]
    pub action: ::core::option::Option<accessory_widget::Action>,
}
/// Nested message and enum types in `AccessoryWidget`.
pub mod accessory_widget {
    /// The type of action.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// A list of buttons.
        #[prost(message, tag = "1")]
        ButtonList(super::super::super::apps::card::v1::ButtonList),
    }
}
/// Request to get a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMessageRequest {
    /// Required. Resource name of the message.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    ///
    /// If you've set a custom ID for your message, you can use the value from the
    /// `clientAssignedMessageId` field for `{message}`. For details, see [Name a
    /// message]
    /// (<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request to delete a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMessageRequest {
    /// Required. Resource name of the message.
    ///
    /// Format: `spaces/{space}/messages/{message}`
    ///
    /// If you've set a custom ID for your message, you can use the value from the
    /// `clientAssignedMessageId` field for `{message}`. For details, see [Name a
    /// message]
    /// (<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. When `true`, deleting a message also deletes its threaded
    /// replies. When `false`, if a message has threaded replies, deletion fails.
    ///
    /// Only applies when [authenticating as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>).
    /// Has no effect when \[authenticating as a Chat app\]
    /// (<https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>).
    #[prost(bool, tag = "2")]
    pub force: bool,
}
/// Request to update a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMessageRequest {
    /// Required. Message with fields updated.
    #[prost(message, optional, tag = "1")]
    pub message: ::core::option::Option<Message>,
    /// Required. The field paths to update. Separate multiple values with commas
    /// or use `*` to update all field paths.
    ///
    /// Currently supported field paths:
    ///
    /// - `text`
    ///
    /// - `attachment`
    ///
    /// - `cards` (Requires [app
    /// authentication](/chat/api/guides/auth/service-accounts).)
    ///
    /// - `cards_v2`  (Requires [app
    /// authentication](/chat/api/guides/auth/service-accounts).)
    ///
    /// - `accessory_widgets`  (Requires [app
    /// authentication](/chat/api/guides/auth/service-accounts).)
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Optional. If `true` and the message isn't found, a new message is created
    /// and `updateMask` is ignored. The specified message ID must be
    /// [client-assigned](<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>)
    /// or the request fails.
    #[prost(bool, tag = "4")]
    pub allow_missing: bool,
}
/// Creates a message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMessageRequest {
    /// Required. The resource name of the space in which to create a message.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Message body.
    #[prost(message, optional, tag = "4")]
    pub message: ::core::option::Option<Message>,
    /// Optional. Deprecated: Use
    /// [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the
    /// thread. Supports up to 4000 characters. To start or add to a thread, create
    /// a message and specify a `threadKey` or the
    /// [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or
    /// reply to a message
    /// thread](<https://developers.google.com/workspace/chat/create-messages#create-message-thread>).
    #[deprecated]
    #[prost(string, tag = "6")]
    pub thread_key: ::prost::alloc::string::String,
    /// Optional. A unique request ID for this message. Specifying an existing
    /// request ID returns the message created with that ID instead of creating a
    /// new message.
    #[prost(string, tag = "7")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. Specifies whether a message starts a thread or replies to one.
    /// Only supported in named spaces.
    ///
    /// When [responding to user
    /// interactions](<https://developers.google.com/workspace/chat/receive-respond-interactions>),
    /// this field is ignored. For interactions within a thread, the reply is
    /// created in the same thread. Otherwise, the reply is created as a new
    /// thread.
    #[prost(enumeration = "create_message_request::MessageReplyOption", tag = "8")]
    pub message_reply_option: i32,
    /// Optional. A custom ID for a message. Lets Chat apps get, update, or delete
    /// a message without needing to store the system-assigned ID in the message's
    /// resource name (represented in the message `name` field).
    ///
    /// The value for this field must meet the following requirements:
    ///
    /// * Begins with `client-`. For example, `client-custom-name` is a valid
    ///    custom ID, but `custom-name` is not.
    /// * Contains up to 63 characters and only lowercase letters, numbers, and
    ///    hyphens.
    /// * Is unique within a space. A Chat app can't use the same custom ID for
    /// different messages.
    ///
    /// For details, see [Name a
    /// message](<https://developers.google.com/workspace/chat/create-messages#name_a_created_message>).
    #[prost(string, tag = "9")]
    pub message_id: ::prost::alloc::string::String,
}
/// Nested message and enum types in `CreateMessageRequest`.
pub mod create_message_request {
    /// Specifies how to reply to a message.
    /// More states might be added in the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MessageReplyOption {
        /// Default. Starts a new thread. Using this option ignores any [thread
        /// ID][google.chat.v1.Thread.name] or
        /// [`thread_key`][google.chat.v1.Thread.thread_key] that's included.
        Unspecified = 0,
        /// Creates the message as a reply to the thread specified by [thread
        /// ID][google.chat.v1.Thread.name] or
        /// [`thread_key`][google.chat.v1.Thread.thread_key]. If it fails, the
        /// message starts a new thread instead.
        ReplyMessageFallbackToNewThread = 1,
        /// Creates the message as a reply to the thread specified by [thread
        /// ID][google.chat.v1.Thread.name] or
        /// [`thread_key`][google.chat.v1.Thread.thread_key]. If a new `thread_key`
        /// is used, a new thread is created. If the message creation fails, a
        /// `NOT_FOUND` error is returned instead.
        ReplyMessageOrFail = 2,
    }
    impl MessageReplyOption {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "MESSAGE_REPLY_OPTION_UNSPECIFIED",
                Self::ReplyMessageFallbackToNewThread => {
                    "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD"
                }
                Self::ReplyMessageOrFail => "REPLY_MESSAGE_OR_FAIL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MESSAGE_REPLY_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
                "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" => {
                    Some(Self::ReplyMessageFallbackToNewThread)
                }
                "REPLY_MESSAGE_OR_FAIL" => Some(Self::ReplyMessageOrFail),
                _ => None,
            }
        }
    }
}
/// Lists messages in the specified space, that the user is a member of.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMessagesRequest {
    /// Required. The resource name of the space to list messages from.
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of messages returned. The service might return
    /// fewer messages than this value.
    ///
    /// If unspecified, at most 25 are returned.
    ///
    /// The maximum value is 1000. If you use a value more than 1000, it's
    /// automatically changed to 1000.
    ///
    /// Negative values return an `INVALID_ARGUMENT` error.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token received from a previous list messages call. Provide
    /// this parameter to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided should match the call that
    /// provided the page token. Passing different values to the other parameters
    /// might lead to unexpected results.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. A query filter.
    ///
    /// You can filter messages by date (`create_time`) and thread (`thread.name`).
    ///
    /// To filter messages by the date they were created, specify the `create_time`
    /// with a timestamp in [RFC-3339](<https://www.rfc-editor.org/rfc/rfc3339>)
    /// format and double quotation marks. For example,
    /// `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
    /// list messages that were created after a timestamp, or the less than
    /// operator `<` to list messages that were created before a timestamp. To
    /// filter messages within a time interval, use the `AND` operator between two
    /// timestamps.
    ///
    /// To filter by thread, specify the `thread.name`, formatted as
    /// `spaces/{space}/threads/{thread}`. You can only specify one
    /// `thread.name` per query.
    ///
    /// To filter by both thread and date, use the `AND` operator in your query.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// create_time > "2012-04-21T11:30:00-04:00"
    ///
    /// create_time > "2012-04-21T11:30:00-04:00" AND
    ///    thread.name = spaces/AAAAAAAAAAA/threads/123
    ///
    /// create_time > "2012-04-21T11:30:00+00:00" AND
    ///
    /// create_time < "2013-01-01T00:00:00+00:00" AND
    ///    thread.name = spaces/AAAAAAAAAAA/threads/123
    ///
    /// thread.name = spaces/AAAAAAAAAAA/threads/123
    /// ```
    ///
    /// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
    /// error.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. How the list of messages is ordered. Specify a value to order by
    /// an ordering operation. Valid ordering operation values are as follows:
    ///
    /// - `ASC` for ascending.
    ///
    /// - `DESC` for descending.
    ///
    /// The default ordering is `create_time ASC`.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
    /// Optional. Whether to include deleted messages. Deleted messages include
    /// deleted time and metadata about their deletion, but message content is
    /// unavailable.
    #[prost(bool, tag = "6")]
    pub show_deleted: bool,
}
/// Response message for listing messages.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMessagesResponse {
    /// List of messages.
    #[prost(message, repeated, tag = "1")]
    pub messages: ::prost::alloc::vec::Vec<Message>,
    /// You can send a token as `pageToken` to retrieve the next page of
    /// results. If empty, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Contains a
/// [dialog](<https://developers.google.com/workspace/chat/dialogs>) and request
/// status code.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DialogAction {
    /// Input only. Status for a request to either invoke or submit a
    /// [dialog](<https://developers.google.com/workspace/chat/dialogs>). Displays
    /// a status and message to users, if necessary.
    /// For example, in case of an error or success.
    #[prost(message, optional, tag = "2")]
    pub action_status: ::core::option::Option<ActionStatus>,
    /// Action to perform.
    #[prost(oneof = "dialog_action::Action", tags = "1")]
    pub action: ::core::option::Option<dialog_action::Action>,
}
/// Nested message and enum types in `DialogAction`.
pub mod dialog_action {
    /// Action to perform.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// Input only.
        /// [Dialog](<https://developers.google.com/workspace/chat/dialogs>) for the
        /// request.
        #[prost(message, tag = "1")]
        Dialog(super::Dialog),
    }
}
/// Wrapper around the card body of the dialog.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dialog {
    /// Input only. Body of the dialog, which is rendered in a modal.
    /// Google Chat apps don't support the following card entities:
    /// `DateTimePicker`, `OnChangeAction`.
    #[prost(message, optional, tag = "1")]
    pub body: ::core::option::Option<super::super::apps::card::v1::Card>,
}
/// A
/// [card](<https://developers.google.com/workspace/chat/api/reference/rest/v1/cards>)
/// in a Google Chat message.
///
/// Only Chat apps can create cards. If your Chat app [authenticates as a
/// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
/// the message can't contain cards.
///
/// [Card builder](<https://addons.gsuite.google.com/uikit/builder>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CardWithId {
    /// Required if the message contains multiple cards. A unique identifier for
    /// a card in a message.
    #[prost(string, tag = "1")]
    pub card_id: ::prost::alloc::string::String,
    /// A card. Maximum size is 32 KB.
    #[prost(message, optional, tag = "2")]
    pub card: ::core::option::Option<super::super::apps::card::v1::Card>,
}
/// Event payload for a new membership.
///
/// Event type: `google.workspace.chat.membership.v1.created`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipCreatedEventData {
    /// The new membership.
    #[prost(message, optional, tag = "1")]
    pub membership: ::core::option::Option<Membership>,
}
/// Event payload for a deleted membership.
///
/// Event type: `google.workspace.chat.membership.v1.deleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipDeletedEventData {
    /// The deleted membership. Only the `name` and `state` fields are populated.
    #[prost(message, optional, tag = "1")]
    pub membership: ::core::option::Option<Membership>,
}
/// Event payload for an updated membership.
///
/// Event type: `google.workspace.chat.membership.v1.updated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipUpdatedEventData {
    /// The updated membership.
    #[prost(message, optional, tag = "1")]
    pub membership: ::core::option::Option<Membership>,
}
/// Event payload for multiple new memberships.
///
/// Event type: `google.workspace.chat.membership.v1.batchCreated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipBatchCreatedEventData {
    /// A list of new memberships.
    #[prost(message, repeated, tag = "1")]
    pub memberships: ::prost::alloc::vec::Vec<MembershipCreatedEventData>,
}
/// Event payload for multiple updated memberships.
///
/// Event type: `google.workspace.chat.membership.v1.batchUpdated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipBatchUpdatedEventData {
    /// A list of updated memberships.
    #[prost(message, repeated, tag = "1")]
    pub memberships: ::prost::alloc::vec::Vec<MembershipUpdatedEventData>,
}
/// Event payload for multiple deleted memberships.
///
/// Event type: `google.workspace.chat.membership.v1.batchDeleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipBatchDeletedEventData {
    /// A list of deleted memberships.
    #[prost(message, repeated, tag = "1")]
    pub memberships: ::prost::alloc::vec::Vec<MembershipDeletedEventData>,
}
/// Event payload for a new message.
///
/// Event type: `google.workspace.chat.message.v1.created`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageCreatedEventData {
    /// The new message.
    #[prost(message, optional, tag = "1")]
    pub message: ::core::option::Option<Message>,
}
/// Event payload for an updated message.
///
/// Event type: `google.workspace.chat.message.v1.updated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageUpdatedEventData {
    /// The updated message.
    #[prost(message, optional, tag = "1")]
    pub message: ::core::option::Option<Message>,
}
/// Event payload for a deleted message.
///
/// Event type: `google.workspace.chat.message.v1.deleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageDeletedEventData {
    /// The deleted message. Only the `name`, `createTime`, `deleteTime`, and
    /// `deletionMetadata` fields are populated.
    #[prost(message, optional, tag = "1")]
    pub message: ::core::option::Option<Message>,
}
/// Event payload for multiple new messages.
///
/// Event type: `google.workspace.chat.message.v1.batchCreated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageBatchCreatedEventData {
    /// A list of new messages.
    #[prost(message, repeated, tag = "1")]
    pub messages: ::prost::alloc::vec::Vec<MessageCreatedEventData>,
}
/// Event payload for multiple updated messages.
///
/// Event type: `google.workspace.chat.message.v1.batchUpdated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageBatchUpdatedEventData {
    /// A list of updated messages.
    #[prost(message, repeated, tag = "1")]
    pub messages: ::prost::alloc::vec::Vec<MessageUpdatedEventData>,
}
/// Event payload for multiple deleted messages.
///
/// Event type: `google.workspace.chat.message.v1.batchDeleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageBatchDeletedEventData {
    /// A list of deleted messages.
    #[prost(message, repeated, tag = "1")]
    pub messages: ::prost::alloc::vec::Vec<MessageDeletedEventData>,
}
/// Event payload for an updated space.
///
/// Event type: `google.workspace.chat.space.v1.updated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpaceUpdatedEventData {
    /// The updated space.
    #[prost(message, optional, tag = "1")]
    pub space: ::core::option::Option<Space>,
}
/// Event payload for multiple updates to a space.
///
/// Event type: `google.workspace.chat.space.v1.batchUpdated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpaceBatchUpdatedEventData {
    /// A list of updated spaces.
    #[prost(message, repeated, tag = "1")]
    pub spaces: ::prost::alloc::vec::Vec<SpaceUpdatedEventData>,
}
/// Event payload for a new reaction.
///
/// Event type: `google.workspace.chat.reaction.v1.created`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReactionCreatedEventData {
    /// The new reaction.
    #[prost(message, optional, tag = "1")]
    pub reaction: ::core::option::Option<Reaction>,
}
/// Event payload for a deleted reaction.
///
/// Type: `google.workspace.chat.reaction.v1.deleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReactionDeletedEventData {
    /// The deleted reaction.
    #[prost(message, optional, tag = "1")]
    pub reaction: ::core::option::Option<Reaction>,
}
/// Event payload for multiple new reactions.
///
/// Event type: `google.workspace.chat.reaction.v1.batchCreated`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReactionBatchCreatedEventData {
    /// A list of new reactions.
    #[prost(message, repeated, tag = "1")]
    pub reactions: ::prost::alloc::vec::Vec<ReactionCreatedEventData>,
}
/// Event payload for multiple deleted reactions.
///
/// Event type: `google.workspace.chat.reaction.v1.batchDeleted`
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReactionBatchDeletedEventData {
    /// A list of deleted reactions.
    #[prost(message, repeated, tag = "1")]
    pub reactions: ::prost::alloc::vec::Vec<ReactionDeletedEventData>,
}
/// An event that represents a change or activity in a Google Chat space. To
/// learn more, see [Work with events from Google
/// Chat](<https://developers.google.com/workspace/chat/events-overview>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpaceEvent {
    /// Resource name of the space event.
    ///
    /// Format: `spaces/{space}/spaceEvents/{spaceEvent}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Time when the event occurred.
    #[prost(message, optional, tag = "3")]
    pub event_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Type of space event. Each event type has a batch version, which
    /// represents multiple instances of the event type that occur in a short
    /// period of time. For `spaceEvents.list()` requests, omit batch event types
    /// in your query filter. By default, the server returns both event type and
    /// its batch version.
    ///
    /// Supported event types for
    /// [messages](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages>):
    ///
    ///     * New message: `google.workspace.chat.message.v1.created`
    ///     * Updated message: `google.workspace.chat.message.v1.updated`
    ///     * Deleted message: `google.workspace.chat.message.v1.deleted`
    ///     * Multiple new messages: `google.workspace.chat.message.v1.batchCreated`
    ///     * Multiple updated messages:
    ///     `google.workspace.chat.message.v1.batchUpdated`
    ///     * Multiple deleted messages:
    ///     `google.workspace.chat.message.v1.batchDeleted`
    ///
    /// Supported event types for
    /// [memberships](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members>):
    ///
    ///    * New membership: `google.workspace.chat.membership.v1.created`
    ///    * Updated membership: `google.workspace.chat.membership.v1.updated`
    ///    * Deleted membership: `google.workspace.chat.membership.v1.deleted`
    ///    * Multiple new memberships:
    ///    `google.workspace.chat.membership.v1.batchCreated`
    ///    * Multiple updated memberships:
    ///    `google.workspace.chat.membership.v1.batchUpdated`
    ///    * Multiple deleted memberships:
    ///    `google.workspace.chat.membership.v1.batchDeleted`
    ///
    /// Supported event types for
    /// [reactions](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions>):
    ///
    ///    * New reaction: `google.workspace.chat.reaction.v1.created`
    ///    * Deleted reaction: `google.workspace.chat.reaction.v1.deleted`
    ///    * Multiple new reactions:
    ///    `google.workspace.chat.reaction.v1.batchCreated`
    ///    * Multiple deleted reactions:
    ///    `google.workspace.chat.reaction.v1.batchDeleted`
    ///
    /// Supported event types about the
    /// [space](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces>):
    ///
    ///    * Updated space: `google.workspace.chat.space.v1.updated`
    ///    * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated`
    #[prost(string, tag = "6")]
    pub event_type: ::prost::alloc::string::String,
    #[prost(
        oneof = "space_event::Payload",
        tags = "12, 13, 14, 26, 27, 28, 15, 29, 17, 18, 219, 31, 32, 33, 21, 22, 34, 35"
    )]
    pub payload: ::core::option::Option<space_event::Payload>,
}
/// Nested message and enum types in `SpaceEvent`.
pub mod space_event {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// Event payload for a new message.
        ///
        /// Event type: `google.workspace.chat.message.v1.created`
        #[prost(message, tag = "12")]
        MessageCreatedEventData(super::MessageCreatedEventData),
        /// Event payload for an updated message.
        ///
        /// Event type: `google.workspace.chat.message.v1.updated`
        #[prost(message, tag = "13")]
        MessageUpdatedEventData(super::MessageUpdatedEventData),
        /// Event payload for a deleted message.
        ///
        /// Event type: `google.workspace.chat.message.v1.deleted`
        #[prost(message, tag = "14")]
        MessageDeletedEventData(super::MessageDeletedEventData),
        /// Event payload for multiple new messages.
        ///
        /// Event type: `google.workspace.chat.message.v1.batchCreated`
        #[prost(message, tag = "26")]
        MessageBatchCreatedEventData(super::MessageBatchCreatedEventData),
        /// Event payload for multiple updated messages.
        ///
        /// Event type: `google.workspace.chat.message.v1.batchUpdated`
        #[prost(message, tag = "27")]
        MessageBatchUpdatedEventData(super::MessageBatchUpdatedEventData),
        /// Event payload for multiple deleted messages.
        ///
        /// Event type: `google.workspace.chat.message.v1.batchDeleted`
        #[prost(message, tag = "28")]
        MessageBatchDeletedEventData(super::MessageBatchDeletedEventData),
        /// Event payload for a space update.
        ///
        /// Event type: `google.workspace.chat.space.v1.updated`
        #[prost(message, tag = "15")]
        SpaceUpdatedEventData(super::SpaceUpdatedEventData),
        /// Event payload for multiple updates to a space.
        ///
        /// Event type: `google.workspace.chat.space.v1.batchUpdated`
        #[prost(message, tag = "29")]
        SpaceBatchUpdatedEventData(super::SpaceBatchUpdatedEventData),
        /// Event payload for a new membership.
        ///
        /// Event type: `google.workspace.chat.membership.v1.created`
        #[prost(message, tag = "17")]
        MembershipCreatedEventData(super::MembershipCreatedEventData),
        /// Event payload for an updated membership.
        ///
        /// Event type: `google.workspace.chat.membership.v1.updated`
        #[prost(message, tag = "18")]
        MembershipUpdatedEventData(super::MembershipUpdatedEventData),
        /// Event payload for a deleted membership.
        ///
        /// Event type: `google.workspace.chat.membership.v1.deleted`
        #[prost(message, tag = "219")]
        MembershipDeletedEventData(super::MembershipDeletedEventData),
        /// Event payload for multiple new memberships.
        ///
        /// Event type: `google.workspace.chat.membership.v1.batchCreated`
        #[prost(message, tag = "31")]
        MembershipBatchCreatedEventData(super::MembershipBatchCreatedEventData),
        /// Event payload for multiple updated memberships.
        ///
        /// Event type: `google.workspace.chat.membership.v1.batchUpdated`
        #[prost(message, tag = "32")]
        MembershipBatchUpdatedEventData(super::MembershipBatchUpdatedEventData),
        /// Event payload for multiple deleted memberships.
        ///
        /// Event type: `google.workspace.chat.membership.v1.batchDeleted`
        #[prost(message, tag = "33")]
        MembershipBatchDeletedEventData(super::MembershipBatchDeletedEventData),
        /// Event payload for a new reaction.
        ///
        /// Event type: `google.workspace.chat.reaction.v1.created`
        #[prost(message, tag = "21")]
        ReactionCreatedEventData(super::ReactionCreatedEventData),
        /// Event payload for a deleted reaction.
        ///
        /// Event type: `google.workspace.chat.reaction.v1.deleted`
        #[prost(message, tag = "22")]
        ReactionDeletedEventData(super::ReactionDeletedEventData),
        /// Event payload for multiple new reactions.
        ///
        /// Event type: `google.workspace.chat.reaction.v1.batchCreated`
        #[prost(message, tag = "34")]
        ReactionBatchCreatedEventData(super::ReactionBatchCreatedEventData),
        /// Event payload for multiple deleted reactions.
        ///
        /// Event type: `google.workspace.chat.reaction.v1.batchDeleted`
        #[prost(message, tag = "35")]
        ReactionBatchDeletedEventData(super::ReactionBatchDeletedEventData),
    }
}
/// Request message for getting a space event.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpaceEventRequest {
    /// Required. The resource name of the space event.
    ///
    /// Format: `spaces/{space}/spaceEvents/{spaceEvent}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for listing space events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpaceEventsRequest {
    /// Required. Resource name of the [Google Chat
    /// space](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces>)
    /// where the events occurred.
    ///
    /// Format: `spaces/{space}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of space events returned. The service might
    /// return fewer than this value.
    ///
    /// Negative values return an `INVALID_ARGUMENT` error.
    #[prost(int32, tag = "5")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous list space events call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to list space events must
    /// match the call that provided the page token. Passing different values to
    /// the other parameters might lead to unexpected results.
    #[prost(string, tag = "6")]
    pub page_token: ::prost::alloc::string::String,
    /// Required. A query filter.
    ///
    /// You must specify at least one event type (`event_type`)
    /// using the has `:` operator. To filter by multiple event types, use the `OR`
    /// operator. Omit batch event types in your filter. The request automatically
    /// returns any related batch events. For example, if you filter by new
    /// reactions
    /// (`google.workspace.chat.reaction.v1.created`), the server also returns
    /// batch new reactions events
    /// (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
    /// event types, see the [`SpaceEvents` reference
    /// documentation](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type>).
    ///
    /// Optionally, you can also filter by start time (`start_time`) and
    /// end time (`end_time`):
    ///
    /// * `start_time`: Exclusive timestamp from which to start listing space
    /// events.
    ///   You can list events that occurred up to 28 days ago. If unspecified, lists
    ///   space events from the past 28 days.
    /// * `end_time`: Inclusive timestamp until which space events are listed.
    ///   If unspecified, lists events up to the time of the request.
    ///
    /// To specify a start or end time, use the equals `=` operator and format in
    /// [RFC-3339](<https://www.rfc-editor.org/rfc/rfc3339>). To filter by both
    /// `start_time` and `end_time`, use the `AND` operator.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// start_time="2023-08-23T19:20:33+00:00" AND
    /// end_time="2023-08-23T19:21:54+00:00"
    /// ```
    /// ```
    /// start_time="2023-08-23T19:20:33+00:00" AND
    /// (event_types:"google.workspace.chat.space.v1.updated" OR
    /// event_types:"google.workspace.chat.message.v1.created")
    /// ```
    ///
    /// The following queries are invalid:
    ///
    /// ```
    /// start_time="2023-08-23T19:20:33+00:00" OR
    /// end_time="2023-08-23T19:21:54+00:00"
    /// ```
    /// ```
    /// event_types:"google.workspace.chat.space.v1.updated" AND
    /// event_types:"google.workspace.chat.message.v1.created"
    /// ```
    ///
    /// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
    /// error.
    #[prost(string, tag = "8")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message for listing space events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpaceEventsResponse {
    /// Results are returned in chronological order (oldest event first).
    /// Note: The `permissionSettings` field is not returned in the Space
    /// object for list requests.
    #[prost(message, repeated, tag = "1")]
    pub space_events: ::prost::alloc::vec::Vec<SpaceEvent>,
    /// Continuation token used to fetch more events.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// A user's read state within a space, used to identify read and unread
/// messages.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpaceReadState {
    /// Resource name of the space read state.
    ///
    /// Format: `users/{user}/spaces/{space}/spaceReadState`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The time when the user's space read state was updated. Usually
    /// this corresponds with either the timestamp of the last read message, or a
    /// timestamp specified by the user to mark the last read position in a space.
    #[prost(message, optional, tag = "2")]
    pub last_read_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request message for GetSpaceReadState API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpaceReadStateRequest {
    /// Required. Resource name of the space read state to retrieve.
    ///
    /// Only supports getting read state for the calling user.
    ///
    /// To refer to the calling user, set one of the following:
    ///
    /// - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
    ///
    /// - Their Workspace email address. For example,
    /// `users/user@example.com/spaces/{space}/spaceReadState`.
    ///
    /// - Their user id. For example,
    /// `users/123456789/spaces/{space}/spaceReadState`.
    ///
    /// Format: users/{user}/spaces/{space}/spaceReadState
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for UpdateSpaceReadState API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSpaceReadStateRequest {
    /// Required. The space read state and fields to update.
    ///
    /// Only supports updating read state for the calling user.
    ///
    /// To refer to the calling user, set one of the following:
    ///
    /// - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
    ///
    /// - Their Workspace email address. For example,
    /// `users/user@example.com/spaces/{space}/spaceReadState`.
    ///
    /// - Their user id. For example,
    /// `users/123456789/spaces/{space}/spaceReadState`.
    ///
    /// Format: users/{user}/spaces/{space}/spaceReadState
    #[prost(message, optional, tag = "1")]
    pub space_read_state: ::core::option::Option<SpaceReadState>,
    /// Required. The field paths to update. Currently supported field paths:
    ///
    /// - `last_read_time`
    ///
    /// When the `last_read_time` is before the latest message create time, the
    /// space appears as unread in the UI.
    ///
    /// To mark the space as read, set `last_read_time` to any value later (larger)
    /// than the latest message create time. The `last_read_time` is coerced to
    /// match the latest message create time. Note that the space read state only
    /// affects the read state of messages that are visible in the space's
    /// top-level conversation. Replies in threads are unaffected by this
    /// timestamp, and instead rely on the thread read state.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request to create a space and add specified users to it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetUpSpaceRequest {
    /// Required. The `Space.spaceType` field is required.
    ///
    /// To create a space, set `Space.spaceType` to `SPACE` and set
    /// `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when
    /// setting up a space, try a different `displayName`. An existing space
    /// within the Google Workspace organization might already use this display
    /// name.
    ///
    /// To create a group chat, set `Space.spaceType` to
    /// `GROUP_CHAT`. Don't set `Space.displayName`.
    ///
    /// To create a 1:1 conversation between humans,
    /// set `Space.spaceType` to `DIRECT_MESSAGE` and set
    /// `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or
    /// `Space.spaceDetails`.
    ///
    /// To create an 1:1 conversation between a human and the calling Chat app, set
    /// `Space.spaceType` to `DIRECT_MESSAGE` and
    /// `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or
    /// `Space.spaceDetails`.
    ///
    /// If a `DIRECT_MESSAGE` space already exists, that space is returned instead
    /// of creating a new space.
    #[prost(message, optional, tag = "1")]
    pub space: ::core::option::Option<Space>,
    /// Optional. A unique identifier for this request.
    /// A random UUID is recommended.
    /// Specifying an existing request ID returns the space created with that ID
    /// instead of creating a new space.
    /// Specifying an existing request ID from the same Chat app with a different
    /// authenticated user returns an error.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The Google Chat users or groups to invite to join the space. Omit
    /// the calling user, as they are added automatically.
    ///
    /// The set currently allows up to 20 memberships (in addition to the caller).
    ///
    /// For human membership, the `Membership.member` field must contain a `user`
    /// with `name` populated (format: `users/{user}`) and `type` set to
    /// `User.Type.HUMAN`. You can only add human users when setting up a space
    /// (adding Chat apps is only supported for direct message setup with the
    /// calling app). You can also add members using the user's email as an alias
    /// for {user}. For example, the `user.name` can be `users/example@gmail.com`.
    /// To invite Gmail users or users from external Google Workspace domains,
    /// user's email must be used for `{user}`.
    ///
    /// For Google group membership, the `Membership.group_member` field must
    /// contain a `group` with `name` populated (format `groups/{group}`). You
    /// can only add Google groups when setting `Space.spaceType` to `SPACE`.
    ///
    /// Optional when setting `Space.spaceType` to `SPACE`.
    ///
    /// Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
    /// least two memberships.
    ///
    /// Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human
    /// user, along with exactly one membership.
    ///
    /// Must be empty when creating a 1:1 conversation between a human and the
    /// calling Chat app (when setting `Space.spaceType` to
    /// `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
    #[prost(message, repeated, tag = "4")]
    pub memberships: ::prost::alloc::vec::Vec<Membership>,
}
/// A user's read state within a thread, used to identify read and unread
/// messages.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ThreadReadState {
    /// Resource name of the thread read state.
    ///
    /// Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The time when the user's thread read state was updated. Usually this
    /// corresponds with the timestamp of the last read message in a thread.
    #[prost(message, optional, tag = "2")]
    pub last_read_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request message for GetThreadReadStateRequest API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetThreadReadStateRequest {
    /// Required. Resource name of the thread read state to retrieve.
    ///
    /// Only supports getting read state for the calling user.
    ///
    /// To refer to the calling user, set one of the following:
    ///
    /// - The `me` alias. For example,
    /// `users/me/spaces/{space}/threads/{thread}/threadReadState`.
    ///
    /// - Their Workspace email address. For example,
    /// `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`.
    ///
    /// - Their user id. For example,
    /// `users/123456789/spaces/{space}/threads/{thread}/threadReadState`.
    ///
    /// Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod chat_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Enables developers to build Chat apps and
    /// integrations on Google Chat Platform.
    #[derive(Debug, Clone)]
    pub struct ChatServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> ChatServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> ChatServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            ChatServiceClient::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
        }
        /// Creates a message in a Google Chat space. For an example, see [Send a
        /// message](https://developers.google.com/workspace/chat/create-messages).
        ///
        /// The `create()` method requires either [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// or [app
        /// authentication](https://developers.google.com/workspace/chat/authorize-import).
        /// Chat attributes the message sender differently depending on the type of
        /// authentication that you use in your request.
        ///
        /// The following image shows how Chat attributes a message when you use app
        /// authentication. Chat displays the Chat app as the message
        /// sender. The content of the message can contain text (`text`), cards
        /// (`cardsV2`), and accessory widgets (`accessoryWidgets`).
        ///
        /// ![Message sent with app
        /// authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg)
        ///
        /// The following image shows how Chat attributes a message when you use user
        /// authentication. Chat displays the user as the message sender and attributes
        /// the Chat app to the message by displaying its name. The content of message
        /// can only contain text (`text`).
        ///
        /// ![Message sent with user
        /// authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg)
        ///
        /// The maximum message size, including the message contents, is 32,000 bytes.
        ///
        /// For
        /// [webhook](https://developers.google.com/workspace/chat/quickstart/webhooks)
        /// requests, the response doesn't contain the full message. The response only
        /// populates the `name` and `thread.name` fields in addition to the
        /// information that was in the request.
        pub async fn create_message(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMessageRequest>,
        ) -> std::result::Result<tonic::Response<super::Message>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/CreateMessage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "CreateMessage"));
            self.inner.unary(req, path, codec).await
        }
        /// Lists messages in a space that the caller is a member of, including
        /// messages from blocked members and spaces. If you list messages from a
        /// space with no messages, the response is an empty object. When using a
        /// REST/HTTP interface, the response contains an empty JSON object, `{}`.
        /// For an example, see
        /// [List
        /// messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn list_messages(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMessagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMessagesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/ListMessages",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "ListMessages"));
            self.inner.unary(req, path, codec).await
        }
        /// Lists memberships in a space. For an example, see [List users and Google
        /// Chat apps in a
        /// space](https://developers.google.com/workspace/chat/list-members). Listing
        /// memberships with [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// lists memberships in spaces that the Chat app has
        /// access to, but excludes Chat app memberships,
        /// including its own. Listing memberships with
        /// [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// lists memberships in spaces that the authenticated user has access to.
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn list_memberships(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMembershipsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMembershipsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/ListMemberships",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "ListMemberships"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns details about a membership. For an example, see
        /// [Get details about a user's or Google Chat app's
        /// membership](https://developers.google.com/workspace/chat/get-members).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn get_membership(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMembershipRequest>,
        ) -> std::result::Result<tonic::Response<super::Membership>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetMembership",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "GetMembership"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns details about a message.
        /// For an example, see [Get details about a
        /// message](https://developers.google.com/workspace/chat/get-messages).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        ///
        /// Note: Might return a message from a blocked member or space.
        pub async fn get_message(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMessageRequest>,
        ) -> std::result::Result<tonic::Response<super::Message>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetMessage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "GetMessage"));
            self.inner.unary(req, path, codec).await
        }
        /// Updates a message. There's a difference between the `patch` and `update`
        /// methods. The `patch`
        /// method uses a `patch` request while the `update` method uses a `put`
        /// request. We recommend using the `patch` method. For an example, see
        /// [Update a
        /// message](https://developers.google.com/workspace/chat/update-messages).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        ///
        /// When using app authentication, requests can only update messages
        /// created by the calling Chat app.
        pub async fn update_message(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMessageRequest>,
        ) -> std::result::Result<tonic::Response<super::Message>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/UpdateMessage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "UpdateMessage"));
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a message.
        /// For an example, see [Delete a
        /// message](https://developers.google.com/workspace/chat/delete-messages).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        ///
        /// When using app authentication, requests can only delete messages
        /// created by the calling Chat app.
        pub async fn delete_message(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteMessageRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/DeleteMessage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "DeleteMessage"));
            self.inner.unary(req, path, codec).await
        }
        /// Gets the metadata of a message attachment. The attachment data is fetched
        /// using the [media
        /// API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
        /// For an example, see
        /// [Get metadata about a message
        /// attachment](https://developers.google.com/workspace/chat/get-media-attachments).
        /// Requires [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
        pub async fn get_attachment(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAttachmentRequest>,
        ) -> std::result::Result<tonic::Response<super::Attachment>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetAttachment",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "GetAttachment"));
            self.inner.unary(req, path, codec).await
        }
        /// Uploads an attachment. For an example, see
        /// [Upload media as a file
        /// attachment](https://developers.google.com/workspace/chat/upload-media-attachments).
        ///
        /// Requires user
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        ///
        /// You can upload attachments up to 200 MB. Certain file types aren't
        /// supported. For details, see [File types blocked by Google
        /// Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
        pub async fn upload_attachment(
            &mut self,
            request: impl tonic::IntoRequest<super::UploadAttachmentRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UploadAttachmentResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/UploadAttachment",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "UploadAttachment"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists spaces the caller is a member of. Group chats and DMs aren't listed
        /// until the first message is sent. For an example, see
        /// [List
        /// spaces](https://developers.google.com/workspace/chat/list-spaces).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        ///
        /// To list all named spaces by Google Workspace organization, use the
        /// [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
        /// method using Workspace administrator privileges instead.
        pub async fn list_spaces(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSpacesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListSpacesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/ListSpaces",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "ListSpaces"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns a list of spaces in a Google Workspace organization based on an
        /// administrator's search.
        ///
        /// Requires [user
        /// authentication with administrator
        /// privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges).
        /// In the request, set `use_admin_access` to `true`.
        pub async fn search_spaces(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchSpacesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchSpacesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/SearchSpaces",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "SearchSpaces"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns details about a space. For an example, see
        /// [Get details about a
        /// space](https://developers.google.com/workspace/chat/get-spaces).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn get_space(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSpaceRequest>,
        ) -> std::result::Result<tonic::Response<super::Space>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "GetSpace"));
            self.inner.unary(req, path, codec).await
        }
        /// Creates a space with no members. Can be used to create a named space, or a
        /// group chat in `Import mode`. For an example, see [Create a
        /// space](https://developers.google.com/workspace/chat/create-spaces).
        ///
        ///  If you receive the error message `ALREADY_EXISTS` when creating
        ///  a space, try a different `displayName`. An existing space within
        ///  the Google Workspace organization might already use this display name.
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        ///
        /// When authenticating as an app, the `space.customer` field must be set in
        /// the request.
        pub async fn create_space(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateSpaceRequest>,
        ) -> std::result::Result<tonic::Response<super::Space>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/CreateSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "CreateSpace"));
            self.inner.unary(req, path, codec).await
        }
        /// Creates a space and adds specified users to it. The calling user is
        /// automatically added to the space, and shouldn't be specified as a
        /// membership in the request. For an example, see
        /// [Set up a space with initial
        /// members](https://developers.google.com/workspace/chat/set-up-spaces).
        ///
        /// To specify the human members to add, add memberships with the appropriate
        /// `membership.member.name`. To add a human user, use `users/{user}`, where
        /// `{user}` can be the email address for the user. For users in the same
        /// Workspace organization `{user}` can also be the `id` for the person from
        /// the People API, or the `id` for the user in the Directory API. For example,
        /// if the People API Person profile ID for `user@example.com` is `123456789`,
        /// you can add the user to the space by setting the `membership.member.name`
        /// to `users/user@example.com` or `users/123456789`.
        ///
        /// To specify the Google groups to add, add memberships with the
        /// appropriate `membership.group_member.name`. To add or invite a Google
        /// group, use `groups/{group}`, where `{group}` is the `id` for the group from
        /// the Cloud Identity Groups API. For example, you can use [Cloud Identity
        /// Groups lookup
        /// API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
        /// to retrieve the ID `123456789` for group email `group@example.com`, then
        /// you can add the group to the space by setting the
        /// `membership.group_member.name` to `groups/123456789`. Group email is not
        /// supported, and Google groups can only be added as members in named spaces.
        ///
        /// For a named space or group chat, if the caller blocks, or is blocked
        /// by some members, or doesn't have permission to add some members, then
        /// those members aren't added to the created space.
        ///
        /// To create a direct message (DM) between the calling user and another human
        /// user, specify exactly one membership to represent the human user. If
        /// one user blocks the other, the request fails and the DM isn't created.
        ///
        /// To create a DM between the calling user and the calling app, set
        /// `Space.singleUserBotDm` to `true` and don't specify any memberships. You
        /// can only use this method to set up a DM with the calling app. To add the
        /// calling app as a member of a space or an existing DM between two human
        /// users, see
        /// [Invite or add a user or app to a
        /// space](https://developers.google.com/workspace/chat/create-members).
        ///
        /// If a DM already exists between two users, even when one user blocks the
        /// other at the time a request is made, then the existing DM is returned.
        ///
        /// Spaces with threaded replies aren't supported. If you receive the error
        /// message `ALREADY_EXISTS` when setting up a space, try a different
        /// `displayName`. An existing space within the Google Workspace organization
        /// might already use this display name.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn set_up_space(
            &mut self,
            request: impl tonic::IntoRequest<super::SetUpSpaceRequest>,
        ) -> std::result::Result<tonic::Response<super::Space>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/SetUpSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "SetUpSpace"));
            self.inner.unary(req, path, codec).await
        }
        /// Updates a space. For an example, see
        /// [Update a
        /// space](https://developers.google.com/workspace/chat/update-spaces).
        ///
        /// If you're updating the `displayName` field and receive the error message
        /// `ALREADY_EXISTS`, try a different display name.. An existing space within
        /// the Google Workspace organization might already use this display name.
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn update_space(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateSpaceRequest>,
        ) -> std::result::Result<tonic::Response<super::Space>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/UpdateSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "UpdateSpace"));
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a named space. Always performs a cascading delete, which means
        /// that the space's child resources—like messages posted in the space and
        /// memberships in the space—are also deleted. For an example, see
        /// [Delete a
        /// space](https://developers.google.com/workspace/chat/delete-spaces).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn delete_space(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteSpaceRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/DeleteSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "DeleteSpace"));
            self.inner.unary(req, path, codec).await
        }
        /// Completes the
        /// [import process](https://developers.google.com/workspace/chat/import-data)
        /// for the specified space and makes it visible to users.
        ///
        /// Requires [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and domain-wide delegation. For more information, see [Authorize Google
        /// Chat apps to import
        /// data](https://developers.google.com/workspace/chat/authorize-import).
        pub async fn complete_import_space(
            &mut self,
            request: impl tonic::IntoRequest<super::CompleteImportSpaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CompleteImportSpaceResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/CompleteImportSpace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "CompleteImportSpace"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the existing direct message with the specified user. If no direct
        /// message space is found, returns a `404 NOT_FOUND` error. For an example,
        /// see
        /// [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message).
        ///
        /// With [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
        /// returns the direct message space between the specified user and the calling
        /// Chat app.
        ///
        /// With [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
        /// returns the direct message space between the specified user and the
        /// authenticated user.
        ///
        /// // Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        pub async fn find_direct_message(
            &mut self,
            request: impl tonic::IntoRequest<super::FindDirectMessageRequest>,
        ) -> std::result::Result<tonic::Response<super::Space>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/FindDirectMessage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "FindDirectMessage"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a membership for the calling Chat app, a user, or a Google Group.
        /// Creating memberships for other Chat apps isn't supported.
        /// When creating a membership, if the specified member has their auto-accept
        /// policy turned off, then they're invited, and must accept the space
        /// invitation before joining. Otherwise, creating a membership adds the member
        /// directly to the specified space.
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        ///
        /// For example usage, see:
        ///
        /// - [Invite or add a user to a
        /// space](https://developers.google.com/workspace/chat/create-members#create-user-membership).
        ///
        /// - [Invite or add a Google Group to a
        /// space](https://developers.google.com/workspace/chat/create-members#create-group-membership).
        ///
        /// - [Add the Chat app to a
        /// space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api).
        pub async fn create_membership(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMembershipRequest>,
        ) -> std::result::Result<tonic::Response<super::Membership>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/CreateMembership",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "CreateMembership"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a membership. For an example, see [Update a user's membership in
        /// a space](https://developers.google.com/workspace/chat/update-members).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn update_membership(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMembershipRequest>,
        ) -> std::result::Result<tonic::Response<super::Membership>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/UpdateMembership",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "UpdateMembership"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a membership. For an example, see
        /// [Remove a user or a Google Chat app from a
        /// space](https://developers.google.com/workspace/chat/delete-members).
        ///
        /// Supports the following types of
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
        ///
        /// - [App
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// with [administrator approval](https://support.google.com/a?p=chat-app-auth)
        /// in [Developer Preview](https://developers.google.com/workspace/preview)
        ///
        /// - [User
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// You can authenticate and authorize this method with administrator
        /// privileges by setting the `use_admin_access` field in the request.
        pub async fn delete_membership(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteMembershipRequest>,
        ) -> std::result::Result<tonic::Response<super::Membership>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/DeleteMembership",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "DeleteMembership"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a reaction and adds it to a message. Only unicode emojis are
        /// supported. For an example, see
        /// [Add a reaction to a
        /// message](https://developers.google.com/workspace/chat/create-reactions).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn create_reaction(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateReactionRequest>,
        ) -> std::result::Result<tonic::Response<super::Reaction>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/CreateReaction",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "CreateReaction"));
            self.inner.unary(req, path, codec).await
        }
        /// Lists reactions to a message. For an example, see
        /// [List reactions for a
        /// message](https://developers.google.com/workspace/chat/list-reactions).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn list_reactions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListReactionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListReactionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/ListReactions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "ListReactions"));
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a reaction to a message. Only unicode emojis are supported.
        /// For an example, see
        /// [Delete a
        /// reaction](https://developers.google.com/workspace/chat/delete-reactions).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn delete_reaction(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteReactionRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/DeleteReaction",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "DeleteReaction"));
            self.inner.unary(req, path, codec).await
        }
        /// Returns details about a user's read state within a space, used to identify
        /// read and unread messages. For an example, see [Get details about a user's
        /// space read
        /// state](https://developers.google.com/workspace/chat/get-space-read-state).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn get_space_read_state(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSpaceReadStateRequest>,
        ) -> std::result::Result<tonic::Response<super::SpaceReadState>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetSpaceReadState",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "GetSpaceReadState"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a user's read state within a space, used to identify read and
        /// unread messages. For an example, see [Update a user's space read
        /// state](https://developers.google.com/workspace/chat/update-space-read-state).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn update_space_read_state(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateSpaceReadStateRequest>,
        ) -> std::result::Result<tonic::Response<super::SpaceReadState>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/UpdateSpaceReadState",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "UpdateSpaceReadState"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns details about a user's read state within a thread, used to identify
        /// read and unread messages. For an example, see [Get details about a user's
        /// thread read
        /// state](https://developers.google.com/workspace/chat/get-thread-read-state).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        pub async fn get_thread_read_state(
            &mut self,
            request: impl tonic::IntoRequest<super::GetThreadReadStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ThreadReadState>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetThreadReadState",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "GetThreadReadState"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns an event from a Google Chat space. The [event
        /// payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
        /// contains the most recent version of the resource that changed. For example,
        /// if you request an event about a new message but the message was later
        /// updated, the server returns the updated `Message` resource in the event
        /// payload.
        ///
        /// Note: The `permissionSettings` field is not returned in the Space
        /// object of the Space event data for this request.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        /// To get an event, the authenticated user must be a member of the space.
        ///
        /// For an example, see [Get details about an
        /// event from a Google Chat
        /// space](https://developers.google.com/workspace/chat/get-space-event).
        pub async fn get_space_event(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSpaceEventRequest>,
        ) -> std::result::Result<tonic::Response<super::SpaceEvent>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/GetSpaceEvent",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("google.chat.v1.ChatService", "GetSpaceEvent"));
            self.inner.unary(req, path, codec).await
        }
        /// Lists events from a Google Chat space. For each event, the
        /// [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
        /// contains the most recent version of the Chat resource. For example, if you
        /// list events about new space members, the server returns `Membership`
        /// resources that contain the latest membership details. If new members were
        /// removed during the requested period, the event payload contains an empty
        /// `Membership` resource.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        /// To list events, the authenticated user must be a member of the space.
        ///
        /// For an example, see [List events from a Google Chat
        /// space](https://developers.google.com/workspace/chat/list-space-events).
        pub async fn list_space_events(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSpaceEventsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListSpaceEventsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.chat.v1.ChatService/ListSpaceEvents",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("google.chat.v1.ChatService", "ListSpaceEvents"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}