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
// This file is @generated by prost-build.
/// The create assessment request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAssessmentRequest {
    /// Required. The name of the project in which the assessment is created,
    /// in the format `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The assessment details.
    #[prost(message, optional, tag = "2")]
    pub assessment: ::core::option::Option<Assessment>,
}
/// Describes an event in the lifecycle of a payment transaction.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionEvent {
    /// Optional. The type of this transaction event.
    #[prost(enumeration = "transaction_event::TransactionEventType", tag = "1")]
    pub event_type: i32,
    /// Optional. The reason or standardized code that corresponds with this
    /// transaction event, if one exists. For example, a CHARGEBACK event with code
    /// 6005.
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    /// Optional. The value that corresponds with this transaction event, if one
    /// exists. For example, a refund event where $5.00 was refunded. Currency is
    /// obtained from the original transaction data.
    #[prost(double, tag = "3")]
    pub value: f64,
    /// Optional. Timestamp when this transaction event occurred; otherwise assumed
    /// to be the time of the API call.
    #[prost(message, optional, tag = "4")]
    pub event_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `TransactionEvent`.
pub mod transaction_event {
    /// Enum that represents an event in the payment transaction lifecycle.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TransactionEventType {
        /// Default, unspecified event type.
        Unspecified = 0,
        /// Indicates that the transaction is approved by the merchant. The
        /// accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY',
        /// 'CYBERSOURCE', or 'MANUAL_REVIEW'.
        MerchantApprove = 1,
        /// Indicates that the transaction is denied and concluded due to risks
        /// detected by the merchant. The accompanying reasons can include terms such
        /// as 'INHOUSE',  'ACCERTIFY',  'CYBERSOURCE', or 'MANUAL_REVIEW'.
        MerchantDeny = 2,
        /// Indicates that the transaction is being evaluated by a human, due to
        /// suspicion or risk.
        ManualReview = 3,
        /// Indicates that the authorization attempt with the card issuer succeeded.
        Authorization = 4,
        /// Indicates that the authorization attempt with the card issuer failed.
        /// The accompanying reasons can include Visa's '54' indicating that the card
        /// is expired, or '82' indicating that the CVV is incorrect.
        AuthorizationDecline = 5,
        /// Indicates that the transaction is completed because the funds were
        /// settled.
        PaymentCapture = 6,
        /// Indicates that the transaction could not be completed because the funds
        /// were not settled.
        PaymentCaptureDecline = 7,
        /// Indicates that the transaction has been canceled. Specify the reason
        /// for the cancellation. For example, 'INSUFFICIENT_INVENTORY'.
        Cancel = 8,
        /// Indicates that the merchant has received a chargeback inquiry due to
        /// fraud for the transaction, requesting additional information before a
        /// fraud chargeback is officially issued and a formal chargeback
        /// notification is sent.
        ChargebackInquiry = 9,
        /// Indicates that the merchant has received a chargeback alert due to fraud
        /// for the transaction. The process of resolving the dispute without
        /// involving the payment network is started.
        ChargebackAlert = 10,
        /// Indicates that a fraud notification is issued for the transaction, sent
        /// by the payment instrument's issuing bank because the transaction appears
        /// to be fraudulent. We recommend including TC40 or SAFE data in the
        /// `reason` field for this event type. For partial chargebacks, we recommend
        /// that you include an amount in the `value` field.
        FraudNotification = 11,
        /// Indicates that the merchant is informed by the payment network that the
        /// transaction has entered the chargeback process due to fraud. Reason code
        /// examples include Discover's '6005' and '6041'. For partial chargebacks,
        /// we recommend that you include an amount in the `value` field.
        Chargeback = 12,
        /// Indicates that the transaction has entered the chargeback process due to
        /// fraud, and that the merchant has chosen to enter representment. Reason
        /// examples include Discover's '6005' and '6041'. For partial chargebacks,
        /// we recommend that you include an amount in the `value` field.
        ChargebackRepresentment = 13,
        /// Indicates that the transaction has had a fraud chargeback which was
        /// illegitimate and was reversed as a result. For partial chargebacks, we
        /// recommend that you include an amount in the `value` field.
        ChargebackReverse = 14,
        /// Indicates that the merchant has received a refund for a completed
        /// transaction. For partial refunds, we recommend that you include an amount
        /// in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of
        /// exempt tax)
        RefundRequest = 15,
        /// Indicates that the merchant has received a refund request for this
        /// transaction, but that they have declined it. For partial refunds, we
        /// recommend that you include an amount in the `value` field. Reason
        /// example: 'TAX_EXEMPT' (partial refund of exempt tax)
        RefundDecline = 16,
        /// Indicates that the completed transaction was refunded by the merchant.
        /// For partial refunds, we recommend that you include an amount in the
        /// `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt
        /// tax)
        Refund = 17,
        /// Indicates that the completed transaction was refunded by the merchant,
        /// and that this refund was reversed. For partial refunds, we recommend that
        /// you include an amount in the `value` field.
        RefundReverse = 18,
    }
    impl TransactionEventType {
        /// 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 {
                TransactionEventType::Unspecified => "TRANSACTION_EVENT_TYPE_UNSPECIFIED",
                TransactionEventType::MerchantApprove => "MERCHANT_APPROVE",
                TransactionEventType::MerchantDeny => "MERCHANT_DENY",
                TransactionEventType::ManualReview => "MANUAL_REVIEW",
                TransactionEventType::Authorization => "AUTHORIZATION",
                TransactionEventType::AuthorizationDecline => "AUTHORIZATION_DECLINE",
                TransactionEventType::PaymentCapture => "PAYMENT_CAPTURE",
                TransactionEventType::PaymentCaptureDecline => "PAYMENT_CAPTURE_DECLINE",
                TransactionEventType::Cancel => "CANCEL",
                TransactionEventType::ChargebackInquiry => "CHARGEBACK_INQUIRY",
                TransactionEventType::ChargebackAlert => "CHARGEBACK_ALERT",
                TransactionEventType::FraudNotification => "FRAUD_NOTIFICATION",
                TransactionEventType::Chargeback => "CHARGEBACK",
                TransactionEventType::ChargebackRepresentment => {
                    "CHARGEBACK_REPRESENTMENT"
                }
                TransactionEventType::ChargebackReverse => "CHARGEBACK_REVERSE",
                TransactionEventType::RefundRequest => "REFUND_REQUEST",
                TransactionEventType::RefundDecline => "REFUND_DECLINE",
                TransactionEventType::Refund => "REFUND",
                TransactionEventType::RefundReverse => "REFUND_REVERSE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TRANSACTION_EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "MERCHANT_APPROVE" => Some(Self::MerchantApprove),
                "MERCHANT_DENY" => Some(Self::MerchantDeny),
                "MANUAL_REVIEW" => Some(Self::ManualReview),
                "AUTHORIZATION" => Some(Self::Authorization),
                "AUTHORIZATION_DECLINE" => Some(Self::AuthorizationDecline),
                "PAYMENT_CAPTURE" => Some(Self::PaymentCapture),
                "PAYMENT_CAPTURE_DECLINE" => Some(Self::PaymentCaptureDecline),
                "CANCEL" => Some(Self::Cancel),
                "CHARGEBACK_INQUIRY" => Some(Self::ChargebackInquiry),
                "CHARGEBACK_ALERT" => Some(Self::ChargebackAlert),
                "FRAUD_NOTIFICATION" => Some(Self::FraudNotification),
                "CHARGEBACK" => Some(Self::Chargeback),
                "CHARGEBACK_REPRESENTMENT" => Some(Self::ChargebackRepresentment),
                "CHARGEBACK_REVERSE" => Some(Self::ChargebackReverse),
                "REFUND_REQUEST" => Some(Self::RefundRequest),
                "REFUND_DECLINE" => Some(Self::RefundDecline),
                "REFUND" => Some(Self::Refund),
                "REFUND_REVERSE" => Some(Self::RefundReverse),
                _ => None,
            }
        }
    }
}
/// The request message to annotate an Assessment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotateAssessmentRequest {
    /// Required. The resource name of the Assessment, in the format
    /// `projects/{project}/assessments/{assessment}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The annotation that is assigned to the Event. This field can
    /// be left empty to provide reasons that apply to an event without concluding
    /// whether the event is legitimate or fraudulent.
    #[prost(enumeration = "annotate_assessment_request::Annotation", tag = "2")]
    pub annotation: i32,
    /// Optional. Reasons for the annotation that are assigned to the event.
    #[prost(
        enumeration = "annotate_assessment_request::Reason",
        repeated,
        packed = "false",
        tag = "3"
    )]
    pub reasons: ::prost::alloc::vec::Vec<i32>,
    /// Optional. A stable account identifier to apply to the assessment. This is
    /// an alternative to setting `account_id` in `CreateAssessment`, for example
    /// when a stable account identifier is not yet known in the initial request.
    #[prost(string, tag = "7")]
    pub account_id: ::prost::alloc::string::String,
    /// Optional. A stable hashed account identifier to apply to the assessment.
    /// This is an alternative to setting `hashed_account_id` in
    /// `CreateAssessment`, for example when a stable account identifier is not yet
    /// known in the initial request.
    #[prost(bytes = "bytes", tag = "4")]
    pub hashed_account_id: ::prost::bytes::Bytes,
    /// Optional. If the assessment is part of a payment transaction, provide
    /// details on payment lifecycle events that occur in the transaction.
    #[prost(message, optional, tag = "5")]
    pub transaction_event: ::core::option::Option<TransactionEvent>,
}
/// Nested message and enum types in `AnnotateAssessmentRequest`.
pub mod annotate_assessment_request {
    /// Enum that represents the types of annotations.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Annotation {
        /// Default unspecified type.
        Unspecified = 0,
        /// Provides information that the event turned out to be legitimate.
        Legitimate = 1,
        /// Provides information that the event turned out to be fraudulent.
        Fraudulent = 2,
        /// Provides information that the event was related to a login event in which
        /// the user typed the correct password. Deprecated, prefer indicating
        /// CORRECT_PASSWORD through the reasons field instead.
        PasswordCorrect = 3,
        /// Provides information that the event was related to a login event in which
        /// the user typed the incorrect password. Deprecated, prefer indicating
        /// INCORRECT_PASSWORD through the reasons field instead.
        PasswordIncorrect = 4,
    }
    impl Annotation {
        /// 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 {
                Annotation::Unspecified => "ANNOTATION_UNSPECIFIED",
                Annotation::Legitimate => "LEGITIMATE",
                Annotation::Fraudulent => "FRAUDULENT",
                Annotation::PasswordCorrect => "PASSWORD_CORRECT",
                Annotation::PasswordIncorrect => "PASSWORD_INCORRECT",
            }
        }
        /// 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_UNSPECIFIED" => Some(Self::Unspecified),
                "LEGITIMATE" => Some(Self::Legitimate),
                "FRAUDULENT" => Some(Self::Fraudulent),
                "PASSWORD_CORRECT" => Some(Self::PasswordCorrect),
                "PASSWORD_INCORRECT" => Some(Self::PasswordIncorrect),
                _ => None,
            }
        }
    }
    /// Enum that represents potential reasons for annotating an assessment.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Reason {
        /// Default unspecified reason.
        Unspecified = 0,
        /// Indicates that the transaction had a chargeback issued with no other
        /// details. When possible, specify the type by using CHARGEBACK_FRAUD or
        /// CHARGEBACK_DISPUTE instead.
        Chargeback = 1,
        /// Indicates that the transaction had a chargeback issued related to an
        /// alleged unauthorized transaction from the cardholder's perspective (for
        /// example, the card number was stolen).
        ChargebackFraud = 8,
        /// Indicates that the transaction had a chargeback issued related to the
        /// cardholder having provided their card details but allegedly not being
        /// satisfied with the purchase (for example, misrepresentation, attempted
        /// cancellation).
        ChargebackDispute = 9,
        /// Indicates that the completed payment transaction was refunded by the
        /// seller.
        Refund = 10,
        /// Indicates that the completed payment transaction was determined to be
        /// fraudulent by the seller, and was cancelled and refunded as a result.
        RefundFraud = 11,
        /// Indicates that the payment transaction was accepted, and the user was
        /// charged.
        TransactionAccepted = 12,
        /// Indicates that the payment transaction was declined, for example due to
        /// invalid card details.
        TransactionDeclined = 13,
        /// Indicates the transaction associated with the assessment is suspected of
        /// being fraudulent based on the payment method, billing details, shipping
        /// address or other transaction information.
        PaymentHeuristics = 2,
        /// Indicates that the user was served a 2FA challenge. An old assessment
        /// with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been
        /// overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow.
        /// This is equivalent to `FAILED_TWO_FACTOR`.
        InitiatedTwoFactor = 7,
        /// Indicates that the user passed a 2FA challenge.
        PassedTwoFactor = 3,
        /// Indicates that the user failed a 2FA challenge.
        FailedTwoFactor = 4,
        /// Indicates the user provided the correct password.
        CorrectPassword = 5,
        /// Indicates the user provided an incorrect password.
        IncorrectPassword = 6,
        /// Indicates that the user sent unwanted and abusive messages to other users
        /// of the platform, such as spam, scams, phishing, or social engineering.
        SocialSpam = 14,
    }
    impl Reason {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Reason::Unspecified => "REASON_UNSPECIFIED",
                Reason::Chargeback => "CHARGEBACK",
                Reason::ChargebackFraud => "CHARGEBACK_FRAUD",
                Reason::ChargebackDispute => "CHARGEBACK_DISPUTE",
                Reason::Refund => "REFUND",
                Reason::RefundFraud => "REFUND_FRAUD",
                Reason::TransactionAccepted => "TRANSACTION_ACCEPTED",
                Reason::TransactionDeclined => "TRANSACTION_DECLINED",
                Reason::PaymentHeuristics => "PAYMENT_HEURISTICS",
                Reason::InitiatedTwoFactor => "INITIATED_TWO_FACTOR",
                Reason::PassedTwoFactor => "PASSED_TWO_FACTOR",
                Reason::FailedTwoFactor => "FAILED_TWO_FACTOR",
                Reason::CorrectPassword => "CORRECT_PASSWORD",
                Reason::IncorrectPassword => "INCORRECT_PASSWORD",
                Reason::SocialSpam => "SOCIAL_SPAM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                "CHARGEBACK" => Some(Self::Chargeback),
                "CHARGEBACK_FRAUD" => Some(Self::ChargebackFraud),
                "CHARGEBACK_DISPUTE" => Some(Self::ChargebackDispute),
                "REFUND" => Some(Self::Refund),
                "REFUND_FRAUD" => Some(Self::RefundFraud),
                "TRANSACTION_ACCEPTED" => Some(Self::TransactionAccepted),
                "TRANSACTION_DECLINED" => Some(Self::TransactionDeclined),
                "PAYMENT_HEURISTICS" => Some(Self::PaymentHeuristics),
                "INITIATED_TWO_FACTOR" => Some(Self::InitiatedTwoFactor),
                "PASSED_TWO_FACTOR" => Some(Self::PassedTwoFactor),
                "FAILED_TWO_FACTOR" => Some(Self::FailedTwoFactor),
                "CORRECT_PASSWORD" => Some(Self::CorrectPassword),
                "INCORRECT_PASSWORD" => Some(Self::IncorrectPassword),
                "SOCIAL_SPAM" => Some(Self::SocialSpam),
                _ => None,
            }
        }
    }
}
/// Empty response for AnnotateAssessment.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AnnotateAssessmentResponse {}
/// Information about a verification endpoint that can be used for 2FA.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointVerificationInfo {
    /// Output only. Token to provide to the client to trigger endpoint
    /// verification. It must be used within 15 minutes.
    #[prost(string, tag = "3")]
    pub request_token: ::prost::alloc::string::String,
    /// Output only. Timestamp of the last successful verification for the
    /// endpoint, if any.
    #[prost(message, optional, tag = "4")]
    pub last_verification_time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(oneof = "endpoint_verification_info::Endpoint", tags = "1, 2")]
    pub endpoint: ::core::option::Option<endpoint_verification_info::Endpoint>,
}
/// Nested message and enum types in `EndpointVerificationInfo`.
pub mod endpoint_verification_info {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Endpoint {
        /// Email address for which to trigger a verification request.
        #[prost(string, tag = "1")]
        EmailAddress(::prost::alloc::string::String),
        /// Phone number for which to trigger a verification request. Should be given
        /// in E.164 format.
        #[prost(string, tag = "2")]
        PhoneNumber(::prost::alloc::string::String),
    }
}
/// Information about account verification, used for identity verification.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountVerificationInfo {
    /// Optional. Endpoints that can be used for identity verification.
    #[prost(message, repeated, tag = "1")]
    pub endpoints: ::prost::alloc::vec::Vec<EndpointVerificationInfo>,
    /// Optional. Language code preference for the verification message, set as a
    /// IETF BCP 47 language code.
    #[prost(string, tag = "3")]
    pub language_code: ::prost::alloc::string::String,
    /// Output only. Result of the latest account verification challenge.
    #[prost(enumeration = "account_verification_info::Result", tag = "7")]
    pub latest_verification_result: i32,
    /// Username of the account that is being verified. Deprecated. Customers
    /// should now provide the `account_id` field in `event.user_info`.
    #[deprecated]
    #[prost(string, tag = "2")]
    pub username: ::prost::alloc::string::String,
}
/// Nested message and enum types in `AccountVerificationInfo`.
pub mod account_verification_info {
    /// Result of the account verification as contained in the verdict token issued
    /// at the end of the verification flow.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Result {
        /// No information about the latest account verification.
        Unspecified = 0,
        /// The user was successfully verified. This means the account verification
        /// challenge was successfully completed.
        SuccessUserVerified = 1,
        /// The user failed the verification challenge.
        ErrorUserNotVerified = 2,
        /// The site is not properly onboarded to use the account verification
        /// feature.
        ErrorSiteOnboardingIncomplete = 3,
        /// The recipient is not allowed for account verification. This can occur
        /// during integration but should not occur in production.
        ErrorRecipientNotAllowed = 4,
        /// The recipient has already been sent too many verification codes in a
        /// short amount of time.
        ErrorRecipientAbuseLimitExhausted = 5,
        /// The verification flow could not be completed due to a critical internal
        /// error.
        ErrorCriticalInternal = 6,
        /// The client has exceeded their two factor request quota for this period of
        /// time.
        ErrorCustomerQuotaExhausted = 7,
        /// The request cannot be processed at the time because of an incident. This
        /// bypass can be restricted to a problematic destination email domain, a
        /// customer, or could affect the entire service.
        ErrorVerificationBypassed = 8,
        /// The request parameters do not match with the token provided and cannot be
        /// processed.
        ErrorVerdictMismatch = 9,
    }
    impl Result {
        /// 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 {
                Result::Unspecified => "RESULT_UNSPECIFIED",
                Result::SuccessUserVerified => "SUCCESS_USER_VERIFIED",
                Result::ErrorUserNotVerified => "ERROR_USER_NOT_VERIFIED",
                Result::ErrorSiteOnboardingIncomplete => {
                    "ERROR_SITE_ONBOARDING_INCOMPLETE"
                }
                Result::ErrorRecipientNotAllowed => "ERROR_RECIPIENT_NOT_ALLOWED",
                Result::ErrorRecipientAbuseLimitExhausted => {
                    "ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED"
                }
                Result::ErrorCriticalInternal => "ERROR_CRITICAL_INTERNAL",
                Result::ErrorCustomerQuotaExhausted => "ERROR_CUSTOMER_QUOTA_EXHAUSTED",
                Result::ErrorVerificationBypassed => "ERROR_VERIFICATION_BYPASSED",
                Result::ErrorVerdictMismatch => "ERROR_VERDICT_MISMATCH",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RESULT_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCESS_USER_VERIFIED" => Some(Self::SuccessUserVerified),
                "ERROR_USER_NOT_VERIFIED" => Some(Self::ErrorUserNotVerified),
                "ERROR_SITE_ONBOARDING_INCOMPLETE" => {
                    Some(Self::ErrorSiteOnboardingIncomplete)
                }
                "ERROR_RECIPIENT_NOT_ALLOWED" => Some(Self::ErrorRecipientNotAllowed),
                "ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED" => {
                    Some(Self::ErrorRecipientAbuseLimitExhausted)
                }
                "ERROR_CRITICAL_INTERNAL" => Some(Self::ErrorCriticalInternal),
                "ERROR_CUSTOMER_QUOTA_EXHAUSTED" => {
                    Some(Self::ErrorCustomerQuotaExhausted)
                }
                "ERROR_VERIFICATION_BYPASSED" => Some(Self::ErrorVerificationBypassed),
                "ERROR_VERDICT_MISMATCH" => Some(Self::ErrorVerdictMismatch),
                _ => None,
            }
        }
    }
}
/// Private password leak verification info.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivatePasswordLeakVerification {
    /// Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized
    /// username. It is used to look up password leaks associated with that hash
    /// prefix.
    #[prost(bytes = "bytes", tag = "1")]
    pub lookup_hash_prefix: ::prost::bytes::Bytes,
    /// Optional. Encrypted Scrypt hash of the canonicalized username+password. It
    /// is re-encrypted by the server and returned through
    /// `reencrypted_user_credentials_hash`.
    #[prost(bytes = "bytes", tag = "2")]
    pub encrypted_user_credentials_hash: ::prost::bytes::Bytes,
    /// Output only. List of prefixes of the encrypted potential password leaks
    /// that matched the given parameters. They must be compared with the
    /// client-side decryption prefix of `reencrypted_user_credentials_hash`
    #[prost(bytes = "bytes", repeated, tag = "3")]
    pub encrypted_leak_match_prefixes: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
    /// Output only. Corresponds to the re-encryption of the
    /// `encrypted_user_credentials_hash` field. It is used to match potential
    /// password leaks within `encrypted_leak_match_prefixes`.
    #[prost(bytes = "bytes", tag = "4")]
    pub reencrypted_user_credentials_hash: ::prost::bytes::Bytes,
}
/// A reCAPTCHA Enterprise assessment resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Assessment {
    /// Output only. Identifier. The resource name for the Assessment in the format
    /// `projects/{project}/assessments/{assessment}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The event being assessed.
    #[prost(message, optional, tag = "2")]
    pub event: ::core::option::Option<Event>,
    /// Output only. The risk analysis result for the event being assessed.
    #[prost(message, optional, tag = "3")]
    pub risk_analysis: ::core::option::Option<RiskAnalysis>,
    /// Output only. Properties of the provided event token.
    #[prost(message, optional, tag = "4")]
    pub token_properties: ::core::option::Option<TokenProperties>,
    /// Optional. Account verification information for identity verification. The
    /// assessment event must include a token and site key to use this feature.
    #[prost(message, optional, tag = "5")]
    pub account_verification: ::core::option::Option<AccountVerificationInfo>,
    /// Output only. Assessment returned by account defender when an account
    /// identifier is provided.
    #[prost(message, optional, tag = "6")]
    pub account_defender_assessment: ::core::option::Option<AccountDefenderAssessment>,
    /// Optional. The private password leak verification field contains the
    /// parameters that are used to to check for leaks privately without sharing
    /// user credentials.
    #[prost(message, optional, tag = "8")]
    pub private_password_leak_verification: ::core::option::Option<
        PrivatePasswordLeakVerification,
    >,
    /// Output only. Assessment returned when firewall policies belonging to the
    /// project are evaluated using the field firewall_policy_evaluation.
    #[prost(message, optional, tag = "10")]
    pub firewall_policy_assessment: ::core::option::Option<FirewallPolicyAssessment>,
    /// Output only. Assessment returned by Fraud Prevention when TransactionData
    /// is provided.
    #[prost(message, optional, tag = "11")]
    pub fraud_prevention_assessment: ::core::option::Option<FraudPreventionAssessment>,
    /// Output only. Fraud Signals specific to the users involved in a payment
    /// transaction.
    #[prost(message, optional, tag = "13")]
    pub fraud_signals: ::core::option::Option<FraudSignals>,
    /// Output only. Assessment returned when a site key, a token, and a phone
    /// number as `user_id` are provided. Account defender and SMS toll fraud
    /// protection need to be enabled.
    #[prost(message, optional, tag = "12")]
    pub phone_fraud_assessment: ::core::option::Option<PhoneFraudAssessment>,
    /// Optional. The environment creating the assessment. This describes your
    /// environment (the system invoking CreateAssessment), NOT the environment of
    /// your user.
    #[prost(message, optional, tag = "14")]
    pub assessment_environment: ::core::option::Option<AssessmentEnvironment>,
}
/// The event being assessed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
    /// Optional. The user response token provided by the reCAPTCHA Enterprise
    /// client-side integration on your site.
    #[prost(string, tag = "1")]
    pub token: ::prost::alloc::string::String,
    /// Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
    /// site and generate the token.
    #[prost(string, tag = "2")]
    pub site_key: ::prost::alloc::string::String,
    /// Optional. The user agent present in the request from the user's device
    /// related to this event.
    #[prost(string, tag = "3")]
    pub user_agent: ::prost::alloc::string::String,
    /// Optional. The IP address in the request from the user's device related to
    /// this event.
    #[prost(string, tag = "4")]
    pub user_ip_address: ::prost::alloc::string::String,
    /// Optional. The expected action for this type of event. This should be the
    /// same action provided at token generation time on client-side platforms
    /// already integrated with recaptcha enterprise.
    #[prost(string, tag = "5")]
    pub expected_action: ::prost::alloc::string::String,
    /// Optional. Deprecated: use `user_info.account_id` instead.
    /// Unique stable hashed user identifier for the request. The identifier must
    /// be hashed using hmac-sha256 with stable secret.
    #[deprecated]
    #[prost(bytes = "bytes", tag = "6")]
    pub hashed_account_id: ::prost::bytes::Bytes,
    /// Optional. Flag for a reCAPTCHA express request for an assessment without a
    /// token. If enabled, `site_key` must reference an express key.
    #[prost(bool, tag = "14")]
    pub express: bool,
    /// Optional. The URI resource the user requested that triggered an assessment.
    #[prost(string, tag = "8")]
    pub requested_uri: ::prost::alloc::string::String,
    /// Optional. Flag for running WAF token assessment.
    /// If enabled, the token must be specified, and have been created by a
    /// WAF-enabled key.
    #[prost(bool, tag = "9")]
    pub waf_token_assessment: bool,
    /// Optional. JA3 fingerprint for SSL clients.
    #[prost(string, tag = "10")]
    pub ja3: ::prost::alloc::string::String,
    /// Optional. HTTP header information about the request.
    #[prost(string, repeated, tag = "11")]
    pub headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Flag for enabling firewall policy config assessment.
    /// If this flag is enabled, the firewall policy is evaluated and a
    /// suggested firewall action is returned in the response.
    #[prost(bool, tag = "12")]
    pub firewall_policy_evaluation: bool,
    /// Optional. Data describing a payment transaction to be assessed. Sending
    /// this data enables reCAPTCHA Fraud Prevention and the
    /// FraudPreventionAssessment component in the response.
    #[prost(message, optional, tag = "13")]
    pub transaction_data: ::core::option::Option<TransactionData>,
    /// Optional. Information about the user that generates this event, when they
    /// can be identified. They are often identified through the use of an account
    /// for logged-in requests or login/registration requests, or by providing user
    /// identifiers for guest actions like checkout.
    #[prost(message, optional, tag = "15")]
    pub user_info: ::core::option::Option<UserInfo>,
    /// Optional. The Fraud Prevention setting for this assessment.
    #[prost(enumeration = "event::FraudPrevention", tag = "17")]
    pub fraud_prevention: i32,
}
/// Nested message and enum types in `Event`.
pub mod event {
    /// Setting that controls Fraud Prevention assessments.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum FraudPrevention {
        /// Default, unspecified setting. If opted in for automatic detection,
        /// `fraud_prevention_assessment` is returned based on the request.
        /// Otherwise, `fraud_prevention_assessment` is returned if
        /// `transaction_data` is present in the `Event` and Fraud Prevention is
        /// enabled in the Google Cloud console.
        Unspecified = 0,
        /// Enable Fraud Prevention for this assessment, if Fraud Prevention is
        /// enabled in the Google Cloud console.
        Enabled = 1,
        /// Disable Fraud Prevention for this assessment, regardless of opt-in
        /// status or Google Cloud console settings.
        Disabled = 2,
    }
    impl FraudPrevention {
        /// 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 {
                FraudPrevention::Unspecified => "FRAUD_PREVENTION_UNSPECIFIED",
                FraudPrevention::Enabled => "ENABLED",
                FraudPrevention::Disabled => "DISABLED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "FRAUD_PREVENTION_UNSPECIFIED" => Some(Self::Unspecified),
                "ENABLED" => Some(Self::Enabled),
                "DISABLED" => Some(Self::Disabled),
                _ => None,
            }
        }
    }
}
/// Transaction data associated with a payment protected by reCAPTCHA Enterprise.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionData {
    /// Unique identifier for the transaction. This custom identifier can be used
    /// to reference this transaction in the future, for example, labeling a refund
    /// or chargeback event. Two attempts at the same transaction should use the
    /// same transaction id.
    #[prost(string, optional, tag = "11")]
    pub transaction_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The payment method for the transaction. The allowed values are:
    ///
    /// * credit-card
    /// * debit-card
    /// * gift-card
    /// * processor-{name} (If a third-party is used, for example,
    /// processor-paypal)
    /// * custom-{name} (If an alternative method is used, for example,
    /// custom-crypto)
    #[prost(string, tag = "1")]
    pub payment_method: ::prost::alloc::string::String,
    /// Optional. The Bank Identification Number - generally the first 6 or 8
    /// digits of the card.
    #[prost(string, tag = "2")]
    pub card_bin: ::prost::alloc::string::String,
    /// Optional. The last four digits of the card.
    #[prost(string, tag = "3")]
    pub card_last_four: ::prost::alloc::string::String,
    /// Optional. The currency code in ISO-4217 format.
    #[prost(string, tag = "4")]
    pub currency_code: ::prost::alloc::string::String,
    /// Optional. The decimal value of the transaction in the specified currency.
    #[prost(double, tag = "5")]
    pub value: f64,
    /// Optional. The value of shipping in the specified currency. 0 for free or no
    /// shipping.
    #[prost(double, tag = "12")]
    pub shipping_value: f64,
    /// Optional. Destination address if this transaction involves shipping a
    /// physical item.
    #[prost(message, optional, tag = "6")]
    pub shipping_address: ::core::option::Option<transaction_data::Address>,
    /// Optional. Address associated with the payment method when applicable.
    #[prost(message, optional, tag = "7")]
    pub billing_address: ::core::option::Option<transaction_data::Address>,
    /// Optional. Information about the user paying/initiating the transaction.
    #[prost(message, optional, tag = "8")]
    pub user: ::core::option::Option<transaction_data::User>,
    /// Optional. Information about the user or users fulfilling the transaction.
    #[prost(message, repeated, tag = "13")]
    pub merchants: ::prost::alloc::vec::Vec<transaction_data::User>,
    /// Optional. Items purchased in this transaction.
    #[prost(message, repeated, tag = "14")]
    pub items: ::prost::alloc::vec::Vec<transaction_data::Item>,
    /// Optional. Information about the payment gateway's response to the
    /// transaction.
    #[prost(message, optional, tag = "10")]
    pub gateway_info: ::core::option::Option<transaction_data::GatewayInfo>,
}
/// Nested message and enum types in `TransactionData`.
pub mod transaction_data {
    /// Structured address format for billing and shipping addresses.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Address {
        /// Optional. The recipient name, potentially including information such as
        /// "care of".
        #[prost(string, tag = "1")]
        pub recipient: ::prost::alloc::string::String,
        /// Optional. The first lines of the address. The first line generally
        /// contains the street name and number, and further lines may include
        /// information such as an apartment number.
        #[prost(string, repeated, tag = "2")]
        pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Optional. The town/city of the address.
        #[prost(string, tag = "3")]
        pub locality: ::prost::alloc::string::String,
        /// Optional. The state, province, or otherwise administrative area of the
        /// address.
        #[prost(string, tag = "4")]
        pub administrative_area: ::prost::alloc::string::String,
        /// Optional. The CLDR country/region of the address.
        #[prost(string, tag = "5")]
        pub region_code: ::prost::alloc::string::String,
        /// Optional. The postal or ZIP code of the address.
        #[prost(string, tag = "6")]
        pub postal_code: ::prost::alloc::string::String,
    }
    /// Details about a user's account involved in the transaction.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct User {
        /// Optional. Unique account identifier for this user. If using account
        /// defender, this should match the hashed_account_id field. Otherwise, a
        /// unique and persistent identifier for this account.
        #[prost(string, tag = "6")]
        pub account_id: ::prost::alloc::string::String,
        /// Optional. The epoch milliseconds of the user's account creation.
        #[prost(int64, tag = "1")]
        pub creation_ms: i64,
        /// Optional. The email address of the user.
        #[prost(string, tag = "2")]
        pub email: ::prost::alloc::string::String,
        /// Optional. Whether the email has been verified to be accessible by the
        /// user (OTP or similar).
        #[prost(bool, tag = "3")]
        pub email_verified: bool,
        /// Optional. The phone number of the user, with country code.
        #[prost(string, tag = "4")]
        pub phone_number: ::prost::alloc::string::String,
        /// Optional. Whether the phone number has been verified to be accessible by
        /// the user (OTP or similar).
        #[prost(bool, tag = "5")]
        pub phone_verified: bool,
    }
    /// Line items being purchased in this transaction.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Item {
        /// Optional. The full name of the item.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Optional. The value per item that the user is paying, in the transaction
        /// currency, after discounts.
        #[prost(double, tag = "2")]
        pub value: f64,
        /// Optional. The quantity of this item that is being purchased.
        #[prost(int64, tag = "3")]
        pub quantity: i64,
        /// Optional. When a merchant is specified, its corresponding account_id.
        /// Necessary to populate marketplace-style transactions.
        #[prost(string, tag = "4")]
        pub merchant_account_id: ::prost::alloc::string::String,
    }
    /// Details about the transaction from the gateway.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct GatewayInfo {
        /// Optional. Name of the gateway service (for example, stripe, square,
        /// paypal).
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Optional. Gateway response code describing the state of the transaction.
        #[prost(string, tag = "2")]
        pub gateway_response_code: ::prost::alloc::string::String,
        /// Optional. AVS response code from the gateway
        /// (available only when reCAPTCHA Enterprise is called after authorization).
        #[prost(string, tag = "3")]
        pub avs_response_code: ::prost::alloc::string::String,
        /// Optional. CVV response code from the gateway
        /// (available only when reCAPTCHA Enterprise is called after authorization).
        #[prost(string, tag = "4")]
        pub cvv_response_code: ::prost::alloc::string::String,
    }
}
/// User information associated with a request protected by reCAPTCHA Enterprise.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserInfo {
    /// Optional. Creation time for this account associated with this user. Leave
    /// blank for non logged-in actions, guest checkout, or when there is no
    /// account associated with the current user.
    #[prost(message, optional, tag = "1")]
    pub create_account_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. For logged-in requests or login/registration requests, the unique
    /// account identifier associated with this user. You can use the username if
    /// it is stable (meaning it is the same for every request associated with the
    /// same user), or any stable user ID of your choice. Leave blank for non
    /// logged-in actions or guest checkout.
    #[prost(string, tag = "2")]
    pub account_id: ::prost::alloc::string::String,
    /// Optional. Identifiers associated with this user or request.
    #[prost(message, repeated, tag = "3")]
    pub user_ids: ::prost::alloc::vec::Vec<UserId>,
}
/// An identifier associated with a user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserId {
    #[prost(oneof = "user_id::IdOneof", tags = "1, 2, 3")]
    pub id_oneof: ::core::option::Option<user_id::IdOneof>,
}
/// Nested message and enum types in `UserId`.
pub mod user_id {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum IdOneof {
        /// Optional. An email address.
        #[prost(string, tag = "1")]
        Email(::prost::alloc::string::String),
        /// Optional. A phone number. Should use the E.164 format.
        #[prost(string, tag = "2")]
        PhoneNumber(::prost::alloc::string::String),
        /// Optional. A unique username, if different from all the other identifiers
        /// and `account_id` that are provided. Can be a unique login handle or
        /// display name for a user.
        #[prost(string, tag = "3")]
        Username(::prost::alloc::string::String),
    }
}
/// Risk analysis result for an event.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiskAnalysis {
    /// Output only. Legitimate event score from 0.0 to 1.0.
    /// (1.0 means very likely legitimate traffic while 0.0 means very likely
    /// non-legitimate traffic).
    #[prost(float, tag = "1")]
    pub score: f32,
    /// Output only. Reasons contributing to the risk analysis verdict.
    #[prost(
        enumeration = "risk_analysis::ClassificationReason",
        repeated,
        packed = "false",
        tag = "2"
    )]
    pub reasons: ::prost::alloc::vec::Vec<i32>,
    /// Output only. Extended verdict reasons to be used for experimentation only.
    /// The set of possible reasons is subject to change.
    #[prost(string, repeated, tag = "3")]
    pub extended_verdict_reasons: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `RiskAnalysis`.
pub mod risk_analysis {
    /// Reasons contributing to the risk analysis verdict.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ClassificationReason {
        /// Default unspecified type.
        Unspecified = 0,
        /// Interactions matched the behavior of an automated agent.
        Automation = 1,
        /// The event originated from an illegitimate environment.
        UnexpectedEnvironment = 2,
        /// Traffic volume from the event source is higher than normal.
        TooMuchTraffic = 3,
        /// Interactions with the site were significantly different than expected
        /// patterns.
        UnexpectedUsagePatterns = 4,
        /// Too little traffic has been received from this site thus far to generate
        /// quality risk analysis.
        LowConfidenceScore = 5,
        /// The request matches behavioral characteristics of a carding attack.
        SuspectedCarding = 6,
        /// The request matches behavioral characteristics of chargebacks for fraud.
        SuspectedChargeback = 7,
    }
    impl ClassificationReason {
        /// 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 {
                ClassificationReason::Unspecified => "CLASSIFICATION_REASON_UNSPECIFIED",
                ClassificationReason::Automation => "AUTOMATION",
                ClassificationReason::UnexpectedEnvironment => "UNEXPECTED_ENVIRONMENT",
                ClassificationReason::TooMuchTraffic => "TOO_MUCH_TRAFFIC",
                ClassificationReason::UnexpectedUsagePatterns => {
                    "UNEXPECTED_USAGE_PATTERNS"
                }
                ClassificationReason::LowConfidenceScore => "LOW_CONFIDENCE_SCORE",
                ClassificationReason::SuspectedCarding => "SUSPECTED_CARDING",
                ClassificationReason::SuspectedChargeback => "SUSPECTED_CHARGEBACK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CLASSIFICATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
                "AUTOMATION" => Some(Self::Automation),
                "UNEXPECTED_ENVIRONMENT" => Some(Self::UnexpectedEnvironment),
                "TOO_MUCH_TRAFFIC" => Some(Self::TooMuchTraffic),
                "UNEXPECTED_USAGE_PATTERNS" => Some(Self::UnexpectedUsagePatterns),
                "LOW_CONFIDENCE_SCORE" => Some(Self::LowConfidenceScore),
                "SUSPECTED_CARDING" => Some(Self::SuspectedCarding),
                "SUSPECTED_CHARGEBACK" => Some(Self::SuspectedChargeback),
                _ => None,
            }
        }
    }
}
/// Properties of the provided event token.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TokenProperties {
    /// Output only. Whether the provided user response token is valid. When valid
    /// = false, the reason could be specified in invalid_reason or it could also
    /// be due to a user failing to solve a challenge or a sitekey mismatch (i.e
    /// the sitekey used to generate the token was different than the one specified
    /// in the assessment).
    #[prost(bool, tag = "1")]
    pub valid: bool,
    /// Output only. Reason associated with the response when valid = false.
    #[prost(enumeration = "token_properties::InvalidReason", tag = "2")]
    pub invalid_reason: i32,
    /// Output only. The timestamp corresponding to the generation of the token.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The hostname of the page on which the token was generated (Web
    /// keys only).
    #[prost(string, tag = "4")]
    pub hostname: ::prost::alloc::string::String,
    /// Output only. The name of the Android package with which the token was
    /// generated (Android keys only).
    #[prost(string, tag = "8")]
    pub android_package_name: ::prost::alloc::string::String,
    /// Output only. The ID of the iOS bundle with which the token was generated
    /// (iOS keys only).
    #[prost(string, tag = "9")]
    pub ios_bundle_id: ::prost::alloc::string::String,
    /// Output only. Action name provided at token generation.
    #[prost(string, tag = "5")]
    pub action: ::prost::alloc::string::String,
}
/// Nested message and enum types in `TokenProperties`.
pub mod token_properties {
    /// Enum that represents the types of invalid token reasons.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum InvalidReason {
        /// Default unspecified type.
        Unspecified = 0,
        /// If the failure reason was not accounted for.
        UnknownInvalidReason = 1,
        /// The provided user verification token was malformed.
        Malformed = 2,
        /// The user verification token had expired.
        Expired = 3,
        /// The user verification had already been seen.
        Dupe = 4,
        /// The user verification token was not present.
        Missing = 5,
        /// A retriable error (such as network failure) occurred on the browser.
        /// Could easily be simulated by an attacker.
        BrowserError = 6,
    }
    impl InvalidReason {
        /// 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 {
                InvalidReason::Unspecified => "INVALID_REASON_UNSPECIFIED",
                InvalidReason::UnknownInvalidReason => "UNKNOWN_INVALID_REASON",
                InvalidReason::Malformed => "MALFORMED",
                InvalidReason::Expired => "EXPIRED",
                InvalidReason::Dupe => "DUPE",
                InvalidReason::Missing => "MISSING",
                InvalidReason::BrowserError => "BROWSER_ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "INVALID_REASON_UNSPECIFIED" => Some(Self::Unspecified),
                "UNKNOWN_INVALID_REASON" => Some(Self::UnknownInvalidReason),
                "MALFORMED" => Some(Self::Malformed),
                "EXPIRED" => Some(Self::Expired),
                "DUPE" => Some(Self::Dupe),
                "MISSING" => Some(Self::Missing),
                "BROWSER_ERROR" => Some(Self::BrowserError),
                _ => None,
            }
        }
    }
}
/// Assessment for Fraud Prevention.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FraudPreventionAssessment {
    /// Output only. Probability of this transaction being fraudulent. Summarizes
    /// the combined risk of attack vectors below. Values are from 0.0 (lowest)
    /// to 1.0 (highest).
    #[prost(float, tag = "1")]
    pub transaction_risk: f32,
    /// Output only. Assessment of this transaction for risk of a stolen
    /// instrument.
    #[prost(message, optional, tag = "2")]
    pub stolen_instrument_verdict: ::core::option::Option<
        fraud_prevention_assessment::StolenInstrumentVerdict,
    >,
    /// Output only. Assessment of this transaction for risk of being part of a
    /// card testing attack.
    #[prost(message, optional, tag = "3")]
    pub card_testing_verdict: ::core::option::Option<
        fraud_prevention_assessment::CardTestingVerdict,
    >,
    /// Output only. Assessment of this transaction for behavioral trust.
    #[prost(message, optional, tag = "4")]
    pub behavioral_trust_verdict: ::core::option::Option<
        fraud_prevention_assessment::BehavioralTrustVerdict,
    >,
}
/// Nested message and enum types in `FraudPreventionAssessment`.
pub mod fraud_prevention_assessment {
    /// Information about stolen instrument fraud, where the user is not the
    /// legitimate owner of the instrument being used for the purchase.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct StolenInstrumentVerdict {
        /// Output only. Probability of this transaction being executed with a stolen
        /// instrument. Values are from 0.0 (lowest) to 1.0 (highest).
        #[prost(float, tag = "1")]
        pub risk: f32,
    }
    /// Information about card testing fraud, where an adversary is testing
    /// fraudulently obtained cards or brute forcing their details.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct CardTestingVerdict {
        /// Output only. Probability of this transaction attempt being part of a card
        /// testing attack. Values are from 0.0 (lowest) to 1.0 (highest).
        #[prost(float, tag = "1")]
        pub risk: f32,
    }
    /// Information about behavioral trust of the transaction.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct BehavioralTrustVerdict {
        /// Output only. Probability of this transaction attempt being executed in a
        /// behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
        /// (highest).
        #[prost(float, tag = "1")]
        pub trust: f32,
    }
}
/// Fraud signals describing users and cards involved in the transaction.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FraudSignals {
    /// Output only. Signals describing the end user in this transaction.
    #[prost(message, optional, tag = "1")]
    pub user_signals: ::core::option::Option<fraud_signals::UserSignals>,
    /// Output only. Signals describing the payment card or cards used in this
    /// transaction.
    #[prost(message, optional, tag = "2")]
    pub card_signals: ::core::option::Option<fraud_signals::CardSignals>,
}
/// Nested message and enum types in `FraudSignals`.
pub mod fraud_signals {
    /// Signals describing the user involved in this transaction.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct UserSignals {
        /// Output only. This user (based on email, phone, and other identifiers) has
        /// been seen on the internet for at least this number of days.
        #[prost(int32, tag = "1")]
        pub active_days_lower_bound: i32,
        /// Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic
        /// components in their identity, such as a randomly generated email address,
        /// temporary phone number, or fake shipping address.
        #[prost(float, tag = "2")]
        pub synthetic_risk: f32,
    }
    /// Signals describing the payment card used in this transaction.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CardSignals {
        /// Output only. The labels for the payment card in this transaction.
        #[prost(
            enumeration = "card_signals::CardLabel",
            repeated,
            packed = "false",
            tag = "1"
        )]
        pub card_labels: ::prost::alloc::vec::Vec<i32>,
    }
    /// Nested message and enum types in `CardSignals`.
    pub mod card_signals {
        /// Risk labels describing the card being assessed, such as its funding
        /// mechanism.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum CardLabel {
            /// No label specified.
            Unspecified = 0,
            /// This card has been detected as prepaid.
            Prepaid = 1,
            /// This card has been detected as virtual, such as a card number generated
            /// for a single transaction or merchant.
            Virtual = 2,
            /// This card has been detected as being used in an unexpected geographic
            /// location.
            UnexpectedLocation = 3,
        }
        impl CardLabel {
            /// 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 {
                    CardLabel::Unspecified => "CARD_LABEL_UNSPECIFIED",
                    CardLabel::Prepaid => "PREPAID",
                    CardLabel::Virtual => "VIRTUAL",
                    CardLabel::UnexpectedLocation => "UNEXPECTED_LOCATION",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "CARD_LABEL_UNSPECIFIED" => Some(Self::Unspecified),
                    "PREPAID" => Some(Self::Prepaid),
                    "VIRTUAL" => Some(Self::Virtual),
                    "UNEXPECTED_LOCATION" => Some(Self::UnexpectedLocation),
                    _ => None,
                }
            }
        }
    }
}
/// Information about SMS toll fraud.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SmsTollFraudVerdict {
    /// Output only. Probability of an SMS event being fraudulent.
    /// Values are from 0.0 (lowest) to 1.0 (highest).
    #[prost(float, tag = "1")]
    pub risk: f32,
    /// Output only. Reasons contributing to the SMS toll fraud verdict.
    #[prost(
        enumeration = "sms_toll_fraud_verdict::SmsTollFraudReason",
        repeated,
        packed = "false",
        tag = "2"
    )]
    pub reasons: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `SmsTollFraudVerdict`.
pub mod sms_toll_fraud_verdict {
    /// Reasons contributing to the SMS toll fraud verdict.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SmsTollFraudReason {
        /// Default unspecified reason
        Unspecified = 0,
        /// The provided phone number was invalid
        InvalidPhoneNumber = 1,
    }
    impl SmsTollFraudReason {
        /// 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 {
                SmsTollFraudReason::Unspecified => "SMS_TOLL_FRAUD_REASON_UNSPECIFIED",
                SmsTollFraudReason::InvalidPhoneNumber => "INVALID_PHONE_NUMBER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SMS_TOLL_FRAUD_REASON_UNSPECIFIED" => Some(Self::Unspecified),
                "INVALID_PHONE_NUMBER" => Some(Self::InvalidPhoneNumber),
                _ => None,
            }
        }
    }
}
/// Assessment for Phone Fraud
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhoneFraudAssessment {
    /// Output only. Assessment of this phone event for risk of SMS toll fraud.
    #[prost(message, optional, tag = "1")]
    pub sms_toll_fraud_verdict: ::core::option::Option<SmsTollFraudVerdict>,
}
/// Account defender risk assessment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountDefenderAssessment {
    /// Output only. Labels for this request.
    #[prost(
        enumeration = "account_defender_assessment::AccountDefenderLabel",
        repeated,
        packed = "false",
        tag = "1"
    )]
    pub labels: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `AccountDefenderAssessment`.
pub mod account_defender_assessment {
    /// Labels returned by account defender for this request.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AccountDefenderLabel {
        /// Default unspecified type.
        Unspecified = 0,
        /// The request matches a known good profile for the user.
        ProfileMatch = 1,
        /// The request is potentially a suspicious login event and must be further
        /// verified either through multi-factor authentication or another system.
        SuspiciousLoginActivity = 2,
        /// The request matched a profile that previously had suspicious account
        /// creation behavior. This can mean that this is a fake account.
        SuspiciousAccountCreation = 3,
        /// The account in the request has a high number of related accounts. It does
        /// not necessarily imply that the account is bad but can require further
        /// investigation.
        RelatedAccountsNumberHigh = 4,
    }
    impl AccountDefenderLabel {
        /// 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 {
                AccountDefenderLabel::Unspecified => "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED",
                AccountDefenderLabel::ProfileMatch => "PROFILE_MATCH",
                AccountDefenderLabel::SuspiciousLoginActivity => {
                    "SUSPICIOUS_LOGIN_ACTIVITY"
                }
                AccountDefenderLabel::SuspiciousAccountCreation => {
                    "SUSPICIOUS_ACCOUNT_CREATION"
                }
                AccountDefenderLabel::RelatedAccountsNumberHigh => {
                    "RELATED_ACCOUNTS_NUMBER_HIGH"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED" => Some(Self::Unspecified),
                "PROFILE_MATCH" => Some(Self::ProfileMatch),
                "SUSPICIOUS_LOGIN_ACTIVITY" => Some(Self::SuspiciousLoginActivity),
                "SUSPICIOUS_ACCOUNT_CREATION" => Some(Self::SuspiciousAccountCreation),
                "RELATED_ACCOUNTS_NUMBER_HIGH" => Some(Self::RelatedAccountsNumberHigh),
                _ => None,
            }
        }
    }
}
/// The create key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateKeyRequest {
    /// Required. The name of the project in which the key is created, in the
    /// format `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Information to create a reCAPTCHA Enterprise key.
    #[prost(message, optional, tag = "2")]
    pub key: ::core::option::Option<Key>,
}
/// The list keys request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListKeysRequest {
    /// Required. The name of the project that contains the keys that are
    /// listed, in the format `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of keys to return. Default is 10. Max limit is
    /// 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The next_page_token value returned from a previous.
    /// ListKeysRequest, if any.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response to request to list keys in a project.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListKeysResponse {
    /// Key details.
    #[prost(message, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<Key>,
    /// Token to retrieve the next page of results. It is set to empty if no keys
    /// remain in results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The retrieve legacy secret key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveLegacySecretKeyRequest {
    /// Required. The public key name linked to the requested secret key in the
    /// format `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// The get key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeyRequest {
    /// Required. The name of the requested key, in the format
    /// `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The update key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateKeyRequest {
    /// Required. The key to update.
    #[prost(message, optional, tag = "1")]
    pub key: ::core::option::Option<Key>,
    /// Optional. The mask to control which fields of the key get updated. If the
    /// mask is not present, all fields are updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The delete key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteKeyRequest {
    /// Required. The name of the key to be deleted, in the format
    /// `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The create firewall policy request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFirewallPolicyRequest {
    /// Required. The name of the project this policy will apply to, in the format
    /// `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Information to create the policy.
    #[prost(message, optional, tag = "2")]
    pub firewall_policy: ::core::option::Option<FirewallPolicy>,
}
/// The list firewall policies request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFirewallPoliciesRequest {
    /// Required. The name of the project to list the policies for, in the format
    /// `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of policies to return. Default is 10. Max
    /// limit is 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The next_page_token value returned from a previous.
    /// ListFirewallPoliciesRequest, if any.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response to request to list firewall policies belonging to a project.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFirewallPoliciesResponse {
    /// Policy details.
    #[prost(message, repeated, tag = "1")]
    pub firewall_policies: ::prost::alloc::vec::Vec<FirewallPolicy>,
    /// Token to retrieve the next page of results. It is set to empty if no
    /// policies remain in results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The get firewall policy request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFirewallPolicyRequest {
    /// Required. The name of the requested policy, in the format
    /// `projects/{project}/firewallpolicies/{firewallpolicy}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The update firewall policy request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFirewallPolicyRequest {
    /// Required. The policy to update.
    #[prost(message, optional, tag = "1")]
    pub firewall_policy: ::core::option::Option<FirewallPolicy>,
    /// Optional. The mask to control which fields of the policy get updated. If
    /// the mask is not present, all fields are updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The delete firewall policy request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFirewallPolicyRequest {
    /// Required. The name of the policy to be deleted, in the format
    /// `projects/{project}/firewallpolicies/{firewallpolicy}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The reorder firewall policies request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReorderFirewallPoliciesRequest {
    /// Required. The name of the project to list the policies for, in the format
    /// `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. A list containing all policy names, in the new order. Each name
    /// is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.
    #[prost(string, repeated, tag = "2")]
    pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The reorder firewall policies response message.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReorderFirewallPoliciesResponse {}
/// The migrate key request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrateKeyRequest {
    /// Required. The name of the key to be migrated, in the format
    /// `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. If true, skips the billing check.
    /// A reCAPTCHA Enterprise key or migrated key behaves differently than a
    /// reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see
    /// <https://cloud.google.com/recaptcha/quotas#quota_limit>). To avoid
    /// any disruption of your usage, we check that a billing account is present.
    /// If your usage of reCAPTCHA is under the free quota, you can safely skip the
    /// billing check and proceed with the migration. See
    /// <https://cloud.google.com/recaptcha/docs/billing-information.>
    #[prost(bool, tag = "2")]
    pub skip_billing_check: bool,
}
/// The get metrics request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetricsRequest {
    /// Required. The name of the requested metrics, in the format
    /// `projects/{project}/keys/{key}/metrics`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Metrics for a single Key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metrics {
    /// Output only. Identifier. The name of the metrics, in the format
    /// `projects/{project}/keys/{key}/metrics`.
    #[prost(string, tag = "4")]
    pub name: ::prost::alloc::string::String,
    /// Inclusive start time aligned to a day (UTC).
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Metrics are continuous and in order by dates, and in the granularity
    /// of day. All Key types should have score-based data.
    #[prost(message, repeated, tag = "2")]
    pub score_metrics: ::prost::alloc::vec::Vec<ScoreMetrics>,
    /// Metrics are continuous and in order by dates, and in the granularity
    /// of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have
    /// challenge-based data.
    #[prost(message, repeated, tag = "3")]
    pub challenge_metrics: ::prost::alloc::vec::Vec<ChallengeMetrics>,
}
/// Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party
/// integration with legacy reCAPTCHA.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveLegacySecretKeyResponse {
    /// The secret key (also known as shared secret) authorizes communication
    /// between your application backend and the reCAPTCHA Enterprise server to
    /// create an assessment.
    /// The secret key needs to be kept safe for security purposes.
    #[prost(string, tag = "1")]
    pub legacy_secret_key: ::prost::alloc::string::String,
}
/// A key used to identify and configure applications (web and/or mobile) that
/// use reCAPTCHA Enterprise.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Key {
    /// Identifier. The resource name for the Key in the format
    /// `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Human-readable display name of this key. Modifiable by user.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Optional. See \[Creating and managing labels\]
    /// (<https://cloud.google.com/recaptcha/docs/labels>).
    #[prost(btree_map = "string, string", tag = "6")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The timestamp corresponding to the creation of this key.
    #[prost(message, optional, tag = "7")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Options for user acceptance testing.
    #[prost(message, optional, tag = "9")]
    pub testing_options: ::core::option::Option<TestingOptions>,
    /// Optional. Settings for WAF
    #[prost(message, optional, tag = "10")]
    pub waf_settings: ::core::option::Option<WafSettings>,
    /// Platform-specific settings for this key. The key can only be used on a
    /// platform for which the settings are enabled.
    #[prost(oneof = "key::PlatformSettings", tags = "3, 4, 5, 11")]
    pub platform_settings: ::core::option::Option<key::PlatformSettings>,
}
/// Nested message and enum types in `Key`.
pub mod key {
    /// Platform-specific settings for this key. The key can only be used on a
    /// platform for which the settings are enabled.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PlatformSettings {
        /// Settings for keys that can be used by websites.
        #[prost(message, tag = "3")]
        WebSettings(super::WebKeySettings),
        /// Settings for keys that can be used by Android apps.
        #[prost(message, tag = "4")]
        AndroidSettings(super::AndroidKeySettings),
        /// Settings for keys that can be used by iOS apps.
        #[prost(message, tag = "5")]
        IosSettings(super::IosKeySettings),
        /// Settings specific to keys that can be used for reCAPTCHA Express.
        #[prost(message, tag = "11")]
        ExpressSettings(super::ExpressKeySettings),
    }
}
/// Options for user acceptance testing.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TestingOptions {
    /// Optional. All assessments for this Key will return this score. Must be
    /// between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
    #[prost(float, tag = "1")]
    pub testing_score: f32,
    /// Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all
    /// challenge requests for this site will return nocaptcha if NOCAPTCHA, or an
    /// unsolvable challenge if CHALLENGE.
    #[prost(enumeration = "testing_options::TestingChallenge", tag = "2")]
    pub testing_challenge: i32,
}
/// Nested message and enum types in `TestingOptions`.
pub mod testing_options {
    /// Enum that represents the challenge option for challenge-based (CHECKBOX,
    /// INVISIBLE) testing keys.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TestingChallenge {
        /// Perform the normal risk analysis and return either nocaptcha or a
        /// challenge depending on risk and trust factors.
        Unspecified = 0,
        /// Challenge requests for this key always return a nocaptcha, which
        /// does not require a solution.
        Nocaptcha = 1,
        /// Challenge requests for this key always return an unsolvable
        /// challenge.
        UnsolvableChallenge = 2,
    }
    impl TestingChallenge {
        /// 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 {
                TestingChallenge::Unspecified => "TESTING_CHALLENGE_UNSPECIFIED",
                TestingChallenge::Nocaptcha => "NOCAPTCHA",
                TestingChallenge::UnsolvableChallenge => "UNSOLVABLE_CHALLENGE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TESTING_CHALLENGE_UNSPECIFIED" => Some(Self::Unspecified),
                "NOCAPTCHA" => Some(Self::Nocaptcha),
                "UNSOLVABLE_CHALLENGE" => Some(Self::UnsolvableChallenge),
                _ => None,
            }
        }
    }
}
/// Settings specific to keys that can be used by websites.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebKeySettings {
    /// Optional. If set to true, it means allowed_domains will not be enforced.
    #[prost(bool, tag = "3")]
    pub allow_all_domains: bool,
    /// Optional. Domains or subdomains of websites allowed to use the key. All
    /// subdomains of an allowed domain are automatically allowed. A valid domain
    /// requires a host and must not include any path, port, query or fragment.
    /// Examples: 'example.com' or 'subdomain.example.com'
    #[prost(string, repeated, tag = "1")]
    pub allowed_domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. If set to true, the key can be used on AMP (Accelerated Mobile
    /// Pages) websites. This is supported only for the SCORE integration type.
    #[prost(bool, tag = "2")]
    pub allow_amp_traffic: bool,
    /// Required. Describes how this key is integrated with the website.
    #[prost(enumeration = "web_key_settings::IntegrationType", tag = "4")]
    pub integration_type: i32,
    /// Optional. Settings for the frequency and difficulty at which this key
    /// triggers captcha challenges. This should only be specified for
    /// IntegrationTypes CHECKBOX and INVISIBLE.
    #[prost(enumeration = "web_key_settings::ChallengeSecurityPreference", tag = "5")]
    pub challenge_security_preference: i32,
}
/// Nested message and enum types in `WebKeySettings`.
pub mod web_key_settings {
    /// Enum that represents the integration types for web keys.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum IntegrationType {
        /// Default type that indicates this enum hasn't been specified. This is not
        /// a valid IntegrationType, one of the other types must be specified
        /// instead.
        Unspecified = 0,
        /// Only used to produce scores. It doesn't display the "I'm not a robot"
        /// checkbox and never shows captcha challenges.
        Score = 1,
        /// Displays the "I'm not a robot" checkbox and may show captcha challenges
        /// after it is checked.
        Checkbox = 2,
        /// Doesn't display the "I'm not a robot" checkbox, but may show captcha
        /// challenges after risk analysis.
        Invisible = 3,
    }
    impl IntegrationType {
        /// 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 {
                IntegrationType::Unspecified => "INTEGRATION_TYPE_UNSPECIFIED",
                IntegrationType::Score => "SCORE",
                IntegrationType::Checkbox => "CHECKBOX",
                IntegrationType::Invisible => "INVISIBLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "INTEGRATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SCORE" => Some(Self::Score),
                "CHECKBOX" => Some(Self::Checkbox),
                "INVISIBLE" => Some(Self::Invisible),
                _ => None,
            }
        }
    }
    /// Enum that represents the possible challenge frequency and difficulty
    /// configurations for a web key.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ChallengeSecurityPreference {
        /// Default type that indicates this enum hasn't been specified.
        Unspecified = 0,
        /// Key tends to show fewer and easier challenges.
        Usability = 1,
        /// Key tends to show balanced (in amount and difficulty) challenges.
        Balance = 2,
        /// Key tends to show more and harder challenges.
        Security = 3,
    }
    impl ChallengeSecurityPreference {
        /// 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 {
                ChallengeSecurityPreference::Unspecified => {
                    "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED"
                }
                ChallengeSecurityPreference::Usability => "USABILITY",
                ChallengeSecurityPreference::Balance => "BALANCE",
                ChallengeSecurityPreference::Security => "SECURITY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED" => Some(Self::Unspecified),
                "USABILITY" => Some(Self::Usability),
                "BALANCE" => Some(Self::Balance),
                "SECURITY" => Some(Self::Security),
                _ => None,
            }
        }
    }
}
/// Settings specific to keys that can be used by Android apps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndroidKeySettings {
    /// Optional. If set to true, allowed_package_names are not enforced.
    #[prost(bool, tag = "2")]
    pub allow_all_package_names: bool,
    /// Optional. Android package names of apps allowed to use the key.
    /// Example: 'com.companyname.appname'
    #[prost(string, repeated, tag = "1")]
    pub allowed_package_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Set to true for keys that are used in an Android application that
    /// is available for download in app stores in addition to the Google Play
    /// Store.
    #[prost(bool, tag = "3")]
    pub support_non_google_app_store_distribution: bool,
}
/// Settings specific to keys that can be used by iOS apps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IosKeySettings {
    /// Optional. If set to true, allowed_bundle_ids are not enforced.
    #[prost(bool, tag = "2")]
    pub allow_all_bundle_ids: bool,
    /// Optional. iOS bundle ids of apps allowed to use the key.
    /// Example: 'com.companyname.productname.appname'
    #[prost(string, repeated, tag = "1")]
    pub allowed_bundle_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Apple Developer account details for the app that is protected by
    /// the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks
    /// like Apple App Attest and Apple DeviceCheck to protect your app from abuse.
    /// Providing these fields allows reCAPTCHA Enterprise to get a better
    /// assessment of the integrity of your app.
    #[prost(message, optional, tag = "3")]
    pub apple_developer_id: ::core::option::Option<AppleDeveloperId>,
}
/// Settings specific to keys that can be used for reCAPTCHA Express.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExpressKeySettings {}
/// Contains fields that are required to perform Apple-specific integrity checks.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppleDeveloperId {
    /// Required. Input only. A private key (downloaded as a text file with a .p8
    /// file extension) generated for your Apple Developer account. Ensure that
    /// Apple DeviceCheck is enabled for the private key.
    #[prost(string, tag = "1")]
    pub private_key: ::prost::alloc::string::String,
    /// Required. The Apple developer key ID (10-character string).
    #[prost(string, tag = "2")]
    pub key_id: ::prost::alloc::string::String,
    /// Required. The Apple team ID (10-character string) owning the provisioning
    /// profile used to build your application.
    #[prost(string, tag = "3")]
    pub team_id: ::prost::alloc::string::String,
}
/// Score distribution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScoreDistribution {
    /// Map key is score value multiplied by 100. The scores are discrete values
    /// between \[0, 1\]. The maximum number of buckets is on order of a few dozen,
    /// but typically much lower (ie. 10).
    #[prost(btree_map = "int32, int64", tag = "1")]
    pub score_buckets: ::prost::alloc::collections::BTreeMap<i32, i64>,
}
/// Metrics related to scoring.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScoreMetrics {
    /// Aggregated score metrics for all traffic.
    #[prost(message, optional, tag = "1")]
    pub overall_metrics: ::core::option::Option<ScoreDistribution>,
    /// Action-based metrics. The map key is the action name which specified by the
    /// site owners at time of the "execute" client-side call.
    #[prost(btree_map = "string, message", tag = "2")]
    pub action_metrics: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ScoreDistribution,
    >,
}
/// Metrics related to challenges.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ChallengeMetrics {
    /// Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
    /// to a count of pageloads for pages that include reCAPTCHA.
    #[prost(int64, tag = "1")]
    pub pageload_count: i64,
    /// Count of nocaptchas (successful verification without a challenge) issued.
    #[prost(int64, tag = "2")]
    pub nocaptcha_count: i64,
    /// Count of submitted challenge solutions that were incorrect or otherwise
    /// deemed suspicious such that a subsequent challenge was triggered.
    #[prost(int64, tag = "3")]
    pub failed_count: i64,
    /// Count of nocaptchas (successful verification without a challenge) plus
    /// submitted challenge solutions that were correct and resulted in
    /// verification.
    #[prost(int64, tag = "4")]
    pub passed_count: i64,
}
/// Policy config assessment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FirewallPolicyAssessment {
    /// Output only. If the processing of a policy config fails, an error is
    /// populated and the firewall_policy is left empty.
    #[prost(message, optional, tag = "5")]
    pub error: ::core::option::Option<super::super::super::rpc::Status>,
    /// Output only. The policy that matched the request. If more than one policy
    /// may match, this is the first match. If no policy matches the incoming
    /// request, the policy field is left empty.
    #[prost(message, optional, tag = "8")]
    pub firewall_policy: ::core::option::Option<FirewallPolicy>,
}
/// An individual action. Each action represents what to do if a policy
/// matches.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FirewallAction {
    #[prost(oneof = "firewall_action::FirewallActionOneof", tags = "1, 2, 6, 5, 3, 4")]
    pub firewall_action_oneof: ::core::option::Option<
        firewall_action::FirewallActionOneof,
    >,
}
/// Nested message and enum types in `FirewallAction`.
pub mod firewall_action {
    /// An allow action continues processing a request unimpeded.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct AllowAction {}
    /// A block action serves an HTTP error code a prevents the request from
    /// hitting the backend.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct BlockAction {}
    /// An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript
    /// code into the HTML returned by the site backend. This reCAPTCHA
    /// script is tasked with collecting user signals on the requested web page,
    /// issuing tokens as a cookie within the site domain, and enabling their
    /// utilization in subsequent page requests.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct IncludeRecaptchaScriptAction {}
    /// A redirect action returns a 307 (temporary redirect) response, pointing
    /// the user to a ReCaptcha interstitial page to attach a token.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct RedirectAction {}
    /// A substitute action transparently serves a different page than the one
    /// requested.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SubstituteAction {
        /// Optional. The address to redirect to. The target is a relative path in
        /// the current host. Example: "/blog/404.html".
        #[prost(string, tag = "1")]
        pub path: ::prost::alloc::string::String,
    }
    /// A set header action sets a header and forwards the request to the
    /// backend. This can be used to trigger custom protection implemented on the
    /// backend.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SetHeaderAction {
        /// Optional. The header key to set in the request to the backend server.
        #[prost(string, tag = "1")]
        pub key: ::prost::alloc::string::String,
        /// Optional. The header value to set in the request to the backend server.
        #[prost(string, tag = "2")]
        pub value: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FirewallActionOneof {
        /// The user request did not match any policy and should be allowed
        /// access to the requested resource.
        #[prost(message, tag = "1")]
        Allow(AllowAction),
        /// This action will deny access to a given page. The user will get an HTTP
        /// error code.
        #[prost(message, tag = "2")]
        Block(BlockAction),
        /// This action will inject reCAPTCHA JavaScript code into the HTML page
        /// returned by the site backend.
        #[prost(message, tag = "6")]
        IncludeRecaptchaScript(IncludeRecaptchaScriptAction),
        /// This action will redirect the request to a ReCaptcha interstitial to
        /// attach a token.
        #[prost(message, tag = "5")]
        Redirect(RedirectAction),
        /// This action will transparently serve a different page to an offending
        /// user.
        #[prost(message, tag = "3")]
        Substitute(SubstituteAction),
        /// This action will set a custom header but allow the request to continue
        /// to the customer backend.
        #[prost(message, tag = "4")]
        SetHeader(SetHeaderAction),
    }
}
/// A FirewallPolicy represents a single matching pattern and resulting actions
/// to take.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FirewallPolicy {
    /// Identifier. The resource name for the FirewallPolicy in the format
    /// `projects/{project}/firewallpolicies/{firewallpolicy}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A description of what this policy aims to achieve, for
    /// convenience purposes. The description can at most include 256 UTF-8
    /// characters.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Optional. The path for which this policy applies, specified as a glob
    /// pattern. For more information on glob, see the [manual
    /// page](<https://man7.org/linux/man-pages/man7/glob.7.html>).
    /// A path has a max length of 200 characters.
    #[prost(string, tag = "4")]
    pub path: ::prost::alloc::string::String,
    /// Optional. A CEL (Common Expression Language) conditional expression that
    /// specifies if this policy applies to an incoming user request. If this
    /// condition evaluates to true and the requested path matched the path
    /// pattern, the associated actions should be executed by the caller. The
    /// condition string is checked for CEL syntax correctness on creation. For
    /// more information, see the [CEL spec](<https://github.com/google/cel-spec>)
    /// and its [language
    /// definition](<https://github.com/google/cel-spec/blob/master/doc/langdef.md>).
    /// A condition has a max length of 500 characters.
    #[prost(string, tag = "5")]
    pub condition: ::prost::alloc::string::String,
    /// Optional. The actions that the caller should take regarding user access.
    /// There should be at most one terminal action. A terminal action is any
    /// action that forces a response, such as `AllowAction`,
    /// `BlockAction` or `SubstituteAction`.
    /// Zero or more non-terminal actions such as `SetHeader` might be
    /// specified. A single policy can contain up to 16 actions.
    #[prost(message, repeated, tag = "6")]
    pub actions: ::prost::alloc::vec::Vec<FirewallAction>,
}
/// The request message to list memberships in a related account group.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelatedAccountGroupMembershipsRequest {
    /// Required. The resource name for the related account group in the format
    /// `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of accounts to return. The service might
    /// return fewer than this value. If unspecified, at most 50 accounts are
    /// returned. The maximum value is 1000; values above 1000 are coerced to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// `ListRelatedAccountGroupMemberships` call.
    ///
    /// When paginating, all other parameters provided to
    /// `ListRelatedAccountGroupMemberships` must match the call that provided the
    /// page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// The response to a `ListRelatedAccountGroupMemberships` call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelatedAccountGroupMembershipsResponse {
    /// The memberships listed by the query.
    #[prost(message, repeated, tag = "1")]
    pub related_account_group_memberships: ::prost::alloc::vec::Vec<
        RelatedAccountGroupMembership,
    >,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The request message to list related account groups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelatedAccountGroupsRequest {
    /// Required. The name of the project to list related account groups from, in
    /// the format `projects/{project}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of groups to return. The service might return
    /// fewer than this value. If unspecified, at most 50 groups are returned. The
    /// maximum value is 1000; values above 1000 are coerced to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous `ListRelatedAccountGroups`
    /// call. Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to
    /// `ListRelatedAccountGroups` must match the call that provided the page
    /// token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// The response to a `ListRelatedAccountGroups` call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelatedAccountGroupsResponse {
    /// The groups of related accounts listed by the query.
    #[prost(message, repeated, tag = "1")]
    pub related_account_groups: ::prost::alloc::vec::Vec<RelatedAccountGroup>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The request message to search related account group memberships.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRelatedAccountGroupMembershipsRequest {
    /// Required. The name of the project to search related account group
    /// memberships from. Specify the project name in the following format:
    /// `projects/{project}`.
    #[prost(string, tag = "1")]
    pub project: ::prost::alloc::string::String,
    /// Optional. The unique stable account identifier used to search connections.
    /// The identifier should correspond to an `account_id` provided in a previous
    /// `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id
    /// or account_id must be set, but not both.
    #[prost(string, tag = "5")]
    pub account_id: ::prost::alloc::string::String,
    /// Optional. Deprecated: use `account_id` instead.
    /// The unique stable hashed account identifier used to search connections. The
    /// identifier should correspond to a `hashed_account_id` provided in a
    /// previous `CreateAssessment` or `AnnotateAssessment` call. Either
    /// hashed_account_id or account_id must be set, but not both.
    #[deprecated]
    #[prost(bytes = "bytes", tag = "2")]
    pub hashed_account_id: ::prost::bytes::Bytes,
    /// Optional. The maximum number of groups to return. The service might return
    /// fewer than this value. If unspecified, at most 50 groups are returned. The
    /// maximum value is 1000; values above 1000 are coerced to 1000.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the
    /// subsequent page.
    ///
    /// When paginating, all other parameters provided to
    /// `SearchRelatedAccountGroupMemberships` must match the call that provided
    /// the page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// The response to a `SearchRelatedAccountGroupMemberships` call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRelatedAccountGroupMembershipsResponse {
    /// The queried memberships.
    #[prost(message, repeated, tag = "1")]
    pub related_account_group_memberships: ::prost::alloc::vec::Vec<
        RelatedAccountGroupMembership,
    >,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// The AddIpOverride request message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddIpOverrideRequest {
    /// Required. The name of the key to which the IP override is added, in the
    /// format `projects/{project}/keys/{key}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. IP override added to the key.
    #[prost(message, optional, tag = "2")]
    pub ip_override_data: ::core::option::Option<IpOverrideData>,
}
/// Response for AddIpOverride.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AddIpOverrideResponse {}
/// A membership in a group of related accounts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelatedAccountGroupMembership {
    /// Required. Identifier. The resource name for this membership in the format
    /// `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The unique stable account identifier of the member. The identifier
    /// corresponds to an `account_id` provided in a previous `CreateAssessment` or
    /// `AnnotateAssessment` call.
    #[prost(string, tag = "4")]
    pub account_id: ::prost::alloc::string::String,
    /// Deprecated: use `account_id` instead.
    /// The unique stable hashed account identifier of the member. The identifier
    /// corresponds to a `hashed_account_id` provided in a previous
    /// `CreateAssessment` or `AnnotateAssessment` call.
    #[deprecated]
    #[prost(bytes = "bytes", tag = "2")]
    pub hashed_account_id: ::prost::bytes::Bytes,
}
/// A group of related accounts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelatedAccountGroup {
    /// Required. Identifier. The resource name for the related account group in
    /// the format
    /// `projects/{project}/relatedaccountgroups/{related_account_group}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Settings specific to keys that can be used for WAF (Web Application
/// Firewall).
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WafSettings {
    /// Required. The WAF service that uses this key.
    #[prost(enumeration = "waf_settings::WafService", tag = "1")]
    pub waf_service: i32,
    /// Required. The WAF feature for which this key is enabled.
    #[prost(enumeration = "waf_settings::WafFeature", tag = "2")]
    pub waf_feature: i32,
}
/// Nested message and enum types in `WafSettings`.
pub mod waf_settings {
    /// Supported WAF features. For more information, see
    /// <https://cloud.google.com/recaptcha/docs/usecase#comparison_of_features.>
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WafFeature {
        /// Undefined feature.
        Unspecified = 0,
        /// Redirects suspicious traffic to reCAPTCHA.
        ChallengePage = 1,
        /// Use reCAPTCHA session-tokens to protect the whole user session on the
        /// site's domain.
        SessionToken = 2,
        /// Use reCAPTCHA action-tokens to protect user actions.
        ActionToken = 3,
        /// Use reCAPTCHA WAF express protection to protect any content other than
        /// web pages, like APIs and IoT devices.
        Express = 5,
    }
    impl WafFeature {
        /// 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 {
                WafFeature::Unspecified => "WAF_FEATURE_UNSPECIFIED",
                WafFeature::ChallengePage => "CHALLENGE_PAGE",
                WafFeature::SessionToken => "SESSION_TOKEN",
                WafFeature::ActionToken => "ACTION_TOKEN",
                WafFeature::Express => "EXPRESS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "WAF_FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
                "CHALLENGE_PAGE" => Some(Self::ChallengePage),
                "SESSION_TOKEN" => Some(Self::SessionToken),
                "ACTION_TOKEN" => Some(Self::ActionToken),
                "EXPRESS" => Some(Self::Express),
                _ => None,
            }
        }
    }
    /// Web Application Firewalls supported by reCAPTCHA Enterprise.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WafService {
        /// Undefined WAF
        Unspecified = 0,
        /// Cloud Armor
        Ca = 1,
        /// Fastly
        Fastly = 3,
        /// Cloudflare
        Cloudflare = 4,
    }
    impl WafService {
        /// 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 {
                WafService::Unspecified => "WAF_SERVICE_UNSPECIFIED",
                WafService::Ca => "CA",
                WafService::Fastly => "FASTLY",
                WafService::Cloudflare => "CLOUDFLARE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "WAF_SERVICE_UNSPECIFIED" => Some(Self::Unspecified),
                "CA" => Some(Self::Ca),
                "FASTLY" => Some(Self::Fastly),
                "CLOUDFLARE" => Some(Self::Cloudflare),
                _ => None,
            }
        }
    }
}
/// The environment creating the assessment. This describes your environment
/// (the system invoking CreateAssessment), NOT the environment of your user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssessmentEnvironment {
    /// Optional. Identifies the client module initiating the CreateAssessment
    /// request. This can be the link to the client module's project. Examples
    /// include:
    /// - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager"
    /// - "cloud.google.com/recaptcha/docs/implement-waf-akamai"
    /// - "cloud.google.com/recaptcha/docs/implement-waf-cloudflare"
    /// - "wordpress.org/plugins/recaptcha-something"
    #[prost(string, tag = "1")]
    pub client: ::prost::alloc::string::String,
    /// Optional. The version of the client module. For example, "1.0.0".
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
}
/// Information about the IP or IP range override.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IpOverrideData {
    /// Required. The IP address to override (can be IPv4, IPv6 or CIDR).
    /// The IP override must be a valid IPv4 or IPv6 address, or a CIDR range.
    /// The IP override must be a public IP address.
    /// Example of IPv4: 168.192.5.6
    /// Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B
    /// Example of IPv4 with CIDR: 168.192.5.0/24
    /// Example of IPv6 with CIDR: 2001:0DB8:1234::/48
    #[prost(string, tag = "1")]
    pub ip: ::prost::alloc::string::String,
    /// Required. Describes the type of IP override.
    #[prost(enumeration = "ip_override_data::OverrideType", tag = "3")]
    pub override_type: i32,
}
/// Nested message and enum types in `IpOverrideData`.
pub mod ip_override_data {
    /// Enum that represents the type of IP override.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OverrideType {
        /// Default override type that indicates this enum hasn't been specified.
        Unspecified = 0,
        /// Allowlist the IP address; i.e. give a `risk_analysis.score` of 0.9 for
        /// all valid assessments.
        Allow = 1,
    }
    impl OverrideType {
        /// 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 {
                OverrideType::Unspecified => "OVERRIDE_TYPE_UNSPECIFIED",
                OverrideType::Allow => "ALLOW",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OVERRIDE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ALLOW" => Some(Self::Allow),
                _ => None,
            }
        }
    }
}
/// Generated client implementations.
pub mod recaptcha_enterprise_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service to determine the likelihood an event is legitimate.
    #[derive(Debug, Clone)]
    pub struct RecaptchaEnterpriseServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> RecaptchaEnterpriseServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> RecaptchaEnterpriseServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            RecaptchaEnterpriseServiceClient::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 an Assessment of the likelihood an event is legitimate.
        pub async fn create_assessment(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateAssessmentRequest>,
        ) -> std::result::Result<tonic::Response<super::Assessment>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateAssessment",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "CreateAssessment",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Annotates a previously created Assessment to provide additional information
        /// on whether the event turned out to be authentic or fraudulent.
        pub async fn annotate_assessment(
            &mut self,
            request: impl tonic::IntoRequest<super::AnnotateAssessmentRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AnnotateAssessmentResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AnnotateAssessment",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "AnnotateAssessment",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new reCAPTCHA Enterprise key.
        pub async fn create_key(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateKeyRequest>,
        ) -> std::result::Result<tonic::Response<super::Key>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "CreateKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the list of all keys that belong to a project.
        pub async fn list_keys(
            &mut self,
            request: impl tonic::IntoRequest<super::ListKeysRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListKeysResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListKeys",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "ListKeys",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the secret key related to the specified public key.
        /// You must use the legacy secret key only in a 3rd party integration with
        /// legacy reCAPTCHA.
        pub async fn retrieve_legacy_secret_key(
            &mut self,
            request: impl tonic::IntoRequest<super::RetrieveLegacySecretKeyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RetrieveLegacySecretKeyResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/RetrieveLegacySecretKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "RetrieveLegacySecretKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified key.
        pub async fn get_key(
            &mut self,
            request: impl tonic::IntoRequest<super::GetKeyRequest>,
        ) -> std::result::Result<tonic::Response<super::Key>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "GetKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified key.
        pub async fn update_key(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateKeyRequest>,
        ) -> std::result::Result<tonic::Response<super::Key>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "UpdateKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified key.
        pub async fn delete_key(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteKeyRequest>,
        ) -> 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "DeleteKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
        /// Once a key is migrated, it can be used from either product. SiteVerify
        /// requests are billed as CreateAssessment calls. You must be
        /// authenticated as one of the current owners of the reCAPTCHA Key, and
        /// your user must have the reCAPTCHA Enterprise Admin IAM role in the
        /// destination project.
        pub async fn migrate_key(
            &mut self,
            request: impl tonic::IntoRequest<super::MigrateKeyRequest>,
        ) -> std::result::Result<tonic::Response<super::Key>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/MigrateKey",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "MigrateKey",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Adds an IP override to a key. The following restrictions hold:
        /// * The maximum number of IP overrides per key is 100.
        /// * For any conflict (such as IP already exists or IP part of an existing
        ///   IP range), an error is returned.
        pub async fn add_ip_override(
            &mut self,
            request: impl tonic::IntoRequest<super::AddIpOverrideRequest>,
        ) -> std::result::Result<
            tonic::Response<super::AddIpOverrideResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/AddIpOverride",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "AddIpOverride",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get some aggregated metrics for a Key. This data can be used to build
        /// dashboards.
        pub async fn get_metrics(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMetricsRequest>,
        ) -> std::result::Result<tonic::Response<super::Metrics>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetMetrics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "GetMetrics",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
        /// Enterprise actions can be executed.
        /// A project may have a maximum of 1000 policies.
        pub async fn create_firewall_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateFirewallPolicyRequest>,
        ) -> std::result::Result<tonic::Response<super::FirewallPolicy>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/CreateFirewallPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "CreateFirewallPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the list of all firewall policies that belong to a project.
        pub async fn list_firewall_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::ListFirewallPoliciesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListFirewallPoliciesResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListFirewallPolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "ListFirewallPolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified firewall policy.
        pub async fn get_firewall_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFirewallPolicyRequest>,
        ) -> std::result::Result<tonic::Response<super::FirewallPolicy>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/GetFirewallPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "GetFirewallPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified firewall policy.
        pub async fn update_firewall_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateFirewallPolicyRequest>,
        ) -> std::result::Result<tonic::Response<super::FirewallPolicy>, 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/UpdateFirewallPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "UpdateFirewallPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified firewall policy.
        pub async fn delete_firewall_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteFirewallPolicyRequest>,
        ) -> 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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/DeleteFirewallPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "DeleteFirewallPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Reorders all firewall policies.
        pub async fn reorder_firewall_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::ReorderFirewallPoliciesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ReorderFirewallPoliciesResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ReorderFirewallPolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "ReorderFirewallPolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List groups of related accounts.
        pub async fn list_related_account_groups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRelatedAccountGroupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRelatedAccountGroupsResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "ListRelatedAccountGroups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get memberships in a group of related accounts.
        pub async fn list_related_account_group_memberships(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ListRelatedAccountGroupMembershipsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::ListRelatedAccountGroupMembershipsResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/ListRelatedAccountGroupMemberships",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "ListRelatedAccountGroupMemberships",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Search group memberships related to a given account.
        pub async fn search_related_account_group_memberships(
            &mut self,
            request: impl tonic::IntoRequest<
                super::SearchRelatedAccountGroupMembershipsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::SearchRelatedAccountGroupMembershipsResponse>,
            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.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService/SearchRelatedAccountGroupMemberships",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService",
                        "SearchRelatedAccountGroupMemberships",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}