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
// This file is @generated by prost-build.
/// An attachment in Google Chat.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attachment {
    /// Resource name of the attachment, in the form
    /// `spaces/*/messages/*/attachments/*`.
    #[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 {
                Source::Unspecified => "SOURCE_UNSPECIFIED",
                Source::DriveFile => "DRIVE_FILE",
                Source::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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum DataRef {
        /// A reference to the attachment data. This field is used 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttachmentDataRef {
    /// 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,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAttachmentRequest {
    /// Required. Resource name of the attachment, in the form
    /// `spaces/*/messages/*/attachments/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request to upload an attachment.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Human => "HUMAN",
                Type::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"
///     }
/// }]
/// ```
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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 (@).
#[allow(clippy::derive_partial_eq_without_eq)]
#[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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Add => "ADD",
                Type::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 (/).
#[allow(clippy::derive_partial_eq_without_eq)]
#[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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Add => "ADD",
                Type::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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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")]
    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,
    }
    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 {
                RichLinkType::Unspecified => "RICH_LINK_TYPE_UNSPECIFIED",
                RichLinkType::DriveFile => "DRIVE_FILE",
            }
        }
        /// 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),
                _ => None,
            }
        }
    }
    /// Data for the linked resource.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// Data for a drive link.
        #[prost(message, tag = "3")]
        DriveLinkData(super::DriveLinkData),
    }
}
/// Data for Google Drive links.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
}
/// 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 {
            AnnotationType::Unspecified => "ANNOTATION_TYPE_UNSPECIFIED",
            AnnotationType::UserMention => "USER_MENTION",
            AnnotationType::SlashCommand => "SLASH_COMMAND",
            AnnotationType::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 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>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
}
/// Represents the status for a request to either invoke or submit a
/// [dialog](<https://developers.google.com/workspace/chat/dialogs>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
}
/// A widget is a UI element that presents text and images.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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>).
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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 {
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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).
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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 {
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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 {
                Icon::Unspecified => "ICON_UNSPECIFIED",
                Icon::Airplane => "AIRPLANE",
                Icon::Bookmark => "BOOKMARK",
                Icon::Bus => "BUS",
                Icon::Car => "CAR",
                Icon::Clock => "CLOCK",
                Icon::ConfirmationNumberIcon => "CONFIRMATION_NUMBER_ICON",
                Icon::Dollar => "DOLLAR",
                Icon::Description => "DESCRIPTION",
                Icon::Email => "EMAIL",
                Icon::EventPerformer => "EVENT_PERFORMER",
                Icon::EventSeat => "EVENT_SEAT",
                Icon::FlightArrival => "FLIGHT_ARRIVAL",
                Icon::FlightDeparture => "FLIGHT_DEPARTURE",
                Icon::Hotel => "HOTEL",
                Icon::HotelRoomType => "HOTEL_ROOM_TYPE",
                Icon::Invite => "INVITE",
                Icon::MapPin => "MAP_PIN",
                Icon::Membership => "MEMBERSHIP",
                Icon::MultiplePeople => "MULTIPLE_PEOPLE",
                Icon::Offer => "OFFER",
                Icon::Person => "PERSON",
                Icon::Phone => "PHONE",
                Icon::RestaurantIcon => "RESTAURANT_ICON",
                Icon::ShoppingCart => "SHOPPING_CART",
                Icon::Star => "STAR",
                Icon::Store => "STORE",
                Icon::Ticket => "TICKET",
                Icon::Train => "TRAIN",
                Icon::VideoCamera => "VIDEO_CAMERA",
                Icon::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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, 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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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 {
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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 {
                        ImageStyle::Unspecified => "IMAGE_STYLE_UNSPECIFIED",
                        ImageStyle::Image => "IMAGE",
                        ImageStyle::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).
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, 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.
    #[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 {
                DeletionType::Unspecified => "DELETION_TYPE_UNSPECIFIED",
                DeletionType::Creator => "CREATOR",
                DeletionType::SpaceOwner => "SPACE_OWNER",
                DeletionType::Admin => "ADMIN",
                DeletionType::AppMessageExpiry => "APP_MESSAGE_EXPIRY",
                DeletionType::CreatorViaApp => "CREATOR_VIA_APP",
                DeletionType::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 reaction to a message.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reaction {
    /// 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>,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Emoji {
    /// 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 {
    /// The content of the emoji.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Content {
        /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmojiReactionSummary {
    /// Emoji associated with the reactions.
    #[prost(message, optional, tag = "1")]
    pub emoji: ::core::option::Option<Emoji>,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, 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 {
            HistoryState::Unspecified => "HISTORY_STATE_UNSPECIFIED",
            HistoryState::HistoryOff => "HISTORY_OFF",
            HistoryState::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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Space {
    /// Resource name of the space.
    ///
    /// Format: `spaces/{space}`
    #[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,
    /// 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,
    /// The space's display name. Required when [creating a
    /// space](<https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create>).
    /// 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,
    /// 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.
    ///
    ///    * The space is used to \[import data to Google Chat\]
    ///      (<https://developers.google.com/chat/api/guides/import-data-overview>)
    ///      because import mode spaces must only permit members from the same
    ///      Google Workspace organization. However, as part of the [Google
    ///      Workspace Developer Preview
    ///      Program](<https://developers.google.com/workspace/preview>), import mode
    ///      spaces can permit any Google Chat user so this field can then be set
    ///      for import mode spaces.
    ///
    /// 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,
    /// Details about the space including description and rules.
    #[prost(message, optional, tag = "11")]
    pub space_details: ::core::option::Option<space::SpaceDetails>,
    /// 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.
    #[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. 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,
}
/// Nested message and enum types in `Space`.
pub mod space {
    /// Details about the space including description and rules.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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,
    }
    /// 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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Room => "ROOM",
                Type::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 {
                SpaceType::Unspecified => "SPACE_TYPE_UNSPECIFIED",
                SpaceType::Space => "SPACE",
                SpaceType::GroupChat => "GROUP_CHAT",
                SpaceType::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 {
                SpaceThreadingState::Unspecified => "SPACE_THREADING_STATE_UNSPECIFIED",
                SpaceThreadingState::ThreadedMessages => "THREADED_MESSAGES",
                SpaceThreadingState::GroupedMessages => "GROUPED_MESSAGES",
                SpaceThreadingState::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,
            }
        }
    }
}
/// A request to create a named space.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSpaceRequest {
    /// Required. The `displayName` and `spaceType` fields must be populated.  Only
    /// `SpaceType.SPACE` is supported.
    ///
    /// 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.
    ///
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpacesResponse {
    /// List of spaces in the requested (or first) page.
    #[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpaceRequest {
    /// Required. Resource name of the space, in the form "spaces/*".
    ///
    /// Format: `spaces/{space}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A request to get direct message space based on the user resource.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    ///
    /// Currently supported field paths:
    ///
    /// - `display_name` (Only supports changing the display name of a space with
    /// the `SPACE` type, or when also including the `space_type` mask to change a
    /// `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a
    /// `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument
    /// error. If you receive the error message `ALREADY_EXISTS` when updating the
    /// `displayName`, try a different `displayName`. 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_details`
    ///
    /// - `space_history_state` (Supports [turning history on or off for the
    /// space](<https://support.google.com/chat/answer/7664687>) if [the organization
    /// allows users to change their history
    /// setting](<https://support.google.com/a/answer/7664184>).
    /// Warning: mutually exclusive with all other field paths.)
    ///
    /// - Developer Preview: `access_settings.audience` (Supports changing the
    /// [access setting](<https://support.google.com/chat/answer/11971020>) of a
    /// space. If no audience is specified in the access setting, the space's
    /// access setting is updated to restricted. Warning: mutually exclusive with
    /// all other field paths.)
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for deleting a space.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
}
/// Request message for completing the import process for a space.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Message {
    /// 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>,
    /// 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 text
    /// message](<https://developers.google.com/workspace/chat/create-messages#create-text-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>,
    /// 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 about cards and how to create them, see [Send card
    /// messages](<https://developers.google.com/workspace/chat/create-messages#create>).
    ///
    /// [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>,
    /// If your Chat app [authenticates as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// the output 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>,
    /// 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>,
    /// 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>,
    /// 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. Link previews and
    /// attachments aren't supported for private messages.
    ///
    /// Only Chat apps can send private messages. If your Chat app [authenticates
    /// as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>)
    /// to send a message, the message can't be private and must omit this field.
    ///
    /// For details, see [Send private messages to Google Chat
    /// users](<https://developers.google.com/workspace/chat/private-messages>).
    #[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>,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thread {
    /// Output only. 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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,
        >,
    }
    /// The response of the updated widget.
    /// Used to provide autocomplete options for a widget.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[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 {
                ResponseType::TypeUnspecified => "TYPE_UNSPECIFIED",
                ResponseType::NewMessage => "NEW_MESSAGE",
                ResponseType::UpdateMessage => "UPDATE_MESSAGE",
                ResponseType::UpdateUserMessageCards => "UPDATE_USER_MESSAGE_CARDS",
                ResponseType::RequestConfig => "REQUEST_CONFIG",
                ResponseType::Dialog => "DIALOG",
                ResponseType::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>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    #[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 {
                MessageReplyOption::Unspecified => "MESSAGE_REPLY_OPTION_UNSPECIFIED",
                MessageReplyOption::ReplyMessageFallbackToNewThread => {
                    "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD"
                }
                MessageReplyOption::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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
    /// 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, if resuming from a previous query.
    ///
    /// 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,
    /// 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, if resuming from a previous query.
    ///
    /// 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,
    /// 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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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>)
#[allow(clippy::derive_partial_eq_without_eq)]
#[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>,
}
/// A Google Group in Google Chat.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Membership {
    /// 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 {
                MembershipState::Unspecified => "MEMBERSHIP_STATE_UNSPECIFIED",
                MembershipState::Joined => "JOINED",
                MembershipState::Invited => "INVITED",
                MembershipState::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 {
                MembershipRole::Unspecified => "MEMBERSHIP_ROLE_UNSPECIFIED",
                MembershipRole::RoleMember => "ROLE_MEMBER",
                MembershipRole::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.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MemberType {
        /// 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),
        /// The Google Group the membership corresponds to.
        /// Only supports read operations. Other operations, like
        /// creating or updating a membership, aren't currently supported.
        #[prost(message, tag = "5")]
        GroupMember(super::Group),
    }
}
/// Request message for creating a membership.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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
    /// the `chat.memberships` scope, 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`. When a Chat app creates a
    /// membership relation for itself, it must 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>,
}
/// Request message for updating a membership.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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>,
}
/// Request message for listing memberships.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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`.
    ///
    /// To filter by both role and type, use the `AND` operator. To filter by
    /// either role or type, use the `OR` operator.
    ///
    /// For example, the following queries are valid:
    ///
    /// ```
    /// role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
    /// member.type = "HUMAN" AND role = "ROLE_MANAGER"
    /// ```
    ///
    /// 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,
}
/// Response to list memberships of the space.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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`
    ///
    /// When [authenticated as a
    /// user](<https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>),
    /// 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,
}
/// Request to delete a membership in a space.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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,
}
/// Request to create a space and add specified users to it.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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 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}`.
    ///
    /// 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 space, used to identify read and unread
/// messages.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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>,
}
/// A user's read state within a thread, used to identify read and unread
/// messages.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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.
#[allow(clippy::derive_partial_eq_without_eq)]
#[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::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> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> 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> + Send + 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. The maximum message size,
        /// including text and cards, is 32,000 bytes. For an example, see [Send a
        /// message](https://developers.google.com/workspace/chat/create-messages).
        ///
        /// Calling this method requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
        /// and supports the following authentication types:
        ///
        /// - For text messages, user authentication or app authentication are
        /// supported.
        /// - For card messages, only app authentication is supported. (Only Chat apps
        /// can create card messages.)
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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. For an example, see
        /// [List messages](/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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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.
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        ///
        /// Lists spaces visible to the caller or authenticated user. Group chats
        /// and DMs aren't listed until the first message is sent.
        ///
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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 details about a space. For an example, see
        /// [Get details about a
        /// space](https://developers.google.com/workspace/chat/get-spaces).
        ///
        /// Requires
        /// [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
        /// Supports
        /// [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
        /// and [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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 named space. Spaces grouped by topics aren't supported. 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.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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`.
        ///
        /// 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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// from a user who has permission to delete the space.
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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 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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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 [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.
        ///
        /// 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.
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
        /// or [app
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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 human membership or app membership for the calling app. Creating
        /// memberships for other apps isn't supported. For an example, see
        /// [Invite or add a user or a Google Chat app to a
        /// space](https://developers.google.com/workspace/chat/create-members).
        /// 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. Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        ///
        /// To specify the member to add, set the `membership.member.name` for the
        /// human or app member.
        ///
        /// - To add the calling app to a space or a direct message between two human
        ///   users, use `users/app`. Unable to add other
        ///   apps to the space.
        ///
        /// - 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`.
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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).
        ///
        /// Requires [user
        /// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
        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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.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
        }
    }
}