asana2 0.5.0

Fluent OpenAPI client for Asana
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
//! [`AsanaClient`](struct.AsanaClient.html) is the main entry point for this library.
//!
//! Library created with [`libninja`](https://www.libninja.com).
#![allow(non_camel_case_types)]
#![allow(unused)]
pub mod model;
pub mod request;
pub use httpclient::{Error, Result, InMemoryResponseExt};
use std::sync::{Arc, OnceLock};
use crate::model::*;
use base64::{Engine, engine::general_purpose::STANDARD_NO_PAD};
mod serde;
static SHARED_HTTPCLIENT: OnceLock<httpclient::Client> = OnceLock::new();
pub fn default_http_client() -> httpclient::Client {
    httpclient::Client::new().base_url("https://app.asana.com/api/1.0")
}
/// Use this method if you want to add custom middleware to the httpclient.
/// Example usage:
///
/// ```
/// init_http_client(|| {
///     default_http_client()
///         .with_middleware(..)
///  });
/// ```
pub fn init_http_client(init: fn() -> httpclient::Client) {
    SHARED_HTTPCLIENT.get_or_init(init);
}
fn shared_http_client() -> &'static httpclient::Client {
    SHARED_HTTPCLIENT.get_or_init(default_http_client)
}
static SHARED_OAUTH2FLOW: OnceLock<httpclient_oauth2::OAuth2Flow> = OnceLock::new();
pub fn init_oauth2_flow(init: fn() -> httpclient_oauth2::OAuth2Flow) {
    SHARED_OAUTH2FLOW.get_or_init(init);
}
fn shared_oauth2_flow() -> &'static httpclient_oauth2::OAuth2Flow {
    let client_id = std::env::var("ASANA_CLIENT_ID")
        .expect("ASANA_CLIENT_ID must be set");
    let client_secret = std::env::var("ASANA_CLIENT_SECRET")
        .expect("ASANA_CLIENT_SECRET must be set");
    let redirect_uri = std::env::var("ASANA_REDIRECT_URI")
        .expect("ASANA_REDIRECT_URI must be set");
    SHARED_OAUTH2FLOW
        .get_or_init(|| httpclient_oauth2::OAuth2Flow {
            client_id,
            client_secret,
            init_endpoint: "https://app.asana.com/-/oauth_authorize".to_string(),
            exchange_endpoint: "https://app.asana.com/-/oauth_token".to_string(),
            refresh_endpoint: "https://app.asana.com/-/oauth_token".to_string(),
            redirect_uri,
        })
}
#[derive(Clone)]
pub struct FluentRequest<'a, T> {
    pub(crate) client: &'a AsanaClient,
    pub params: T,
}
pub struct AsanaClient {
    client: &'static httpclient::Client,
    authentication: AsanaAuth,
}
impl AsanaClient {
    pub fn from_env() -> Self {
        Self {
            client: shared_http_client(),
            authentication: AsanaAuth::from_env(),
        }
    }
    pub fn with_auth(authentication: AsanaAuth) -> Self {
        Self {
            client: shared_http_client(),
            authentication,
        }
    }
}
impl AsanaClient {
    pub(crate) fn authenticate<'a>(
        &self,
        mut r: httpclient::RequestBuilder<'a>,
    ) -> httpclient::RequestBuilder<'a> {
        match &self.authentication {
            AsanaAuth::PersonalAccessToken { personal_access_token } => {
                r = r.bearer_auth(personal_access_token);
            }
            AsanaAuth::OAuth2 { middleware } => {
                r.middlewares.insert(0, middleware.clone());
            }
        }
        r
    }
    /**Get an attachment

Get the full record for a single attachment.*/
    pub fn get_attachment(
        &self,
        attachment_gid: &str,
    ) -> FluentRequest<'_, request::GetAttachmentRequest> {
        FluentRequest {
            client: self,
            params: request::GetAttachmentRequest {
                attachment_gid: attachment_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Delete an attachment

Deletes a specific, existing attachment.

Returns an empty data record.*/
    pub fn delete_attachment(
        &self,
        attachment_gid: &str,
    ) -> FluentRequest<'_, request::DeleteAttachmentRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteAttachmentRequest {
                attachment_gid: attachment_gid.to_owned(),
                opt_pretty: None,
            },
        }
    }
    /**Get attachments from an object

Returns the compact records for all attachments on the object.

There are three possible `parent` values for this request: `project`, `project_brief`, and `task`. For a project, an attachment refers to a file uploaded to the "Key resources" section in the project Overview. For a project brief, an attachment refers to inline files in the project brief itself. For a task, an attachment refers to a file directly associated to that task.

Note that within the Asana app, inline images in the task description do not appear in the index of image thumbnails nor as stories in the task. However, requests made to `GET /attachments` for a task will return all of the images in the task, including inline images.*/
    pub fn get_attachments_for_object(
        &self,
        parent: &str,
    ) -> FluentRequest<'_, request::GetAttachmentsForObjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetAttachmentsForObjectRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                parent: parent.to_owned(),
            },
        }
    }
    /**Upload an attachment

Upload an attachment.

This method uploads an attachment on an object and returns the compact
record for the created attachment object. This is possible by either:

- Providing the URL of the external resource being attached, or
- Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach
files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API

The 100MB size limit on attachments in Asana is enforced on this endpoint.

This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded.

Requests made should follow the HTTP/1.1 specification that line
terminators are of the form `CRLF` or `\r\n` outlined
[here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.*/
    pub fn create_attachment_for_object(
        &self,
    ) -> FluentRequest<'_, request::CreateAttachmentForObjectRequest> {
        FluentRequest {
            client: self,
            params: request::CreateAttachmentForObjectRequest {
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get audit log events

Retrieve the audit log events that have been captured in your domain.

This endpoint will return a list of [AuditLogEvent](/reference/audit-log-api) objects, sorted by creation time in ascending order. Note that the Audit Log API captures events from October 8th, 2021 and later. Queries for events before this date will not return results.

There are a number of query parameters (below) that can be used to filter the set of [AuditLogEvent](/reference/audit-log-api) objects that are returned in the response. Any combination of query parameters is valid. When no filters are provided, all of the events that have been captured in your domain will match.

The list of events will always be [paginated](/docs/pagination). The default limit is 1000 events. The next set of events can be retrieved using the `offset` from the previous response. If there are no events that match the provided filters in your domain, the endpoint will return `null` for the `next_page` field. Querying again with the same filters may return new events if they were captured after the last request. Once a response includes a `next_page` with an `offset`, subsequent requests can be made with the latest `offset` to poll for new events that match the provided filters.

*Note: If the filters you provided match events in your domain and `next_page` is present in the response, we will continue to send `next_page` on subsequent requests even when there are no more events that match the filters. This was put in place so that you can implement an audit log stream that will return future events that match these filters. If you are not interested in future events that match the filters you have defined, you can rely on checking empty `data` response for the end of current events that match your filters.*

When no `offset` is provided, the response will begin with the oldest events that match the provided filters. It is important to note that [AuditLogEvent](/reference/audit-log-api) objects will be permanently deleted from our systems after 90 days. If you wish to keep a permanent record of these events, we recommend using a SIEM tool to ingest and store these logs.*/
    pub fn get_audit_log_events(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetAuditLogEventsRequest> {
        FluentRequest {
            client: self,
            params: request::GetAuditLogEventsRequest {
                actor_gid: None,
                actor_type: None,
                end_at: None,
                event_type: None,
                limit: None,
                offset: None,
                resource_gid: None,
                start_at: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Submit parallel requests

Make multiple requests in parallel to Asana's API.*/
    pub fn create_batch_request(
        &self,
        data: BatchRequest,
    ) -> FluentRequest<'_, request::CreateBatchRequestRequest> {
        FluentRequest {
            client: self,
            params: request::CreateBatchRequestRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a project's custom fields

Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, `opt_fields` can be used to include more data than is returned in the compact representation. See the [documentation for input/output options](https://developers.asana.com/docs/inputoutput-options) for more information.*/
    pub fn get_custom_field_settings_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetCustomFieldSettingsForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetCustomFieldSettingsForProjectRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get a portfolio's custom fields

Returns a list of all of the custom fields settings on a portfolio, in compact form.*/
    pub fn get_custom_field_settings_for_portfolio(
        &self,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::GetCustomFieldSettingsForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::GetCustomFieldSettingsForPortfolioRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Create a custom field

Creates a new custom field in a workspace. Every custom field is required
to be created in a specific workspace, and this workspace cannot be
changed once set.

A custom field’s name must be unique within a workspace and not conflict
with names of existing task properties such as `Due Date` or `Assignee`.
A custom field’s type must be one of `text`, `enum`, `multi_enum`, `number`,
`date`, or `people`.

Returns the full record of the newly created custom field.*/
    pub fn create_custom_field(
        &self,
        data: CustomFieldRequest,
    ) -> FluentRequest<'_, request::CreateCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::CreateCustomFieldRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a custom field

Get the complete definition of a custom field’s metadata.

Since custom fields can be defined for one of a number of types, and
these types have different data and behaviors, there are fields that are
relevant to a particular type. For instance, as noted above, enum_options
is only relevant for the enum type and defines the set of choices that
the enum could represent. The examples below show some of these
type-specific custom field definitions.*/
    pub fn get_custom_field(
        &self,
        custom_field_gid: &str,
    ) -> FluentRequest<'_, request::GetCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::GetCustomFieldRequest {
                custom_field_gid: custom_field_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Update a custom field

A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged
When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.
A custom field’s `type` cannot be updated.
An enum custom field’s `enum_options` cannot be updated with this endpoint. Instead see “Work With Enum Options” for information on how to update `enum_options`.
Locked custom fields can only be updated by the user who locked the field.
Returns the complete updated custom field record.*/
    pub fn update_custom_field(
        &self,
        custom_field_gid: &str,
        data: CustomFieldRequest,
    ) -> FluentRequest<'_, request::UpdateCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateCustomFieldRequest {
                custom_field_gid: custom_field_gid.to_owned(),
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Delete a custom field

A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field.
Locked custom fields can only be deleted by the user who locked the field.
Returns an empty data record.*/
    pub fn delete_custom_field(
        &self,
        custom_field_gid: &str,
    ) -> FluentRequest<'_, request::DeleteCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteCustomFieldRequest {
                custom_field_gid: custom_field_gid.to_owned(),
                opt_pretty: None,
            },
        }
    }
    /**Get a workspace's custom fields

Returns a list of the compact representation of all of the custom fields in a workspace.*/
    pub fn get_custom_fields_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetCustomFieldsForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetCustomFieldsForWorkspaceRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Create an enum option

Creates an enum option and adds it to this custom field’s list of enum options. A custom field can have at most 500 enum options (including disabled options). By default new enum options are inserted at the end of a custom field’s list.
Locked custom fields can only have enum options added by the user who locked the field.
Returns the full record of the newly created enum option.*/
    pub fn create_enum_option_for_custom_field(
        &self,
        custom_field_gid: &str,
        data: EnumOptionRequest,
    ) -> FluentRequest<'_, request::CreateEnumOptionForCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::CreateEnumOptionForCustomFieldRequest {
                custom_field_gid: custom_field_gid.to_owned(),
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Reorder a custom field's enum

Moves a particular enum option to be either before or after another specified enum option in the custom field.
Locked custom fields can only be reordered by the user who locked the field.*/
    pub fn insert_enum_option_for_custom_field(
        &self,
        custom_field_gid: &str,
        data: EnumOptionInsertRequest,
    ) -> FluentRequest<'_, request::InsertEnumOptionForCustomFieldRequest> {
        FluentRequest {
            client: self,
            params: request::InsertEnumOptionForCustomFieldRequest {
                custom_field_gid: custom_field_gid.to_owned(),
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Update an enum option

Updates an existing enum option. Enum custom fields require at least one enabled enum option.
Locked custom fields can only be updated by the user who locked the field.
Returns the full record of the updated enum option.*/
    pub fn update_enum_option(
        &self,
        data: EnumOptionBase,
        enum_option_gid: &str,
    ) -> FluentRequest<'_, request::UpdateEnumOptionRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateEnumOptionRequest {
                data,
                enum_option_gid: enum_option_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get events on a resource

Returns the full record for all events that have occurred since the sync
token was created.

A `GET` request to the endpoint `/[path_to_resource]/events` can be made in
lieu of including the resource ID in the data for the request.

Asana limits a single sync token to 100 events. If more than 100 events exist
for a given resource, `has_more: true` will be returned in the response, indicating
that there are more events to pull.

*Note: The resource returned will be the resource that triggered the
event. This may be different from the one that the events were requested
for. For example, a subscription to a project will contain events for
tasks contained within the project.**/
    pub fn get_events(
        &self,
        resource: &str,
    ) -> FluentRequest<'_, request::GetEventsRequest> {
        FluentRequest {
            client: self,
            params: request::GetEventsRequest {
                opt_fields: None,
                opt_pretty: None,
                resource: resource.to_owned(),
                sync: None,
            },
        }
    }
    /**Get a goal relationship

Returns the complete updated goal relationship record for a single goal relationship.*/
    pub fn get_goal_relationship(
        &self,
        goal_relationship_gid: &str,
    ) -> FluentRequest<'_, request::GetGoalRelationshipRequest> {
        FluentRequest {
            client: self,
            params: request::GetGoalRelationshipRequest {
                goal_relationship_gid: goal_relationship_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Update a goal relationship

An existing goal relationship can be updated by making a PUT request on the URL for
that goal relationship. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.

Returns the complete updated goal relationship record.*/
    pub fn update_goal_relationship(
        &self,
        data: GoalRelationshipRequest,
        goal_relationship_gid: &str,
    ) -> FluentRequest<'_, request::UpdateGoalRelationshipRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateGoalRelationshipRequest {
                data,
                goal_relationship_gid: goal_relationship_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get goal relationships

Returns compact goal relationship records.*/
    pub fn get_goal_relationships(
        &self,
        supported_goal: &str,
    ) -> FluentRequest<'_, request::GetGoalRelationshipsRequest> {
        FluentRequest {
            client: self,
            params: request::GetGoalRelationshipsRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                resource_subtype: None,
                supported_goal: supported_goal.to_owned(),
            },
        }
    }
    /**Add a supporting goal relationship

Creates a goal relationship by adding a supporting resource to a given goal.

Returns the newly created goal relationship record.*/
    pub fn add_supporting_relationship(
        &self,
        data: GoalAddSupportingRelationshipRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::AddSupportingRelationshipRequest> {
        FluentRequest {
            client: self,
            params: request::AddSupportingRelationshipRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Removes a supporting goal relationship

Removes a goal relationship for a given parent goal.*/
    pub fn remove_supporting_relationship(
        &self,
        data: GoalRemoveSupportingRelationshipRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::RemoveSupportingRelationshipRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveSupportingRelationshipRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_pretty: None,
            },
        }
    }
    /**Get a goal

Returns the complete goal record for a single goal.*/
    pub fn get_goal(
        &self,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::GetGoalRequest> {
        FluentRequest {
            client: self,
            params: request::GetGoalRequest {
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Update a goal

An existing goal can be updated by making a PUT request on the URL for
that goal. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.

Returns the complete updated goal record.*/
    pub fn update_goal(
        &self,
        data: GoalUpdateRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::UpdateGoalRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateGoalRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Delete a goal

A specific, existing goal can be deleted by making a DELETE request on the URL for that goal.

Returns an empty data record.*/
    pub fn delete_goal(
        &self,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::DeleteGoalRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteGoalRequest {
                goal_gid: goal_gid.to_owned(),
                opt_pretty: None,
            },
        }
    }
    /**Get goals

Returns compact goal records.*/
    pub fn get_goals(&self) -> FluentRequest<'_, request::GetGoalsRequest> {
        FluentRequest {
            client: self,
            params: request::GetGoalsRequest {
                is_workspace_level: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                portfolio: None,
                project: None,
                task: None,
                team: None,
                time_periods: None,
                workspace: None,
            },
        }
    }
    /**Create a goal

Creates a new goal in a workspace or team.

Returns the full record of the newly created goal.*/
    pub fn create_goal(
        &self,
        data: GoalRequest,
    ) -> FluentRequest<'_, request::CreateGoalRequest> {
        FluentRequest {
            client: self,
            params: request::CreateGoalRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Create a goal metric

Creates and adds a goal metric to a specified goal. Note that this replaces an existing goal metric if one already exists.*/
    pub fn create_goal_metric(
        &self,
        data: GoalMetricRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::CreateGoalMetricRequest> {
        FluentRequest {
            client: self,
            params: request::CreateGoalMetricRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Update a goal metric

Updates a goal's existing metric's `current_number_value` if one exists,
otherwise responds with a 400 status code.

Returns the complete updated goal metric record.*/
    pub fn update_goal_metric(
        &self,
        data: GoalMetricCurrentValueRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::UpdateGoalMetricRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateGoalMetricRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Add a collaborator to a goal

Adds followers to a goal. Returns the goal the followers were added to.
Each goal can be associated with zero or more followers in the system.
Requests to add/remove followers, if successful, will return the complete updated goal record, described above.*/
    pub fn add_followers(
        &self,
        data: TaskAddFollowersRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::AddFollowersRequest> {
        FluentRequest {
            client: self,
            params: request::AddFollowersRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Remove a collaborator from a goal

Removes followers from a goal. Returns the goal the followers were removed from.
Each goal can be associated with zero or more followers in the system.
Requests to add/remove followers, if successful, will return the complete updated goal record, described above.*/
    pub fn remove_followers(
        &self,
        data: TaskAddFollowersRequest,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::RemoveFollowersRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveFollowersRequest {
                data,
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get parent goals from a goal

Returns a compact representation of all of the parent goals of a goal.*/
    pub fn get_parent_goals_for_goal(
        &self,
        goal_gid: &str,
    ) -> FluentRequest<'_, request::GetParentGoalsForGoalRequest> {
        FluentRequest {
            client: self,
            params: request::GetParentGoalsForGoalRequest {
                goal_gid: goal_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a job by id

Returns the full record for a job.*/
    pub fn get_job(&self, job_gid: &str) -> FluentRequest<'_, request::GetJobRequest> {
        FluentRequest {
            client: self,
            params: request::GetJobRequest {
                job_gid: job_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get multiple memberships

Returns compact `goal_membership` or `project_membership` records. The possible types for `parent` in this request are `goal` or `project`. An additional member (user GID or team GID) can be passed in to filter to a specific membership.*/
    pub fn get_memberships(&self) -> FluentRequest<'_, request::GetMembershipsRequest> {
        FluentRequest {
            client: self,
            params: request::GetMembershipsRequest {
                limit: None,
                member: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                parent: None,
            },
        }
    }
    /**Create a membership

Creates a new membership in a `goal`. `Teams` or `users` can be a member
of `goals`.

Returns the full record of the newly created membership.*/
    pub fn create_membership(
        &self,
        data: CreateMembershipRequestBody,
    ) -> FluentRequest<'_, request::CreateMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::CreateMembershipRequest {
                data,
                opt_pretty: None,
            },
        }
    }
    /**Get a membership

Returns compact `project_membership` record for a single membership. `GET` only supports project memberships currently*/
    pub fn get_membership(
        &self,
        membership_gid: &str,
    ) -> FluentRequest<'_, request::GetMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::GetMembershipRequest {
                membership_gid: membership_gid.to_owned(),
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Delete a membership

A specific, existing membership can be deleted by making a `DELETE` request
on the URL for that membership.

Returns an empty data record.*/
    pub fn delete_membership(
        &self,
        membership_gid: &str,
    ) -> FluentRequest<'_, request::DeleteMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteMembershipRequest {
                membership_gid: membership_gid.to_owned(),
                opt_pretty: None,
            },
        }
    }
    /**Create an organization export request

This method creates a request to export an Organization. Asana will complete the export at some point after you create the request.*/
    pub fn create_organization_export(
        &self,
        data: OrganizationExportRequest,
    ) -> FluentRequest<'_, request::CreateOrganizationExportRequest> {
        FluentRequest {
            client: self,
            params: request::CreateOrganizationExportRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get details on an org export request

Returns details of a previously-requested Organization export.*/
    pub fn get_organization_export(
        &self,
        organization_export_gid: &str,
    ) -> FluentRequest<'_, request::GetOrganizationExportRequest> {
        FluentRequest {
            client: self,
            params: request::GetOrganizationExportRequest {
                opt_fields: None,
                opt_pretty: None,
                organization_export_gid: organization_export_gid.to_owned(),
            },
        }
    }
    /**Get multiple portfolio memberships

Returns a list of portfolio memberships in compact representation. You must specify `portfolio`, `portfolio` and `user`, or `workspace` and `user`.*/
    pub fn get_portfolio_memberships(
        &self,
    ) -> FluentRequest<'_, request::GetPortfolioMembershipsRequest> {
        FluentRequest {
            client: self,
            params: request::GetPortfolioMembershipsRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                portfolio: None,
                user: None,
                workspace: None,
            },
        }
    }
    /**Get a portfolio membership

Returns the complete portfolio record for a single portfolio membership.*/
    pub fn get_portfolio_membership(
        &self,
        portfolio_membership_gid: &str,
    ) -> FluentRequest<'_, request::GetPortfolioMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::GetPortfolioMembershipRequest {
                opt_fields: None,
                opt_pretty: None,
                portfolio_membership_gid: portfolio_membership_gid.to_owned(),
            },
        }
    }
    /**Get memberships from a portfolio

Returns the compact portfolio membership records for the portfolio.*/
    pub fn get_portfolio_memberships_for_portfolio(
        &self,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::GetPortfolioMembershipsForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::GetPortfolioMembershipsForPortfolioRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
                user: None,
            },
        }
    }
    /**Get multiple portfolios

Returns a list of the portfolios in compact representation that are owned by the current API user.*/
    pub fn get_portfolios(
        &self,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetPortfoliosRequest> {
        FluentRequest {
            client: self,
            params: request::GetPortfoliosRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                owner: None,
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Create a portfolio

Creates a new portfolio in the given workspace with the supplied name.

Note that portfolios created in the Asana UI may have some state
(like the “Priority” custom field) which is automatically added
to the portfolio when it is created. Portfolios created via our
API will *not* be created with the same initial state to allow
integrations to create their own starting state on a portfolio.*/
    pub fn create_portfolio(
        &self,
        data: PortfolioRequest,
    ) -> FluentRequest<'_, request::CreatePortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::CreatePortfolioRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a portfolio

Returns the complete portfolio record for a single portfolio.*/
    pub fn get_portfolio(
        &self,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::GetPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::GetPortfolioRequest {
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Update a portfolio

An existing portfolio can be updated by making a PUT request on the URL for
that portfolio. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.

Returns the complete updated portfolio record.*/
    pub fn update_portfolio(
        &self,
        data: PortfolioRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::UpdatePortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::UpdatePortfolioRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Delete a portfolio

An existing portfolio can be deleted by making a DELETE request on
the URL for that portfolio.

Returns an empty data record.*/
    pub fn delete_portfolio(
        &self,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::DeletePortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::DeletePortfolioRequest {
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Get portfolio items

Get a list of the items in compact form in a portfolio.*/
    pub fn get_items_for_portfolio(
        &self,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::GetItemsForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::GetItemsForPortfolioRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Add a portfolio item

Add an item to a portfolio.
Returns an empty data block.*/
    pub fn add_item_for_portfolio(
        &self,
        data: PortfolioAddItemRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::AddItemForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::AddItemForPortfolioRequest {
                data,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Remove a portfolio item

Remove an item from a portfolio.
Returns an empty data block.*/
    pub fn remove_item_for_portfolio(
        &self,
        data: PortfolioRemoveItemRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::RemoveItemForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveItemForPortfolioRequest {
                data,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Add a custom field to a portfolio

Custom fields are associated with portfolios by way of custom field settings.  This method creates a setting for the portfolio.*/
    pub fn add_custom_field_setting_for_portfolio(
        &self,
        data: AddCustomFieldSettingRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::AddCustomFieldSettingForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::AddCustomFieldSettingForPortfolioRequest {
                data,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Remove a custom field from a portfolio

Removes a custom field setting from a portfolio.*/
    pub fn remove_custom_field_setting_for_portfolio(
        &self,
        data: RemoveCustomFieldSettingRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::RemoveCustomFieldSettingForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveCustomFieldSettingForPortfolioRequest {
                data,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Add users to a portfolio

Adds the specified list of users as members of the portfolio.
Returns the updated portfolio record.*/
    pub fn add_members_for_portfolio(
        &self,
        data: AddMembersRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::AddMembersForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::AddMembersForPortfolioRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Remove users from a portfolio

Removes the specified list of users from members of the portfolio.
Returns the updated portfolio record.*/
    pub fn remove_members_for_portfolio(
        &self,
        data: RemoveMembersRequest,
        portfolio_gid: &str,
    ) -> FluentRequest<'_, request::RemoveMembersForPortfolioRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveMembersForPortfolioRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                portfolio_gid: portfolio_gid.to_owned(),
            },
        }
    }
    /**Get a project brief

Get the full record for a project brief.*/
    pub fn get_project_brief(
        &self,
        project_brief_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectBriefRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectBriefRequest {
                opt_fields: None,
                opt_pretty: None,
                project_brief_gid: project_brief_gid.to_owned(),
            },
        }
    }
    /**Update a project brief

An existing project brief can be updated by making a PUT request on the URL for
that project brief. Only the fields provided in the `data` block will be updated;
any unspecified fields will remain unchanged.

Returns the complete updated project brief record.*/
    pub fn update_project_brief(
        &self,
        data: ProjectBriefRequest,
        project_brief_gid: &str,
    ) -> FluentRequest<'_, request::UpdateProjectBriefRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateProjectBriefRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_brief_gid: project_brief_gid.to_owned(),
            },
        }
    }
    /**Delete a project brief

Deletes a specific, existing project brief.

Returns an empty data record.*/
    pub fn delete_project_brief(
        &self,
        project_brief_gid: &str,
    ) -> FluentRequest<'_, request::DeleteProjectBriefRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteProjectBriefRequest {
                opt_pretty: None,
                project_brief_gid: project_brief_gid.to_owned(),
            },
        }
    }
    /**Create a project brief

Creates a new project brief.

Returns the full record of the newly created project brief.*/
    pub fn create_project_brief(
        &self,
        data: ProjectBriefRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::CreateProjectBriefRequest> {
        FluentRequest {
            client: self,
            params: request::CreateProjectBriefRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get a project membership

Returns the complete project record for a single project membership.*/
    pub fn get_project_membership(
        &self,
        project_membership_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectMembershipRequest {
                opt_fields: None,
                opt_pretty: None,
                project_membership_gid: project_membership_gid.to_owned(),
            },
        }
    }
    /**Get memberships from a project

Returns the compact project membership records for the project.*/
    pub fn get_project_memberships_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectMembershipsForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectMembershipsForProjectRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
                user: None,
            },
        }
    }
    /**Get a project status

*Deprecated: new integrations should prefer the `/status_updates/{status_gid}` route.*

Returns the complete record for a single status update.*/
    pub fn get_project_status(
        &self,
        project_status_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectStatusRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectStatusRequest {
                opt_fields: None,
                opt_pretty: None,
                project_status_gid: project_status_gid.to_owned(),
            },
        }
    }
    /**Delete a project status

*Deprecated: new integrations should prefer the `/status_updates/{status_gid}` route.*

Deletes a specific, existing project status update.

Returns an empty data record.*/
    pub fn delete_project_status(
        &self,
        project_status_gid: &str,
    ) -> FluentRequest<'_, request::DeleteProjectStatusRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteProjectStatusRequest {
                opt_pretty: None,
                project_status_gid: project_status_gid.to_owned(),
            },
        }
    }
    /**Get statuses from a project

*Deprecated: new integrations should prefer the `/status_updates` route.*

Returns the compact project status update records for all updates on the project.*/
    pub fn get_project_statuses_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectStatusesForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectStatusesForProjectRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Create a project status

*Deprecated: new integrations should prefer the `/status_updates` route.*

Creates a new status update on the project.

Returns the full record of the newly created project status update.*/
    pub fn create_project_status_for_project(
        &self,
        data: ProjectStatusRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::CreateProjectStatusForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::CreateProjectStatusForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get a project template

Returns the complete project template record for a single project template.*/
    pub fn get_project_template(
        &self,
        project_template_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectTemplateRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectTemplateRequest {
                opt_fields: None,
                opt_pretty: None,
                project_template_gid: project_template_gid.to_owned(),
            },
        }
    }
    /**Delete a project template

A specific, existing project template can be deleted by making a DELETE request on the URL for that project template.

Returns an empty data record.*/
    pub fn delete_project_template(
        &self,
        project_template_gid: &str,
    ) -> FluentRequest<'_, request::DeleteProjectTemplateRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteProjectTemplateRequest {
                opt_pretty: None,
                project_template_gid: project_template_gid.to_owned(),
            },
        }
    }
    /**Get multiple project templates

Returns the compact project template records for all project templates in the given team or workspace.*/
    pub fn get_project_templates(
        &self,
    ) -> FluentRequest<'_, request::GetProjectTemplatesRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectTemplatesRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team: None,
                workspace: None,
            },
        }
    }
    /**Get a team's project templates

Returns the compact project template records for all project templates in the team.*/
    pub fn get_project_templates_for_team(
        &self,
        team_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectTemplatesForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectTemplatesForTeamRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Instantiate a project from a project template

Creates and returns a job that will asynchronously handle the project instantiation.

To form this request, it is recommended to first make a request to [get a project template](/reference/getprojecttemplate). Then, from the response, copy the `gid` from the object in the `requested_dates` array. This `gid` should be used in `requested_dates` to instantiate a project.

_Note: The body of this request will differ if your workspace is an organization. To determine if your workspace is an organization, use the [is_organization](/reference/workspaces) parameter._*/
    pub fn instantiate_project(
        &self,
        data: ProjectTemplateInstantiateProjectRequest,
        project_template_gid: &str,
    ) -> FluentRequest<'_, request::InstantiateProjectRequest> {
        FluentRequest {
            client: self,
            params: request::InstantiateProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_template_gid: project_template_gid.to_owned(),
            },
        }
    }
    /**Get multiple projects

Returns the compact project records for some filtered set of projects. Use one or more of the parameters provided to filter the projects returned.
*Note: This endpoint may timeout for large domains. Try filtering by team!**/
    pub fn get_projects(&self) -> FluentRequest<'_, request::GetProjectsRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectsRequest {
                archived: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team: None,
                workspace: None,
            },
        }
    }
    /**Create a project

Create a new project in a workspace or team.

Every project is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the `workspace` parameter regardless of whether or not it is an
organization.

If the workspace for your project is an organization, you must also
supply a `team` to share the project with.

Returns the full record of the newly created project.*/
    pub fn create_project(
        &self,
        data: ProjectRequest,
    ) -> FluentRequest<'_, request::CreateProjectRequest> {
        FluentRequest {
            client: self,
            params: request::CreateProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a project

Returns the complete project record for a single project.*/
    pub fn get_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectRequest {
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Update a project

A specific, existing project can be updated by making a PUT request on
the URL for that project. Only the fields provided in the `data` block
will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.

Returns the complete updated project record.*/
    pub fn update_project(
        &self,
        data: ProjectUpdateRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::UpdateProjectRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Delete a project

A specific, existing project can be deleted by making a DELETE request on
the URL for that project.

Returns an empty data record.*/
    pub fn delete_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::DeleteProjectRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteProjectRequest {
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Duplicate a project

Creates and returns a job that will asynchronously handle the duplication.*/
    pub fn duplicate_project(
        &self,
        data: ProjectDuplicateRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::DuplicateProjectRequest> {
        FluentRequest {
            client: self,
            params: request::DuplicateProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get projects a task is in

Returns a compact representation of all of the projects the task is in.*/
    pub fn get_projects_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectsForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectsForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get a team's projects

Returns the compact project records for all projects in the team.*/
    pub fn get_projects_for_team(
        &self,
        team_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectsForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectsForTeamRequest {
                archived: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Create a project in a team

Creates a project shared with the given team.

Returns the full record of the newly created project.*/
    pub fn create_project_for_team(
        &self,
        data: ProjectRequest,
        team_gid: &str,
    ) -> FluentRequest<'_, request::CreateProjectForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::CreateProjectForTeamRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Get all projects in a workspace

Returns the compact project records for all projects in the workspace.
*Note: This endpoint may timeout for large domains. Prefer the `/teams/{team_gid}/projects` endpoint.**/
    pub fn get_projects_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetProjectsForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetProjectsForWorkspaceRequest {
                archived: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Create a project in a workspace

Creates a project in the workspace.

If the workspace for your project is an organization, you must also
supply a team to share the project with.

Returns the full record of the newly created project.*/
    pub fn create_project_for_workspace(
        &self,
        data: ProjectRequest,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::CreateProjectForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::CreateProjectForWorkspaceRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Add a custom field to a project

Custom fields are associated with projects by way of custom field settings.  This method creates a setting for the project.*/
    pub fn add_custom_field_setting_for_project(
        &self,
        data: AddCustomFieldSettingRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::AddCustomFieldSettingForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::AddCustomFieldSettingForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Remove a custom field from a project

Removes a custom field setting from a project.*/
    pub fn remove_custom_field_setting_for_project(
        &self,
        data: RemoveCustomFieldSettingRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::RemoveCustomFieldSettingForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveCustomFieldSettingForProjectRequest {
                data,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get task count of a project

Get an object that holds task count fields. **All fields are excluded by default**. You must [opt in](/docs/inputoutput-options) using `opt_fields` to get any information from this endpoint.

This endpoint has an additional [rate limit](/docs/rate-limits) and each field counts especially high against our [cost limits](/docs/rate-limits#cost-limits).

Milestones are just tasks, so they are included in the `num_tasks`, `num_incomplete_tasks`, and `num_completed_tasks` counts.*/
    pub fn get_task_counts_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetTaskCountsForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetTaskCountsForProjectRequest {
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Add users to a project

Adds the specified list of users as members of the project. Note that a user being added as a member may also be added as a *follower* as a result of this operation. This is because the user's default notification settings (i.e., in the "Notifcations" tab of "My Profile Settings") will override this endpoint's default behavior of setting "Tasks added" notifications to `false`.
Returns the updated project record.*/
    pub fn add_members_for_project(
        &self,
        data: AddMembersRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::AddMembersForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::AddMembersForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Remove users from a project

Removes the specified list of users from members of the project.
Returns the updated project record.*/
    pub fn remove_members_for_project(
        &self,
        data: RemoveMembersRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::RemoveMembersForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveMembersForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Add followers to a project

Adds the specified list of users as followers to the project. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project. Therefore, if the users are not already members of the project, they will also become members as a result of this operation.
Returns the updated project record.*/
    pub fn add_followers_for_project(
        &self,
        data: AddFollowersRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::AddFollowersForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::AddFollowersForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Remove followers from a project

Removes the specified list of users from following the project, this will not affect project membership status.
Returns the updated project record.*/
    pub fn remove_followers_for_project(
        &self,
        data: RemoveFollowersRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::RemoveFollowersForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveFollowersForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Create a project template from a project

Creates and returns a job that will asynchronously handle the project template creation. Note that
while the resulting project template can be accessed with the API, it won't be visible in the Asana
UI until Project Templates 2.0 is launched in the app. See more in [this forum post](https://forum.asana.com/t/a-new-api-for-project-templates/156432).*/
    pub fn project_save_as_template(
        &self,
        data: ProjectSaveAsTemplateRequestBody,
        project_gid: &str,
    ) -> FluentRequest<'_, request::ProjectSaveAsTemplateRequest> {
        FluentRequest {
            client: self,
            params: request::ProjectSaveAsTemplateRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Trigger a rule

Trigger a rule which uses an ["incoming web request"](/docs/incoming-web-requests) trigger.*/
    pub fn trigger_rule(
        &self,
        data: RuleTriggerRequest,
        rule_trigger_gid: &str,
    ) -> FluentRequest<'_, request::TriggerRuleRequest> {
        FluentRequest {
            client: self,
            params: request::TriggerRuleRequest {
                data,
                rule_trigger_gid: rule_trigger_gid.to_owned(),
            },
        }
    }
    /**Get a section

Returns the complete record for a single section.*/
    pub fn get_section(
        &self,
        section_gid: &str,
    ) -> FluentRequest<'_, request::GetSectionRequest> {
        FluentRequest {
            client: self,
            params: request::GetSectionRequest {
                opt_fields: None,
                opt_pretty: None,
                section_gid: section_gid.to_owned(),
            },
        }
    }
    /**Update a section

A specific, existing section can be updated by making a PUT request on
the URL for that project. Only the fields provided in the `data` block
will be updated; any unspecified fields will remain unchanged. (note that
at this time, the only field that can be updated is the `name` field.)

When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.

Returns the complete updated section record.*/
    pub fn update_section(
        &self,
        data: SectionRequest,
        section_gid: &str,
    ) -> FluentRequest<'_, request::UpdateSectionRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateSectionRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                section_gid: section_gid.to_owned(),
            },
        }
    }
    /**Delete a section

A specific, existing section can be deleted by making a DELETE request on
the URL for that section.

Note that sections must be empty to be deleted.

The last remaining section cannot be deleted.

Returns an empty data block.*/
    pub fn delete_section(
        &self,
        section_gid: &str,
    ) -> FluentRequest<'_, request::DeleteSectionRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteSectionRequest {
                opt_pretty: None,
                section_gid: section_gid.to_owned(),
            },
        }
    }
    /**Get sections in a project

Returns the compact records for all sections in the specified project.*/
    pub fn get_sections_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetSectionsForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetSectionsForProjectRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Create a section in a project

Creates a new section in a project.
Returns the full record of the newly created section.*/
    pub fn create_section_for_project(
        &self,
        data: SectionRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::CreateSectionForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::CreateSectionForProjectRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Add task to section

Add a task to a specific, existing section. This will remove the task from other sections of the project.

The task will be inserted at the top of a section unless an insert_before or insert_after parameter is declared.

This does not work for separators (tasks with the resource_subtype of section).*/
    pub fn add_task_for_section(
        &self,
        data: SectionTaskInsertRequest,
        section_gid: &str,
    ) -> FluentRequest<'_, request::AddTaskForSectionRequest> {
        FluentRequest {
            client: self,
            params: request::AddTaskForSectionRequest {
                data,
                opt_pretty: None,
                section_gid: section_gid.to_owned(),
            },
        }
    }
    /**Move or Insert sections

Move sections relative to each other. One of
`before_section` or `after_section` is required.

Sections cannot be moved between projects.

Returns an empty data block.*/
    pub fn insert_section_for_project(
        &self,
        data: ProjectSectionInsertRequest,
        project_gid: &str,
    ) -> FluentRequest<'_, request::InsertSectionForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::InsertSectionForProjectRequest {
                data,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get a status update

Returns the complete record for a single status update.*/
    pub fn get_status(
        &self,
        status_update_gid: &str,
    ) -> FluentRequest<'_, request::GetStatusRequest> {
        FluentRequest {
            client: self,
            params: request::GetStatusRequest {
                opt_fields: None,
                opt_pretty: None,
                status_update_gid: status_update_gid.to_owned(),
            },
        }
    }
    /**Delete a status update

Deletes a specific, existing status update.

Returns an empty data record.*/
    pub fn delete_status(
        &self,
        status_update_gid: &str,
    ) -> FluentRequest<'_, request::DeleteStatusRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteStatusRequest {
                opt_pretty: None,
                status_update_gid: status_update_gid.to_owned(),
            },
        }
    }
    /**Get status updates from an object

Returns the compact status update records for all updates on the object.*/
    pub fn get_statuses_for_object(
        &self,
        parent: &str,
    ) -> FluentRequest<'_, request::GetStatusesForObjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetStatusesForObjectRequest {
                created_since: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                parent: parent.to_owned(),
            },
        }
    }
    /**Create a status update

Creates a new status update on an object.
Returns the full record of the newly created status update.*/
    pub fn create_status_for_object(
        &self,
        data: StatusUpdateRequest,
    ) -> FluentRequest<'_, request::CreateStatusForObjectRequest> {
        FluentRequest {
            client: self,
            params: request::CreateStatusForObjectRequest {
                data,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a story

Returns the full record for a single story.*/
    pub fn get_story(
        &self,
        story_gid: &str,
    ) -> FluentRequest<'_, request::GetStoryRequest> {
        FluentRequest {
            client: self,
            params: request::GetStoryRequest {
                opt_fields: None,
                opt_pretty: None,
                story_gid: story_gid.to_owned(),
            },
        }
    }
    /**Update a story

Updates the story and returns the full record for the updated story. Only comment stories can have their text updated, and only comment stories and attachment stories can be pinned. Only one of `text` and `html_text` can be specified.*/
    pub fn update_story(
        &self,
        data: StoryRequest,
        story_gid: &str,
    ) -> FluentRequest<'_, request::UpdateStoryRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateStoryRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                story_gid: story_gid.to_owned(),
            },
        }
    }
    /**Delete a story

Deletes a story. A user can only delete stories they have created.

Returns an empty data record.*/
    pub fn delete_story(
        &self,
        story_gid: &str,
    ) -> FluentRequest<'_, request::DeleteStoryRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteStoryRequest {
                opt_pretty: None,
                story_gid: story_gid.to_owned(),
            },
        }
    }
    /**Get stories from a task

Returns the compact records for all stories on the task.*/
    pub fn get_stories_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetStoriesForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetStoriesForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Create a story on a task

Adds a story to a task. This endpoint currently only allows for comment
stories to be created. The comment will be authored by the currently
authenticated user, and timestamped when the server receives the request.

Returns the full record for the new story added to the task.*/
    pub fn create_story_for_task(
        &self,
        data: StoryRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::CreateStoryForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::CreateStoryForTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get multiple tags

Returns the compact tag records for some filtered set of tags. Use one or more of the parameters provided to filter the tags returned.*/
    pub fn get_tags(&self) -> FluentRequest<'_, request::GetTagsRequest> {
        FluentRequest {
            client: self,
            params: request::GetTagsRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace: None,
            },
        }
    }
    /**Create a tag

Creates a new tag in a workspace or organization.

Every tag is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the workspace parameter regardless of whether or not it is an
organization.

Returns the full record of the newly created tag.*/
    pub fn create_tag(
        &self,
        data: TagRequest,
    ) -> FluentRequest<'_, request::CreateTagRequest> {
        FluentRequest {
            client: self,
            params: request::CreateTagRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a tag

Returns the complete tag record for a single tag.*/
    pub fn get_tag(&self, tag_gid: &str) -> FluentRequest<'_, request::GetTagRequest> {
        FluentRequest {
            client: self,
            params: request::GetTagRequest {
                opt_fields: None,
                opt_pretty: None,
                tag_gid: tag_gid.to_owned(),
            },
        }
    }
    /**Update a tag

Updates the properties of a tag. Only the fields provided in the `data`
block will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the tag.

Returns the complete updated tag record.*/
    pub fn update_tag(
        &self,
        tag_gid: &str,
    ) -> FluentRequest<'_, request::UpdateTagRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateTagRequest {
                opt_fields: None,
                opt_pretty: None,
                tag_gid: tag_gid.to_owned(),
            },
        }
    }
    /**Delete a tag

A specific, existing tag can be deleted by making a DELETE request on
the URL for that tag.

Returns an empty data record.*/
    pub fn delete_tag(
        &self,
        tag_gid: &str,
    ) -> FluentRequest<'_, request::DeleteTagRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteTagRequest {
                opt_pretty: None,
                tag_gid: tag_gid.to_owned(),
            },
        }
    }
    /**Get a task's tags

Get a compact representation of all of the tags the task has.*/
    pub fn get_tags_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetTagsForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetTagsForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get tags in a workspace

Returns the compact tag records for some filtered set of tags. Use one or more of the parameters provided to filter the tags returned.*/
    pub fn get_tags_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetTagsForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetTagsForWorkspaceRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Create a tag in a workspace

Creates a new tag in a workspace or organization.

Every tag is required to be created in a specific workspace or
organization, and this cannot be changed once set. Note that you can use
the workspace parameter regardless of whether or not it is an
organization.

Returns the full record of the newly created tag.*/
    pub fn create_tag_for_workspace(
        &self,
        data: TagCreateTagForWorkspaceRequest,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::CreateTagForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::CreateTagForWorkspaceRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get multiple task templates

Returns the compact task template records for some filtered set of task templates. You must specify a `project`*/
    pub fn get_task_templates(
        &self,
    ) -> FluentRequest<'_, request::GetTaskTemplatesRequest> {
        FluentRequest {
            client: self,
            params: request::GetTaskTemplatesRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project: None,
            },
        }
    }
    /**Get a task template

Returns the complete task template record for a single task template.*/
    pub fn get_task_template(
        &self,
        task_template_gid: &str,
    ) -> FluentRequest<'_, request::GetTaskTemplateRequest> {
        FluentRequest {
            client: self,
            params: request::GetTaskTemplateRequest {
                opt_fields: None,
                opt_pretty: None,
                task_template_gid: task_template_gid.to_owned(),
            },
        }
    }
    /**Instantiate a task from a task template

Creates and returns a job that will asynchronously handle the task instantiation.*/
    pub fn instantiate_task(
        &self,
        data: TaskTemplateInstantiateTaskRequest,
        task_template_gid: &str,
    ) -> FluentRequest<'_, request::InstantiateTaskRequest> {
        FluentRequest {
            client: self,
            params: request::InstantiateTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_template_gid: task_template_gid.to_owned(),
            },
        }
    }
    /**Get multiple tasks

Returns the compact task records for some filtered set of tasks. Use one or more of the parameters provided to filter the tasks returned. You must specify a `project` or `tag` if you do not specify `assignee` and `workspace`.

For more complex task retrieval, use [workspaces/{workspace_gid}/tasks/search](/reference/searchtasksforworkspace).*/
    pub fn get_tasks(&self) -> FluentRequest<'_, request::GetTasksRequest> {
        FluentRequest {
            client: self,
            params: request::GetTasksRequest {
                assignee: None,
                completed_since: None,
                limit: None,
                modified_since: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project: None,
                section: None,
                workspace: None,
            },
        }
    }
    /**Create a task

Creating a new task is as easy as POSTing to the `/tasks` endpoint with a
data block containing the fields you’d like to set on the task. Any
unspecified fields will take on default values.

Every task is required to be created in a specific workspace, and this
workspace cannot be changed once set. The workspace need not be set
explicitly if you specify `projects` or a `parent` task instead.*/
    pub fn create_task(
        &self,
        data: TaskRequest,
    ) -> FluentRequest<'_, request::CreateTaskRequest> {
        FluentRequest {
            client: self,
            params: request::CreateTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a task

Returns the complete task record for a single task.*/
    pub fn get_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetTaskRequest {
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Update a task

A specific, existing task can be updated by making a PUT request on the
URL for that task. Only the fields provided in the `data` block will be
updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.

Returns the complete updated task record.*/
    pub fn update_task(
        &self,
        data: TaskRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::UpdateTaskRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Delete a task

A specific, existing task can be deleted by making a DELETE request on
the URL for that task. Deleted tasks go into the “trash” of the user
making the delete request. Tasks can be recovered from the trash within a
period of 30 days; afterward they are completely removed from the system.

Returns an empty data record.*/
    pub fn delete_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::DeleteTaskRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteTaskRequest {
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Duplicate a task

Creates and returns a job that will asynchronously handle the duplication.*/
    pub fn duplicate_task(
        &self,
        data: TaskDuplicateRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::DuplicateTaskRequest> {
        FluentRequest {
            client: self,
            params: request::DuplicateTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get tasks from a project

Returns the compact task records for all tasks within the given project, ordered by their priority within the project. Tasks can exist in more than one project at a time.*/
    pub fn get_tasks_for_project(
        &self,
        project_gid: &str,
    ) -> FluentRequest<'_, request::GetTasksForProjectRequest> {
        FluentRequest {
            client: self,
            params: request::GetTasksForProjectRequest {
                completed_since: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                project_gid: project_gid.to_owned(),
            },
        }
    }
    /**Get tasks from a section

*Board view only*: Returns the compact section records for all tasks within the given section.*/
    pub fn get_tasks_for_section(
        &self,
        section_gid: &str,
    ) -> FluentRequest<'_, request::GetTasksForSectionRequest> {
        FluentRequest {
            client: self,
            params: request::GetTasksForSectionRequest {
                completed_since: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                section_gid: section_gid.to_owned(),
            },
        }
    }
    /**Get tasks from a tag

Returns the compact task records for all tasks with the given tag. Tasks can have more than one tag at a time.*/
    pub fn get_tasks_for_tag(
        &self,
        tag_gid: &str,
    ) -> FluentRequest<'_, request::GetTasksForTagRequest> {
        FluentRequest {
            client: self,
            params: request::GetTasksForTagRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                tag_gid: tag_gid.to_owned(),
            },
        }
    }
    /**Get tasks from a user task list

Returns the compact list of tasks in a user’s My Tasks list.
*Note: Access control is enforced for this endpoint as with all Asana API endpoints, meaning a user’s private tasks will be filtered out if the API-authenticated user does not have access to them.*
*Note: Both complete and incomplete tasks are returned by default unless they are filtered out (for example, setting `completed_since=now` will return only incomplete tasks, which is the default view for “My Tasks” in Asana.)**/
    pub fn get_tasks_for_user_task_list(
        &self,
        user_task_list_gid: &str,
    ) -> FluentRequest<'_, request::GetTasksForUserTaskListRequest> {
        FluentRequest {
            client: self,
            params: request::GetTasksForUserTaskListRequest {
                completed_since: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                user_task_list_gid: user_task_list_gid.to_owned(),
            },
        }
    }
    /**Get subtasks from a task

Returns a compact representation of all of the subtasks of a task.*/
    pub fn get_subtasks_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetSubtasksForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetSubtasksForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Create a subtask

Creates a new subtask and adds it to the parent task. Returns the full record for the newly created subtask.*/
    pub fn create_subtask_for_task(
        &self,
        data: TaskRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::CreateSubtaskForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::CreateSubtaskForTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Set the parent of a task

parent, or no parent task at all. Returns an empty data block. When using `insert_before` and `insert_after`, at most one of those two options can be specified, and they must already be subtasks of the parent.*/
    pub fn set_parent_for_task(
        &self,
        data: TaskSetParentRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::SetParentForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::SetParentForTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get dependencies from a task

Returns the compact representations of all of the dependencies of a task.*/
    pub fn get_dependencies_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetDependenciesForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetDependenciesForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Set dependencies for a task

Marks a set of tasks as dependencies of this task, if they are not already dependencies. *A task can have at most 30 dependents and dependencies combined*.*/
    pub fn add_dependencies_for_task(
        &self,
        data: ModifyDependenciesRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::AddDependenciesForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::AddDependenciesForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Unlink dependencies from a task

Unlinks a set of dependencies from this task.*/
    pub fn remove_dependencies_for_task(
        &self,
        data: ModifyDependenciesRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::RemoveDependenciesForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveDependenciesForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get dependents from a task

Returns the compact representations of all of the dependents of a task.*/
    pub fn get_dependents_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetDependentsForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetDependentsForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Set dependents for a task

Marks a set of tasks as dependents of this task, if they are not already dependents. *A task can have at most 30 dependents and dependencies combined*.*/
    pub fn add_dependents_for_task(
        &self,
        data: ModifyDependentsRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::AddDependentsForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::AddDependentsForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Unlink dependents from a task

Unlinks a set of dependents from this task.*/
    pub fn remove_dependents_for_task(
        &self,
        data: ModifyDependentsRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::RemoveDependentsForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveDependentsForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Add a project to a task

Adds the task to the specified project, in the optional location
specified. If no location arguments are given, the task will be added to
the end of the project.

`addProject` can also be used to reorder a task within a project or
section that already contains it.

At most one of `insert_before`, `insert_after`, or `section` should be
specified. Inserting into a section in an non-order-dependent way can be
done by specifying section, otherwise, to insert within a section in a
particular place, specify `insert_before` or `insert_after` and a task
within the section to anchor the position of this task.

Returns an empty data block.*/
    pub fn add_project_for_task(
        &self,
        data: TaskAddProjectRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::AddProjectForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::AddProjectForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Remove a project from a task

Removes the task from the specified project. The task will still exist in
the system, but it will not be in the project anymore.

Returns an empty data block.*/
    pub fn remove_project_for_task(
        &self,
        data: TaskRemoveProjectRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::RemoveProjectForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveProjectForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Add a tag to a task

Adds a tag to a task. Returns an empty data block.*/
    pub fn add_tag_for_task(
        &self,
        data: TaskAddTagRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::AddTagForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::AddTagForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Remove a tag from a task

Removes a tag from a task. Returns an empty data block.*/
    pub fn remove_tag_for_task(
        &self,
        data: TaskRemoveTagRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::RemoveTagForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveTagForTaskRequest {
                data,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Add followers to a task

Adds followers to a task. Returns an empty data block.
Each task can be associated with zero or more followers in the system.
Requests to add/remove followers, if successful, will return the complete updated task record, described above.*/
    pub fn add_followers_for_task(
        &self,
        data: TaskAddFollowersRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::AddFollowersForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::AddFollowersForTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Remove followers from a task

Removes each of the specified followers from the task if they are following. Returns the complete, updated record for the affected task.*/
    pub fn remove_follower_for_task(
        &self,
        data: TaskRemoveFollowersRequest,
        task_gid: &str,
    ) -> FluentRequest<'_, request::RemoveFollowerForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveFollowerForTaskRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Search tasks in a workspace

To mirror the functionality of the Asana web app's advanced search feature, the Asana API has a task search endpoint that allows you to build complex filters to find and retrieve the exact data you need.
#### Premium access
Like the Asana web product's advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true:

- The workspace in which the search is being performed is a premium workspace - The user is a member of a premium team inside the workspace

Even if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a `402 Payment Required` error.
#### Pagination
Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional [pagination](https://developers.asana.com/docs/#pagination) available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the `limit` query parameter.
#### Eventual consistency
Changes in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a task that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product.
#### Rate limits
You may receive a `429 Too Many Requests` response if you hit any of our [rate limits](https://developers.asana.com/docs/#rate-limits).
#### Custom field parameters
| Parameter name | Custom field type | Accepted type |
|---|---|---|
| custom_fields.{gid}.is_set | All | Boolean |
| custom_fields.{gid}.value | Text | String |
| custom_fields.{gid}.value | Number | Number |
| custom_fields.{gid}.value | Enum | Enum option ID |
| custom_fields.{gid}.starts_with | Text only | String |
| custom_fields.{gid}.ends_with | Text only | String |
| custom_fields.{gid}.contains | Text only | String |
| custom_fields.{gid}.less_than | Number only | Number |
| custom_fields.{gid}.greater_than | Number only | Number |


For example, if the gid of the custom field is 12345, these query parameter to find tasks where it is set would be `custom_fields.12345.is_set=true`. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: `custom_fields.12345.value=67890`.

**Not Supported**: searching for multiple exact matches of a custom field, searching for multi-enum custom field

*Note: If you specify `projects.any` and `sections.any`, you will receive tasks for the project **and** tasks for the section. If you're looking for only tasks in a section, omit the `projects.any` from the request.**/
    pub fn search_tasks_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::SearchTasksForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::SearchTasksForWorkspaceRequest {
                assigned_by_any: None,
                assigned_by_not: None,
                assignee_any: None,
                assignee_not: None,
                commented_on_by_not: None,
                completed: None,
                completed_at_after: None,
                completed_at_before: None,
                completed_on: None,
                completed_on_after: None,
                completed_on_before: None,
                created_at_after: None,
                created_at_before: None,
                created_by_any: None,
                created_by_not: None,
                created_on: None,
                created_on_after: None,
                created_on_before: None,
                due_at_after: None,
                due_at_before: None,
                due_on: None,
                due_on_after: None,
                due_on_before: None,
                followers_not: None,
                has_attachment: None,
                is_blocked: None,
                is_blocking: None,
                is_subtask: None,
                liked_by_not: None,
                modified_at_after: None,
                modified_at_before: None,
                modified_on: None,
                modified_on_after: None,
                modified_on_before: None,
                opt_fields: None,
                opt_pretty: None,
                portfolios_any: None,
                projects_all: None,
                projects_any: None,
                projects_not: None,
                resource_subtype: None,
                sections_all: None,
                sections_any: None,
                sections_not: None,
                sort_ascending: None,
                sort_by: None,
                start_on: None,
                start_on_after: None,
                start_on_before: None,
                tags_all: None,
                tags_any: None,
                tags_not: None,
                teams_any: None,
                text: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get a team membership

Returns the complete team membership record for a single team membership.*/
    pub fn get_team_membership(
        &self,
        team_membership_gid: &str,
    ) -> FluentRequest<'_, request::GetTeamMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamMembershipRequest {
                opt_fields: None,
                opt_pretty: None,
                team_membership_gid: team_membership_gid.to_owned(),
            },
        }
    }
    /**Get team memberships

Returns compact team membership records.*/
    pub fn get_team_memberships(
        &self,
    ) -> FluentRequest<'_, request::GetTeamMembershipsRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamMembershipsRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team: None,
                user: None,
                workspace: None,
            },
        }
    }
    /**Get memberships from a team

Returns the compact team memberships for the team.*/
    pub fn get_team_memberships_for_team(
        &self,
        team_gid: &str,
    ) -> FluentRequest<'_, request::GetTeamMembershipsForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamMembershipsForTeamRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Get memberships from a user

Returns the compact team membership records for the user.*/
    pub fn get_team_memberships_for_user(
        &self,
        user_gid: &str,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetTeamMembershipsForUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamMembershipsForUserRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                user_gid: user_gid.to_owned(),
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Create a team

Creates a team within the current workspace.*/
    pub fn create_team(
        &self,
        data: TeamRequest,
    ) -> FluentRequest<'_, request::CreateTeamRequest> {
        FluentRequest {
            client: self,
            params: request::CreateTeamRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a team

Returns the full record for a single team.*/
    pub fn get_team(
        &self,
        team_gid: &str,
    ) -> FluentRequest<'_, request::GetTeamRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamRequest {
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Update a team

Updates a team within the current workspace.*/
    pub fn update_team(
        &self,
        data: TeamRequest,
        team_gid: &str,
    ) -> FluentRequest<'_, request::UpdateTeamRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateTeamRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Get teams in a workspace

Returns the compact records for all teams in the workspace visible to the authorized user.*/
    pub fn get_teams_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetTeamsForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamsForWorkspaceRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get teams for a user

Returns the compact records for all teams to which the given user is assigned.*/
    pub fn get_teams_for_user(
        &self,
        organization: &str,
        user_gid: &str,
    ) -> FluentRequest<'_, request::GetTeamsForUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetTeamsForUserRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                organization: organization.to_owned(),
                user_gid: user_gid.to_owned(),
            },
        }
    }
    /**Add a user to a team

The user making this call must be a member of the team in order to add others. The user being added must exist in the same organization as the team.

Returns the complete team membership record for the newly added user.*/
    pub fn add_user_for_team(
        &self,
        data: TeamAddUserRequest,
        team_gid: &str,
    ) -> FluentRequest<'_, request::AddUserForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::AddUserForTeamRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Remove a user from a team

The user making this call must be a member of the team in order to remove themselves or others.*/
    pub fn remove_user_for_team(
        &self,
        data: TeamRemoveUserRequest,
        team_gid: &str,
    ) -> FluentRequest<'_, request::RemoveUserForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveUserForTeamRequest {
                data,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Get a time period

Returns the full record for a single time period.*/
    pub fn get_time_period(
        &self,
        time_period_gid: &str,
    ) -> FluentRequest<'_, request::GetTimePeriodRequest> {
        FluentRequest {
            client: self,
            params: request::GetTimePeriodRequest {
                opt_fields: None,
                opt_pretty: None,
                time_period_gid: time_period_gid.to_owned(),
            },
        }
    }
    /**Get time periods

Returns compact time period records.*/
    pub fn get_time_periods(
        &self,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetTimePeriodsRequest> {
        FluentRequest {
            client: self,
            params: request::GetTimePeriodsRequest {
                end_on: None,
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                start_on: None,
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Get time tracking entries for a task

Returns time tracking entries for a given task.*/
    pub fn get_time_tracking_entries_for_task(
        &self,
        task_gid: &str,
    ) -> FluentRequest<'_, request::GetTimeTrackingEntriesForTaskRequest> {
        FluentRequest {
            client: self,
            params: request::GetTimeTrackingEntriesForTaskRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Create a time tracking entry

Creates a time tracking entry on a given task.

Returns the record of the newly created time tracking entry.*/
    pub fn create_time_tracking_entry(
        &self,
        data: CreateTimeTrackingEntryRequestBody,
        task_gid: &str,
    ) -> FluentRequest<'_, request::CreateTimeTrackingEntryRequest> {
        FluentRequest {
            client: self,
            params: request::CreateTimeTrackingEntryRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                task_gid: task_gid.to_owned(),
            },
        }
    }
    /**Get a time tracking entry

Returns the complete time tracking entry record for a single time tracking entry.*/
    pub fn get_time_tracking_entry(
        &self,
        time_tracking_entry_gid: &str,
    ) -> FluentRequest<'_, request::GetTimeTrackingEntryRequest> {
        FluentRequest {
            client: self,
            params: request::GetTimeTrackingEntryRequest {
                opt_fields: None,
                opt_pretty: None,
                time_tracking_entry_gid: time_tracking_entry_gid.to_owned(),
            },
        }
    }
    /**Update a time tracking entry

A specific, existing time tracking entry can be updated by making a `PUT` request on
the URL for that time tracking entry. Only the fields provided in the `data` block
will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish
to change, or else you may overwrite changes made by another user since
you last retrieved the task.

Returns the complete updated time tracking entry record.*/
    pub fn update_time_tracking_entry(
        &self,
        data: UpdateTimeTrackingEntryRequestBody,
        time_tracking_entry_gid: &str,
    ) -> FluentRequest<'_, request::UpdateTimeTrackingEntryRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateTimeTrackingEntryRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                time_tracking_entry_gid: time_tracking_entry_gid.to_owned(),
            },
        }
    }
    /**Delete a time tracking entry

A specific, existing time tracking entry can be deleted by making a `DELETE` request on
the URL for that time tracking entry.

Returns an empty data record.*/
    pub fn delete_time_tracking_entry(
        &self,
        time_tracking_entry_gid: &str,
    ) -> FluentRequest<'_, request::DeleteTimeTrackingEntryRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteTimeTrackingEntryRequest {
                opt_pretty: None,
                time_tracking_entry_gid: time_tracking_entry_gid.to_owned(),
            },
        }
    }
    /**Get objects via typeahead

Retrieves objects in the workspace based via an auto-completion/typeahead
search algorithm. This feature is meant to provide results quickly, so do
not rely on this API to provide extremely accurate search results. The
result set is limited to a single page of results with a maximum size, so
you won’t be able to fetch large numbers of results.

The typeahead search API provides search for objects from a single
workspace. This endpoint should be used to query for objects when
creating an auto-completion/typeahead search feature. This API is meant
to provide results quickly and should not be relied upon for accurate or
exhaustive search results. The results sets are limited in size and
cannot be paginated.

Queries return a compact representation of each object which is typically
the gid and name fields. Interested in a specific set of fields or all of
the fields?! Of course you are. Use field selectors to manipulate what
data is included in a response.

Resources with type `user` are returned in order of most contacted to
least contacted. This is determined by task assignments, adding the user
to projects, and adding the user as a follower to tasks, messages,
etc.

Resources with type `project` are returned in order of recency. This is
determined when the user visits the project, is added to the project, and
completes tasks in the project.

Resources with type `task` are returned with priority placed on tasks
the user is following, but no guarantee on the order of those tasks.

Resources with type `project_template` are returned with priority
placed on favorited project templates.

Leaving the `query` string empty or omitted will give you results, still
following the resource ordering above. This could be used to list users or
projects that are relevant for the requesting user's api token.*/
    pub fn typeahead_for_workspace(
        &self,
        resource_type: &str,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::TypeaheadForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::TypeaheadForWorkspaceRequest {
                count: None,
                opt_fields: None,
                opt_pretty: None,
                query: None,
                resource_type: resource_type.to_owned(),
                type_: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get a user task list

Returns the full record for a user task list.*/
    pub fn get_user_task_list(
        &self,
        user_task_list_gid: &str,
    ) -> FluentRequest<'_, request::GetUserTaskListRequest> {
        FluentRequest {
            client: self,
            params: request::GetUserTaskListRequest {
                opt_fields: None,
                opt_pretty: None,
                user_task_list_gid: user_task_list_gid.to_owned(),
            },
        }
    }
    /**Get a user's task list

Returns the full record for a user's task list.*/
    pub fn get_user_task_list_for_user(
        &self,
        user_gid: &str,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetUserTaskListForUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetUserTaskListForUserRequest {
                opt_fields: None,
                opt_pretty: None,
                user_gid: user_gid.to_owned(),
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Get multiple users

Returns the user records for all users in all workspaces and organizations accessible to the authenticated user. Accepts an optional workspace ID parameter.
Results are sorted by user ID.*/
    pub fn get_users(&self) -> FluentRequest<'_, request::GetUsersRequest> {
        FluentRequest {
            client: self,
            params: request::GetUsersRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team: None,
                workspace: None,
            },
        }
    }
    /**Get a user

Returns the full user record for the single user with the provided ID.*/
    pub fn get_user(
        &self,
        user_gid: &str,
    ) -> FluentRequest<'_, request::GetUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetUserRequest {
                opt_fields: None,
                opt_pretty: None,
                user_gid: user_gid.to_owned(),
            },
        }
    }
    /**Get a user's favorites

Returns all of a user's favorites in the given workspace, of the given type.
Results are given in order (The same order as Asana's sidebar).*/
    pub fn get_favorites_for_user(
        &self,
        resource_type: &str,
        user_gid: &str,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetFavoritesForUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetFavoritesForUserRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                resource_type: resource_type.to_owned(),
                user_gid: user_gid.to_owned(),
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Get users in a team

Returns the compact records for all users that are members of the team.
Results are sorted alphabetically and limited to 2000. For more results use the `/users` endpoint.*/
    pub fn get_users_for_team(
        &self,
        team_gid: &str,
    ) -> FluentRequest<'_, request::GetUsersForTeamRequest> {
        FluentRequest {
            client: self,
            params: request::GetUsersForTeamRequest {
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                team_gid: team_gid.to_owned(),
            },
        }
    }
    /**Get users in a workspace or organization

Returns the compact records for all users in the specified workspace or organization.
Results are sorted alphabetically and limited to 2000. For more results use the `/users` endpoint.*/
    pub fn get_users_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetUsersForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetUsersForWorkspaceRequest {
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get multiple webhooks

Get the compact representation of all webhooks your app has registered for the authenticated user in the given workspace.*/
    pub fn get_webhooks(
        &self,
        workspace: &str,
    ) -> FluentRequest<'_, request::GetWebhooksRequest> {
        FluentRequest {
            client: self,
            params: request::GetWebhooksRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                resource: None,
                workspace: workspace.to_owned(),
            },
        }
    }
    /**Establish a webhook

Establishing a webhook is a two-part process. First, a simple HTTP POST
request initiates the creation similar to creating any other resource.

Next, in the middle of this request comes the confirmation handshake.
When a webhook is created, we will send a test POST to the target with an
`X-Hook-Secret` header. The target must respond with a `200 OK` or `204
No Content` and a matching `X-Hook-Secret` header to confirm that this
webhook subscription is indeed expected. We strongly recommend storing
this secret to be used to verify future webhook event signatures.

The POST request to create the webhook will then return with the status
of the request. If you do not acknowledge the webhook’s confirmation
handshake it will fail to setup, and you will receive an error in
response to your attempt to create it. This means you need to be able to
receive and complete the webhook *while* the POST request is in-flight
(in other words, have a server that can handle requests asynchronously).

Invalid hostnames like localhost will recieve a 403 Forbidden status code.

```
# Request
curl -H "Authorization: Bearer <personal_access_token>" \
-X POST https://app.asana.com/api/1.0/webhooks \
-d "resource=8675309" \
-d "target=https://example.com/receive-webhook/7654"
```

```
# Handshake sent to https://example.com/
POST /receive-webhook/7654
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
```

```
# Handshake response sent by example.com
HTTP/1.1 200
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
```

```
# Response
HTTP/1.1 201
{
  "data": {
    "gid": "43214",
    "resource": {
      "gid": "8675309",
      "name": "Bugs"
    },
    "target": "https://example.com/receive-webhook/7654",
    "active": false,
    "last_success_at": null,
    "last_failure_at": null,
    "last_failure_content": null
  }
}
```*/
    pub fn create_webhook(
        &self,
        data: WebhookRequest,
    ) -> FluentRequest<'_, request::CreateWebhookRequest> {
        FluentRequest {
            client: self,
            params: request::CreateWebhookRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a webhook

Returns the full record for the given webhook.*/
    pub fn get_webhook(
        &self,
        webhook_gid: &str,
    ) -> FluentRequest<'_, request::GetWebhookRequest> {
        FluentRequest {
            client: self,
            params: request::GetWebhookRequest {
                opt_fields: None,
                opt_pretty: None,
                webhook_gid: webhook_gid.to_owned(),
            },
        }
    }
    /**Update a webhook

An existing webhook's filters can be updated by making a PUT request on the URL for that webhook. Note that the webhook's previous `filters` array will be completely overwritten by the `filters` sent in the PUT request.*/
    pub fn update_webhook(
        &self,
        data: WebhookUpdateRequest,
        webhook_gid: &str,
    ) -> FluentRequest<'_, request::UpdateWebhookRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateWebhookRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                webhook_gid: webhook_gid.to_owned(),
            },
        }
    }
    /**Delete a webhook

This method *permanently* removes a webhook. Note that it may be possible to receive a request that was already in flight after deleting the webhook, but no further requests will be issued.*/
    pub fn delete_webhook(
        &self,
        webhook_gid: &str,
    ) -> FluentRequest<'_, request::DeleteWebhookRequest> {
        FluentRequest {
            client: self,
            params: request::DeleteWebhookRequest {
                opt_pretty: None,
                webhook_gid: webhook_gid.to_owned(),
            },
        }
    }
    /**Get a workspace membership

Returns the complete workspace record for a single workspace membership.*/
    pub fn get_workspace_membership(
        &self,
        workspace_membership_gid: &str,
    ) -> FluentRequest<'_, request::GetWorkspaceMembershipRequest> {
        FluentRequest {
            client: self,
            params: request::GetWorkspaceMembershipRequest {
                opt_fields: None,
                opt_pretty: None,
                workspace_membership_gid: workspace_membership_gid.to_owned(),
            },
        }
    }
    /**Get workspace memberships for a user

Returns the compact workspace membership records for the user.*/
    pub fn get_workspace_memberships_for_user(
        &self,
        user_gid: &str,
    ) -> FluentRequest<'_, request::GetWorkspaceMembershipsForUserRequest> {
        FluentRequest {
            client: self,
            params: request::GetWorkspaceMembershipsForUserRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                user_gid: user_gid.to_owned(),
            },
        }
    }
    /**Get the workspace memberships for a workspace

Returns the compact workspace membership records for the workspace.*/
    pub fn get_workspace_memberships_for_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetWorkspaceMembershipsForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetWorkspaceMembershipsForWorkspaceRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
                user: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Get multiple workspaces

Returns the compact records for all workspaces visible to the authorized user.*/
    pub fn get_workspaces(&self) -> FluentRequest<'_, request::GetWorkspacesRequest> {
        FluentRequest {
            client: self,
            params: request::GetWorkspacesRequest {
                limit: None,
                offset: None,
                opt_fields: None,
                opt_pretty: None,
            },
        }
    }
    /**Get a workspace

Returns the full workspace record for a single workspace.*/
    pub fn get_workspace(
        &self,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::GetWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::GetWorkspaceRequest {
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Update a workspace

A specific, existing workspace can be updated by making a PUT request on the URL for that workspace. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.
Currently the only field that can be modified for a workspace is its name.
Returns the complete, updated workspace record.*/
    pub fn update_workspace(
        &self,
        data: WorkspaceRequest,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::UpdateWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::UpdateWorkspaceRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Add a user to a workspace or organization

Add a user to a workspace or organization.
The user can be referenced by their globally unique user ID or their email address. Returns the full user record for the invited user.*/
    pub fn add_user_for_workspace(
        &self,
        data: WorkspaceAddUserRequest,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::AddUserForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::AddUserForWorkspaceRequest {
                data,
                opt_fields: None,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
    /**Remove a user from a workspace or organization

Remove a user from a workspace or organization.
The user making this call must be an admin in the workspace. The user can be referenced by their globally unique user ID or their email address.
Returns an empty data record.*/
    pub fn remove_user_for_workspace(
        &self,
        data: WorkspaceRemoveUserRequest,
        workspace_gid: &str,
    ) -> FluentRequest<'_, request::RemoveUserForWorkspaceRequest> {
        FluentRequest {
            client: self,
            params: request::RemoveUserForWorkspaceRequest {
                data,
                opt_pretty: None,
                workspace_gid: workspace_gid.to_owned(),
            },
        }
    }
}
pub enum AsanaAuth {
    PersonalAccessToken { personal_access_token: String },
    OAuth2 { middleware: Arc<httpclient_oauth2::OAuth2> },
}
impl AsanaAuth {
    pub fn from_env() -> Self {
        Self::PersonalAccessToken {
            personal_access_token: std::env::var("ASANA_PERSONAL_ACCESS_TOKEN")
                .expect("Environment variable ASANA_PERSONAL_ACCESS_TOKEN is not set."),
        }
    }
    pub fn oauth2(access: String, refresh: String) -> Self {
        let mw = shared_oauth2_flow().bearer_middleware(access, refresh);
        Self::OAuth2 {
            middleware: Arc::new(mw),
        }
    }
}