File: base_team.py

package info (click to toggle)
python-dropbox 12.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,772 kB
  • sloc: python: 76,994; sh: 27; makefile: 24
file content (3059 lines) | stat: -rw-r--r-- 110,321 bytes parent folder | download
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
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file

from abc import ABCMeta, abstractmethod
import warnings

from dropbox import account
from dropbox import async_
from dropbox import auth
from dropbox import check
from dropbox import common
from dropbox import contacts
from dropbox import file_properties
from dropbox import file_requests
from dropbox import files
from dropbox import openid
from dropbox import paper
from dropbox import secondary_emails
from dropbox import seen_state
from dropbox import sharing
from dropbox import team
from dropbox import team_common
from dropbox import team_log
from dropbox import team_policies
from dropbox import users
from dropbox import users_common


class DropboxTeamBase(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def request(self, route, namespace, arg, arg_binary=None):
        pass

    # ------------------------------------------
    # Routes in account namespace

    # ------------------------------------------
    # Routes in auth namespace

    # ------------------------------------------
    # Routes in check namespace

    # ------------------------------------------
    # Routes in contacts namespace

    # ------------------------------------------
    # Routes in file_properties namespace

    def file_properties_templates_add_for_team(self,
                                               name,
                                               description,
                                               fields):
        """
        Add a template associated with a team. See
        :meth:`file_properties_properties_add` to add properties to a file or
        folder. Note: this endpoint will create team-owned templates.

        Route attributes:
            scope: files.team_metadata.write

        :rtype: :class:`dropbox.file_properties.AddTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.file_properties.ModifyTemplateError`
        """
        arg = file_properties.AddTemplateArg(name,
                                             description,
                                             fields)
        r = self.request(
            file_properties.templates_add_for_team,
            'file_properties',
            arg,
            None,
        )
        return r

    def file_properties_templates_get_for_team(self,
                                               template_id):
        """
        Get the schema for a specified template.

        Route attributes:
            scope: files.team_metadata.write

        :param str template_id: An identifier for template added by route  See
            :meth:`file_properties_templates_add_for_user` or
            :meth:`file_properties_templates_add_for_team`.
        :rtype: :class:`dropbox.file_properties.GetTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.file_properties.TemplateError`
        """
        arg = file_properties.GetTemplateArg(template_id)
        r = self.request(
            file_properties.templates_get_for_team,
            'file_properties',
            arg,
            None,
        )
        return r

    def file_properties_templates_list_for_team(self):
        """
        Get the template identifiers for a team. To get the schema of each
        template use :meth:`file_properties_templates_get_for_team`.

        Route attributes:
            scope: files.team_metadata.write

        :rtype: :class:`dropbox.file_properties.ListTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.file_properties.TemplateError`
        """
        arg = None
        r = self.request(
            file_properties.templates_list_for_team,
            'file_properties',
            arg,
            None,
        )
        return r

    def file_properties_templates_remove_for_team(self,
                                                  template_id):
        """
        Permanently removes the specified template created from
        :meth:`file_properties_templates_add_for_user`. All properties
        associated with the template will also be removed. This action cannot be
        undone.

        Route attributes:
            scope: files.team_metadata.write

        :param str template_id: An identifier for a template created by
            :meth:`file_properties_templates_add_for_user` or
            :meth:`file_properties_templates_add_for_team`.
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.file_properties.TemplateError`
        """
        arg = file_properties.RemoveTemplateArg(template_id)
        r = self.request(
            file_properties.templates_remove_for_team,
            'file_properties',
            arg,
            None,
        )
        return None

    def file_properties_templates_update_for_team(self,
                                                  template_id,
                                                  name=None,
                                                  description=None,
                                                  add_fields=None):
        """
        Update a template associated with a team. This route can update the
        template name, the template description and add optional properties to
        templates.

        Route attributes:
            scope: files.team_metadata.write

        :param str template_id: An identifier for template added by  See
            :meth:`file_properties_templates_add_for_user` or
            :meth:`file_properties_templates_add_for_team`.
        :param Nullable[str] name: A display name for the template. template
            names can be up to 256 bytes.
        :param Nullable[str] description: Description for the new template.
            Template descriptions can be up to 1024 bytes.
        :param
            Nullable[List[:class:`dropbox.file_properties.PropertyFieldTemplate`]]
            add_fields: Property field templates to be added to the group
            template. There can be up to 32 properties in a single template.
        :rtype: :class:`dropbox.file_properties.UpdateTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.file_properties.ModifyTemplateError`
        """
        arg = file_properties.UpdateTemplateArg(template_id,
                                                name,
                                                description,
                                                add_fields)
        r = self.request(
            file_properties.templates_update_for_team,
            'file_properties',
            arg,
            None,
        )
        return r

    # ------------------------------------------
    # Routes in file_requests namespace

    # ------------------------------------------
    # Routes in files namespace

    # ------------------------------------------
    # Routes in openid namespace

    # ------------------------------------------
    # Routes in paper namespace

    # ------------------------------------------
    # Routes in sharing namespace

    # ------------------------------------------
    # Routes in team namespace

    def team_devices_list_member_devices(self,
                                         team_member_id,
                                         include_web_sessions=True,
                                         include_desktop_clients=True,
                                         include_mobile_clients=True):
        """
        List all device sessions of a team's member.

        Route attributes:
            scope: sessions.list

        :param str team_member_id: The team's member id.
        :param bool include_web_sessions: Whether to list web sessions of the
            team's member.
        :param bool include_desktop_clients: Whether to list linked desktop
            devices of the team's member.
        :param bool include_mobile_clients: Whether to list linked mobile
            devices of the team's member.
        :rtype: :class:`dropbox.team.ListMemberDevicesResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListMemberDevicesError`
        """
        arg = team.ListMemberDevicesArg(team_member_id,
                                        include_web_sessions,
                                        include_desktop_clients,
                                        include_mobile_clients)
        r = self.request(
            team.devices_list_member_devices,
            'team',
            arg,
            None,
        )
        return r

    def team_devices_list_members_devices(self,
                                          cursor=None,
                                          include_web_sessions=True,
                                          include_desktop_clients=True,
                                          include_mobile_clients=True):
        """
        List all device sessions of a team. Permission : Team member file
        access.

        Route attributes:
            scope: sessions.list

        :param Nullable[str] cursor: At the first call to the
            :meth:`team_devices_list_members_devices` the cursor shouldn't be
            passed. Then, if the result of the call includes a cursor, the
            following requests should include the received cursors in order to
            receive the next sub list of team devices.
        :param bool include_web_sessions: Whether to list web sessions of the
            team members.
        :param bool include_desktop_clients: Whether to list desktop clients of
            the team members.
        :param bool include_mobile_clients: Whether to list mobile clients of
            the team members.
        :rtype: :class:`dropbox.team.ListMembersDevicesResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListMembersDevicesError`
        """
        arg = team.ListMembersDevicesArg(cursor,
                                         include_web_sessions,
                                         include_desktop_clients,
                                         include_mobile_clients)
        r = self.request(
            team.devices_list_members_devices,
            'team',
            arg,
            None,
        )
        return r

    def team_devices_list_team_devices(self,
                                       cursor=None,
                                       include_web_sessions=True,
                                       include_desktop_clients=True,
                                       include_mobile_clients=True):
        """
        List all device sessions of a team. Permission : Team member file
        access.

        Route attributes:
            scope: sessions.list

        :param Nullable[str] cursor: At the first call to the
            :meth:`team_devices_list_team_devices` the cursor shouldn't be
            passed. Then, if the result of the call includes a cursor, the
            following requests should include the received cursors in order to
            receive the next sub list of team devices.
        :param bool include_web_sessions: Whether to list web sessions of the
            team members.
        :param bool include_desktop_clients: Whether to list desktop clients of
            the team members.
        :param bool include_mobile_clients: Whether to list mobile clients of
            the team members.
        :rtype: :class:`dropbox.team.ListTeamDevicesResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListTeamDevicesError`
        """
        warnings.warn(
            'devices/list_team_devices is deprecated. Use devices/list_members_devices.',
            DeprecationWarning,
        )
        arg = team.ListTeamDevicesArg(cursor,
                                      include_web_sessions,
                                      include_desktop_clients,
                                      include_mobile_clients)
        r = self.request(
            team.devices_list_team_devices,
            'team',
            arg,
            None,
        )
        return r

    def team_devices_revoke_device_session(self,
                                           arg):
        """
        Revoke a device session of a team's member.

        Route attributes:
            scope: sessions.modify

        :type arg: :class:`dropbox.team.RevokeDeviceSessionArg`
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.RevokeDeviceSessionError`
        """
        r = self.request(
            team.devices_revoke_device_session,
            'team',
            arg,
            None,
        )
        return None

    def team_devices_revoke_device_session_batch(self,
                                                 revoke_devices):
        """
        Revoke a list of device sessions of team members.

        Route attributes:
            scope: sessions.modify

        :type revoke_devices: List[:class:`dropbox.team.RevokeDeviceSessionArg`]
        :rtype: :class:`dropbox.team.RevokeDeviceSessionBatchResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.RevokeDeviceSessionBatchError`
        """
        arg = team.RevokeDeviceSessionBatchArg(revoke_devices)
        r = self.request(
            team.devices_revoke_device_session_batch,
            'team',
            arg,
            None,
        )
        return r

    def team_features_get_values(self,
                                 features):
        """
        Get the values for one or more featues. This route allows you to check
        your account's capability for what feature you can access or what value
        you have for certain features. Permission : Team information.

        Route attributes:
            scope: team_info.read

        :param List[:class:`dropbox.team.Feature`] features: A list of features
            in :class:`dropbox.team.Feature`. If the list is empty, this route
            will return :class:`dropbox.team.FeaturesGetValuesBatchError`.
        :rtype: :class:`dropbox.team.FeaturesGetValuesBatchResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.FeaturesGetValuesBatchError`
        """
        arg = team.FeaturesGetValuesBatchArg(features)
        r = self.request(
            team.features_get_values,
            'team',
            arg,
            None,
        )
        return r

    def team_get_info(self):
        """
        Retrieves information about a team.

        Route attributes:
            scope: team_info.read

        :rtype: :class:`dropbox.team.TeamGetInfoResult`
        """
        arg = None
        r = self.request(
            team.get_info,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_create(self,
                           group_name,
                           add_creator_as_owner=False,
                           group_external_id=None,
                           group_management_type=None):
        """
        Creates a new, empty group, with a requested name. Permission : Team
        member management.

        Route attributes:
            scope: groups.write

        :param str group_name: Group name.
        :param bool add_creator_as_owner: Automatically add the creator of the
            group.
        :param Nullable[str] group_external_id: The creator of a team can
            associate an arbitrary external ID to the group.
        :param Nullable[:class:`dropbox.team.GroupManagementType`]
            group_management_type: Whether the team can be managed by selected
            users, or only by team admins.
        :rtype: :class:`dropbox.team.GroupFullInfo`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupCreateError`
        """
        arg = team.GroupCreateArg(group_name,
                                  add_creator_as_owner,
                                  group_external_id,
                                  group_management_type)
        r = self.request(
            team.groups_create,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_delete(self,
                           arg):
        """
        Deletes a group. The group is deleted immediately. However the revoking
        of group-owned resources may take additional time. Use the
        :meth:`team_groups_job_status_get` to determine whether this process has
        completed. Permission : Team member management.

        Route attributes:
            scope: groups.write

        :param arg: Argument for selecting a single group, either by group_id or
            by external group ID.
        :type arg: :class:`dropbox.team.GroupSelector`
        :rtype: :class:`dropbox.team.LaunchEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupDeleteError`
        """
        r = self.request(
            team.groups_delete,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_get_info(self,
                             arg):
        """
        Retrieves information about one or more groups. Note that the optional
        field  ``GroupFullInfo.members`` is not returned for system-managed
        groups. Permission : Team Information.

        Route attributes:
            scope: groups.read

        :param arg: Argument for selecting a list of groups, either by
            group_ids, or external group IDs.
        :type arg: :class:`dropbox.team.GroupsSelector`
        :rtype: List[:class:`dropbox.team.GroupsGetInfoItem`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupsGetInfoError`
        """
        r = self.request(
            team.groups_get_info,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_job_status_get(self,
                                   async_job_id):
        """
        Once an async_job_id is returned from :meth:`team_groups_delete`,
        :meth:`team_groups_members_add` , or :meth:`team_groups_members_remove`
        use this method to poll the status of granting/revoking group members'
        access to group-owned resources. Permission : Team member management.

        Route attributes:
            scope: groups.write

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.PollEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupsPollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.groups_job_status_get,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_list(self,
                         limit=1000):
        """
        Lists groups on a team. Permission : Team Information.

        Route attributes:
            scope: groups.read

        :param int limit: Number of results to return per call.
        :rtype: :class:`dropbox.team.GroupsListResult`
        """
        arg = team.GroupsListArg(limit)
        r = self.request(
            team.groups_list,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_list_continue(self,
                                  cursor):
        """
        Once a cursor has been retrieved from :meth:`team_groups_list`, use this
        to paginate through all groups. Permission : Team Information.

        Route attributes:
            scope: groups.read

        :param str cursor: Indicates from what point to get the next set of
            groups.
        :rtype: :class:`dropbox.team.GroupsListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupsListContinueError`
        """
        arg = team.GroupsListContinueArg(cursor)
        r = self.request(
            team.groups_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_members_add(self,
                                group,
                                members,
                                return_members=True):
        """
        Adds members to a group. The members are added immediately. However the
        granting of group-owned resources may take additional time. Use the
        :meth:`team_groups_job_status_get` to determine whether this process has
        completed. Permission : Team member management.

        Route attributes:
            scope: groups.write

        :param group: Group to which users will be added.
        :type group: :class:`dropbox.team.GroupSelector`
        :param List[:class:`dropbox.team.MemberAccess`] members: List of users
            to be added to the group.
        :rtype: :class:`dropbox.team.GroupMembersChangeResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupMembersAddError`
        """
        arg = team.GroupMembersAddArg(group,
                                      members,
                                      return_members)
        r = self.request(
            team.groups_members_add,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_members_list(self,
                                 group,
                                 limit=1000):
        """
        Lists members of a group. Permission : Team Information.

        Route attributes:
            scope: groups.read

        :param group: The group whose members are to be listed.
        :type group: :class:`dropbox.team.GroupSelector`
        :param int limit: Number of results to return per call.
        :rtype: :class:`dropbox.team.GroupsMembersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupSelectorError`
        """
        arg = team.GroupsMembersListArg(group,
                                        limit)
        r = self.request(
            team.groups_members_list,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_members_list_continue(self,
                                          cursor):
        """
        Once a cursor has been retrieved from :meth:`team_groups_members_list`,
        use this to paginate through all members of the group. Permission : Team
        information.

        Route attributes:
            scope: groups.read

        :param str cursor: Indicates from what point to get the next set of
            groups.
        :rtype: :class:`dropbox.team.GroupsMembersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupsMembersListContinueError`
        """
        arg = team.GroupsMembersListContinueArg(cursor)
        r = self.request(
            team.groups_members_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_members_remove(self,
                                   group,
                                   users,
                                   return_members=True):
        """
        Removes members from a group. The members are removed immediately.
        However the revoking of group-owned resources may take additional time.
        Use the :meth:`team_groups_job_status_get` to determine whether this
        process has completed. This method permits removing the only owner of a
        group, even in cases where this is not possible via the web client.
        Permission : Team member management.

        Route attributes:
            scope: groups.write

        :param group: Group from which users will be removed.
        :type group: :class:`dropbox.team.GroupSelector`
        :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users
            to be removed from the group.
        :rtype: :class:`dropbox.team.GroupMembersChangeResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupMembersRemoveError`
        """
        arg = team.GroupMembersRemoveArg(group,
                                         users,
                                         return_members)
        r = self.request(
            team.groups_members_remove,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_members_set_access_type(self,
                                            group,
                                            user,
                                            access_type,
                                            return_members=True):
        """
        Sets a member's access type in a group. Permission : Team member
        management.

        Route attributes:
            scope: groups.write

        :param access_type: New group access type the user will have.
        :type access_type: :class:`dropbox.team.GroupAccessType`
        :param bool return_members: Whether to return the list of members in the
            group.  Note that the default value will cause all the group members
            to be returned in the response. This may take a long time for large
            groups.
        :rtype: List[:class:`dropbox.team.GroupsGetInfoItem`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupMemberSetAccessTypeError`
        """
        arg = team.GroupMembersSetAccessTypeArg(group,
                                                user,
                                                access_type,
                                                return_members)
        r = self.request(
            team.groups_members_set_access_type,
            'team',
            arg,
            None,
        )
        return r

    def team_groups_update(self,
                           group,
                           return_members=True,
                           new_group_name=None,
                           new_group_external_id=None,
                           new_group_management_type=None):
        """
        Updates a group's name and/or external ID. Permission : Team member
        management.

        Route attributes:
            scope: groups.write

        :param group: Specify a group.
        :type group: :class:`dropbox.team.GroupSelector`
        :param Nullable[str] new_group_name: Optional argument. Set group name
            to this if provided.
        :param Nullable[str] new_group_external_id: Optional argument. New group
            external ID. If the argument is None, the group's external_id won't
            be updated. If the argument is empty string, the group's external id
            will be cleared.
        :param Nullable[:class:`dropbox.team.GroupManagementType`]
            new_group_management_type: Set new group management type, if
            provided.
        :rtype: :class:`dropbox.team.GroupFullInfo`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.GroupUpdateError`
        """
        arg = team.GroupUpdateArgs(group,
                                   return_members,
                                   new_group_name,
                                   new_group_external_id,
                                   new_group_management_type)
        r = self.request(
            team.groups_update,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_create_policy(self,
                                       name,
                                       members,
                                       description=None,
                                       start_date=None,
                                       end_date=None):
        """
        Creates new legal hold policy. Note: Legal Holds is a paid add-on. Not
        all teams have the feature. Permission : Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param str name: Policy name.
        :param Nullable[str] description: A description of the legal hold
            policy.
        :param List[str] members: List of team member IDs added to the hold.
        :param Nullable[datetime] start_date: start date of the legal hold
            policy.
        :param Nullable[datetime] end_date: end date of the legal hold policy.
        :rtype: :class:`dropbox.team.LegalHoldPolicy`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsPolicyCreateError`
        """
        arg = team.LegalHoldsPolicyCreateArg(name,
                                             members,
                                             description,
                                             start_date,
                                             end_date)
        r = self.request(
            team.legal_holds_create_policy,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_get_policy(self,
                                    id):
        """
        Gets a legal hold by Id. Note: Legal Holds is a paid add-on. Not all
        teams have the feature. Permission : Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param str id: The legal hold Id.
        :rtype: :class:`dropbox.team.LegalHoldPolicy`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsGetPolicyError`
        """
        arg = team.LegalHoldsGetPolicyArg(id)
        r = self.request(
            team.legal_holds_get_policy,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_list_held_revisions(self,
                                             id):
        """
        List the file metadata that's under the hold. Note: Legal Holds is a
        paid add-on. Not all teams have the feature. Permission : Team member
        file access.

        Route attributes:
            scope: team_data.governance.write

        :param str id: The legal hold Id.
        :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsListHeldRevisionsError`
        """
        arg = team.LegalHoldsListHeldRevisionsArg(id)
        r = self.request(
            team.legal_holds_list_held_revisions,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_list_held_revisions_continue(self,
                                                      id,
                                                      cursor=None):
        """
        Continue listing the file metadata that's under the hold. Note: Legal
        Holds is a paid add-on. Not all teams have the feature. Permission :
        Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param str id: The legal hold Id.
        :param Nullable[str] cursor: The cursor idicates where to continue
            reading file metadata entries for the next API call. When there are
            no more entries, the cursor will return none.
        :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsListHeldRevisionsError`
        """
        arg = team.LegalHoldsListHeldRevisionsContinueArg(id,
                                                          cursor)
        r = self.request(
            team.legal_holds_list_held_revisions_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_list_policies(self,
                                       include_released=False):
        """
        Lists legal holds on a team. Note: Legal Holds is a paid add-on. Not all
        teams have the feature. Permission : Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param bool include_released: Whether to return holds that were
            released.
        :rtype: :class:`dropbox.team.LegalHoldsListPoliciesResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsListPoliciesError`
        """
        arg = team.LegalHoldsListPoliciesArg(include_released)
        r = self.request(
            team.legal_holds_list_policies,
            'team',
            arg,
            None,
        )
        return r

    def team_legal_holds_release_policy(self,
                                        id):
        """
        Releases a legal hold by Id. Note: Legal Holds is a paid add-on. Not all
        teams have the feature. Permission : Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param str id: The legal hold Id.
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsPolicyReleaseError`
        """
        arg = team.LegalHoldsPolicyReleaseArg(id)
        r = self.request(
            team.legal_holds_release_policy,
            'team',
            arg,
            None,
        )
        return None

    def team_legal_holds_update_policy(self,
                                       id,
                                       name=None,
                                       description=None,
                                       members=None):
        """
        Updates a legal hold. Note: Legal Holds is a paid add-on. Not all teams
        have the feature. Permission : Team member file access.

        Route attributes:
            scope: team_data.governance.write

        :param str id: The legal hold Id.
        :param Nullable[str] name: Policy new name.
        :param Nullable[str] description: Policy new description.
        :param Nullable[List[str]] members: List of team member IDs to apply the
            policy on.
        :rtype: :class:`dropbox.team.LegalHoldPolicy`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.LegalHoldsPolicyUpdateError`
        """
        arg = team.LegalHoldsPolicyUpdateArg(id,
                                             name,
                                             description,
                                             members)
        r = self.request(
            team.legal_holds_update_policy,
            'team',
            arg,
            None,
        )
        return r

    def team_linked_apps_list_member_linked_apps(self,
                                                 team_member_id):
        """
        List all linked applications of the team member. Note, this endpoint
        does not list any team-linked applications.

        Route attributes:
            scope: sessions.list

        :param str team_member_id: The team member id.
        :rtype: :class:`dropbox.team.ListMemberAppsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListMemberAppsError`
        """
        arg = team.ListMemberAppsArg(team_member_id)
        r = self.request(
            team.linked_apps_list_member_linked_apps,
            'team',
            arg,
            None,
        )
        return r

    def team_linked_apps_list_members_linked_apps(self,
                                                  cursor=None):
        """
        List all applications linked to the team members' accounts. Note, this
        endpoint does not list any team-linked applications.

        Route attributes:
            scope: sessions.list

        :param Nullable[str] cursor: At the first call to the
            :meth:`team_linked_apps_list_members_linked_apps` the cursor
            shouldn't be passed. Then, if the result of the call includes a
            cursor, the following requests should include the received cursors
            in order to receive the next sub list of the team applications.
        :rtype: :class:`dropbox.team.ListMembersAppsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListMembersAppsError`
        """
        arg = team.ListMembersAppsArg(cursor)
        r = self.request(
            team.linked_apps_list_members_linked_apps,
            'team',
            arg,
            None,
        )
        return r

    def team_linked_apps_list_team_linked_apps(self,
                                               cursor=None):
        """
        List all applications linked to the team members' accounts. Note, this
        endpoint doesn't list any team-linked applications.

        Route attributes:
            scope: sessions.list

        :param Nullable[str] cursor: At the first call to the
            :meth:`team_linked_apps_list_team_linked_apps` the cursor shouldn't
            be passed. Then, if the result of the call includes a cursor, the
            following requests should include the received cursors in order to
            receive the next sub list of the team applications.
        :rtype: :class:`dropbox.team.ListTeamAppsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ListTeamAppsError`
        """
        warnings.warn(
            'linked_apps/list_team_linked_apps is deprecated. Use linked_apps/list_members_linked_apps.',
            DeprecationWarning,
        )
        arg = team.ListTeamAppsArg(cursor)
        r = self.request(
            team.linked_apps_list_team_linked_apps,
            'team',
            arg,
            None,
        )
        return r

    def team_linked_apps_revoke_linked_app(self,
                                           app_id,
                                           team_member_id,
                                           keep_app_folder=True):
        """
        Revoke a linked application of the team member.

        Route attributes:
            scope: sessions.modify

        :param str app_id: The application's unique id.
        :param str team_member_id: The unique id of the member owning the
            device.
        :param bool keep_app_folder: This flag is not longer supported, the
            application dedicated folder (in case the application uses  one)
            will be kept.
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.RevokeLinkedAppError`
        """
        arg = team.RevokeLinkedApiAppArg(app_id,
                                         team_member_id,
                                         keep_app_folder)
        r = self.request(
            team.linked_apps_revoke_linked_app,
            'team',
            arg,
            None,
        )
        return None

    def team_linked_apps_revoke_linked_app_batch(self,
                                                 revoke_linked_app):
        """
        Revoke a list of linked applications of the team members.

        Route attributes:
            scope: sessions.modify

        :type revoke_linked_app:
        List[:class:`dropbox.team.RevokeLinkedApiAppArg`]
        :rtype: :class:`dropbox.team.RevokeLinkedAppBatchResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.RevokeLinkedAppBatchError`
        """
        arg = team.RevokeLinkedApiAppBatchArg(revoke_linked_app)
        r = self.request(
            team.linked_apps_revoke_linked_app_batch,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_excluded_users_add(self,
                                                    users=None):
        """
        Add users to member space limits excluded users list.

        Route attributes:
            scope: members.write

        :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List
            of users to be added/removed.
        :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ExcludedUsersUpdateError`
        """
        arg = team.ExcludedUsersUpdateArg(users)
        r = self.request(
            team.member_space_limits_excluded_users_add,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_excluded_users_list(self,
                                                     limit=1000):
        """
        List member space limits excluded users.

        Route attributes:
            scope: members.read

        :param int limit: Number of results to return per call.
        :rtype: :class:`dropbox.team.ExcludedUsersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ExcludedUsersListError`
        """
        arg = team.ExcludedUsersListArg(limit)
        r = self.request(
            team.member_space_limits_excluded_users_list,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_excluded_users_list_continue(self,
                                                              cursor):
        """
        Continue listing member space limits excluded users.

        Route attributes:
            scope: members.read

        :param str cursor: Indicates from what point to get the next set of
            users.
        :rtype: :class:`dropbox.team.ExcludedUsersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ExcludedUsersListContinueError`
        """
        arg = team.ExcludedUsersListContinueArg(cursor)
        r = self.request(
            team.member_space_limits_excluded_users_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_excluded_users_remove(self,
                                                       users=None):
        """
        Remove users from member space limits excluded users list.

        Route attributes:
            scope: members.write

        :param Nullable[List[:class:`dropbox.team.UserSelectorArg`]] users: List
            of users to be added/removed.
        :rtype: :class:`dropbox.team.ExcludedUsersUpdateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ExcludedUsersUpdateError`
        """
        arg = team.ExcludedUsersUpdateArg(users)
        r = self.request(
            team.member_space_limits_excluded_users_remove,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_get_custom_quota(self,
                                                  users):
        """
        Get users custom quota. A maximum of 1000 members can be specified in a
        single call. Note: to apply a custom space limit, a team admin needs to
        set a member space limit for the team first. (the team admin can check
        the settings here: https://www.dropbox.com/team/admin/settings/space).

        Route attributes:
            scope: members.read

        :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users.
        :rtype: List[:class:`dropbox.team.CustomQuotaResult`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.CustomQuotaError`
        """
        arg = team.CustomQuotaUsersArg(users)
        r = self.request(
            team.member_space_limits_get_custom_quota,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_remove_custom_quota(self,
                                                     users):
        """
        Remove users custom quota. A maximum of 1000 members can be specified in
        a single call. Note: to apply a custom space limit, a team admin needs
        to set a member space limit for the team first. (the team admin can
        check the settings here:
        https://www.dropbox.com/team/admin/settings/space).

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.UserSelectorArg`] users: List of users.
        :rtype: List[:class:`dropbox.team.RemoveCustomQuotaResult`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.CustomQuotaError`
        """
        arg = team.CustomQuotaUsersArg(users)
        r = self.request(
            team.member_space_limits_remove_custom_quota,
            'team',
            arg,
            None,
        )
        return r

    def team_member_space_limits_set_custom_quota(self,
                                                  users_and_quotas):
        """
        Set users custom quota. Custom quota has to be at least 15GB. A maximum
        of 1000 members can be specified in a single call. Note: to apply a
        custom space limit, a team admin needs to set a member space limit for
        the team first. (the team admin can check the settings here:
        https://www.dropbox.com/team/admin/settings/space).

        Route attributes:
            scope: members.read

        :param List[:class:`dropbox.team.UserCustomQuotaArg`] users_and_quotas:
            List of users and their custom quotas.
        :rtype: List[:class:`dropbox.team.CustomQuotaResult`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.SetCustomQuotaError`
        """
        arg = team.SetCustomQuotaArg(users_and_quotas)
        r = self.request(
            team.member_space_limits_set_custom_quota,
            'team',
            arg,
            None,
        )
        return r

    def team_members_add_v2(self,
                            new_members,
                            force_async=False):
        """
        Adds members to a team. Permission : Team member management A maximum of
        20 members can be specified in a single call. If no Dropbox account
        exists with the email address specified, a new Dropbox account will be
        created with the given email address, and that account will be invited
        to the team. If a personal Dropbox account exists with the email address
        specified in the call, this call will create a placeholder Dropbox
        account for the user on the team and send an email inviting the user to
        migrate their existing personal account onto the team. Team member
        management apps are required to set an initial given_name and surname
        for a user to use in the team invitation and for 'Perform as team
        member' actions taken on the user before they become 'active'.

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.MemberAddV2Arg`] new_members: Details
            of new members to be added to the team.
        :rtype: :class:`dropbox.team.MembersAddLaunchV2Result`
        """
        arg = team.MembersAddV2Arg(new_members,
                                   force_async)
        r = self.request(
            team.members_add_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_add(self,
                         new_members,
                         force_async=False):
        """
        Adds members to a team. Permission : Team member management A maximum of
        20 members can be specified in a single call. If no Dropbox account
        exists with the email address specified, a new Dropbox account will be
        created with the given email address, and that account will be invited
        to the team. If a personal Dropbox account exists with the email address
        specified in the call, this call will create a placeholder Dropbox
        account for the user on the team and send an email inviting the user to
        migrate their existing personal account onto the team. Team member
        management apps are required to set an initial given_name and surname
        for a user to use in the team invitation and for 'Perform as team
        member' actions taken on the user before they become 'active'.

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.MemberAddArg`] new_members: Details of
            new members to be added to the team.
        :rtype: :class:`dropbox.team.MembersAddLaunch`
        """
        arg = team.MembersAddArg(new_members,
                                 force_async)
        r = self.request(
            team.members_add,
            'team',
            arg,
            None,
        )
        return r

    def team_members_add_job_status_get_v2(self,
                                           async_job_id):
        """
        Once an async_job_id is returned from :meth:`team_members_add_v2` , use
        this to poll the status of the asynchronous request. Permission : Team
        member management.

        Route attributes:
            scope: members.write

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.MembersAddJobStatusV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.PollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.members_add_job_status_get_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_add_job_status_get(self,
                                        async_job_id):
        """
        Once an async_job_id is returned from :meth:`team_members_add` , use
        this to poll the status of the asynchronous request. Permission : Team
        member management.

        Route attributes:
            scope: members.write

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.MembersAddJobStatus`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.PollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.members_add_job_status_get,
            'team',
            arg,
            None,
        )
        return r

    def team_members_delete_profile_photo_v2(self,
                                             user):
        """
        Deletes a team member's profile photo. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of the user whose profile photo will be deleted.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :rtype: :class:`dropbox.team.TeamMemberInfoV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersDeleteProfilePhotoError`
        """
        arg = team.MembersDeleteProfilePhotoArg(user)
        r = self.request(
            team.members_delete_profile_photo_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_delete_profile_photo(self,
                                          user):
        """
        Deletes a team member's profile photo. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of the user whose profile photo will be deleted.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :rtype: :class:`dropbox.team.TeamMemberInfo`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersDeleteProfilePhotoError`
        """
        arg = team.MembersDeleteProfilePhotoArg(user)
        r = self.request(
            team.members_delete_profile_photo,
            'team',
            arg,
            None,
        )
        return r

    def team_members_get_available_team_member_roles(self):
        """
        Get available TeamMemberRoles for the connected team. To be used with
        :meth:`team_members_set_admin_permissions_v2`. Permission : Team member
        management.

        Route attributes:
            scope: members.read

        :rtype: :class:`dropbox.team.MembersGetAvailableTeamMemberRolesResult`
        """
        arg = None
        r = self.request(
            team.members_get_available_team_member_roles,
            'team',
            arg,
            None,
        )
        return r

    def team_members_get_info_v2(self,
                                 members):
        """
        Returns information about multiple team members. Permission : Team
        information This endpoint will return
        ``MembersGetInfoItem.id_not_found``, for IDs (or emails) that cannot be
        matched to a valid team member.

        Route attributes:
            scope: members.read

        :param List[:class:`dropbox.team.UserSelectorArg`] members: List of team
            members.
        :rtype: :class:`dropbox.team.MembersGetInfoV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersGetInfoError`
        """
        arg = team.MembersGetInfoV2Arg(members)
        r = self.request(
            team.members_get_info_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_get_info(self,
                              members):
        """
        Returns information about multiple team members. Permission : Team
        information This endpoint will return
        ``MembersGetInfoItem.id_not_found``, for IDs (or emails) that cannot be
        matched to a valid team member.

        Route attributes:
            scope: members.read

        :param List[:class:`dropbox.team.UserSelectorArg`] members: List of team
            members.
        :rtype: List[:class:`dropbox.team.MembersGetInfoItem`]
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersGetInfoError`
        """
        arg = team.MembersGetInfoArgs(members)
        r = self.request(
            team.members_get_info,
            'team',
            arg,
            None,
        )
        return r

    def team_members_list_v2(self,
                             limit=1000,
                             include_removed=False):
        """
        Lists members of a team. Permission : Team information.

        Route attributes:
            scope: members.read

        :param int limit: Number of results to return per call.
        :param bool include_removed: Whether to return removed members.
        :rtype: :class:`dropbox.team.MembersListV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersListError`
        """
        arg = team.MembersListArg(limit,
                                  include_removed)
        r = self.request(
            team.members_list_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_list(self,
                          limit=1000,
                          include_removed=False):
        """
        Lists members of a team. Permission : Team information.

        Route attributes:
            scope: members.read

        :param int limit: Number of results to return per call.
        :param bool include_removed: Whether to return removed members.
        :rtype: :class:`dropbox.team.MembersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersListError`
        """
        arg = team.MembersListArg(limit,
                                  include_removed)
        r = self.request(
            team.members_list,
            'team',
            arg,
            None,
        )
        return r

    def team_members_list_continue_v2(self,
                                      cursor):
        """
        Once a cursor has been retrieved from :meth:`team_members_list_v2`, use
        this to paginate through all team members. Permission : Team
        information.

        Route attributes:
            scope: members.read

        :param str cursor: Indicates from what point to get the next set of
            members.
        :rtype: :class:`dropbox.team.MembersListV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersListContinueError`
        """
        arg = team.MembersListContinueArg(cursor)
        r = self.request(
            team.members_list_continue_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_list_continue(self,
                                   cursor):
        """
        Once a cursor has been retrieved from :meth:`team_members_list`, use
        this to paginate through all team members. Permission : Team
        information.

        Route attributes:
            scope: members.read

        :param str cursor: Indicates from what point to get the next set of
            members.
        :rtype: :class:`dropbox.team.MembersListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersListContinueError`
        """
        arg = team.MembersListContinueArg(cursor)
        r = self.request(
            team.members_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_members_move_former_member_files(self,
                                              user,
                                              transfer_dest_id,
                                              transfer_admin_id):
        """
        Moves removed member's files to a different member. This endpoint
        initiates an asynchronous job. To obtain the final result of the job,
        the client should periodically poll
        :meth:`team_members_move_former_member_files_job_status_check`.
        Permission : Team member management.

        Route attributes:
            scope: members.write

        :param transfer_dest_id: Files from the deleted member account will be
            transferred to this user.
        :type transfer_dest_id: :class:`dropbox.team.UserSelectorArg`
        :param transfer_admin_id: Errors during the transfer process will be
            sent via email to this user.
        :type transfer_admin_id: :class:`dropbox.team.UserSelectorArg`
        :rtype: :class:`dropbox.team.LaunchEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersTransferFormerMembersFilesError`
        """
        arg = team.MembersDataTransferArg(user,
                                          transfer_dest_id,
                                          transfer_admin_id)
        r = self.request(
            team.members_move_former_member_files,
            'team',
            arg,
            None,
        )
        return r

    def team_members_move_former_member_files_job_status_check(self,
                                                               async_job_id):
        """
        Once an async_job_id is returned from
        :meth:`team_members_move_former_member_files` , use this to poll the
        status of the asynchronous request. Permission : Team member management.

        Route attributes:
            scope: members.write

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.PollEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.PollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.members_move_former_member_files_job_status_check,
            'team',
            arg,
            None,
        )
        return r

    def team_members_recover(self,
                             user):
        """
        Recover a deleted member. Permission : Team member management Exactly
        one of team_member_id, email, or external_id must be provided to
        identify the user account.

        Route attributes:
            scope: members.delete

        :param user: Identity of user to recover.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersRecoverError`
        """
        arg = team.MembersRecoverArg(user)
        r = self.request(
            team.members_recover,
            'team',
            arg,
            None,
        )
        return None

    def team_members_remove(self,
                            user,
                            wipe_data=True,
                            transfer_dest_id=None,
                            transfer_admin_id=None,
                            keep_account=False,
                            retain_team_shares=False):
        """
        Removes a member from a team. Permission : Team member management
        Exactly one of team_member_id, email, or external_id must be provided to
        identify the user account. Accounts can be recovered via
        :meth:`team_members_recover` for a 7 day period or until the account has
        been permanently deleted or transferred to another account (whichever
        comes first). Calling :meth:`team_members_add` while a user is still
        recoverable on your team will return with
        ``MemberAddResult.user_already_on_team``. Accounts can have their files
        transferred via the admin console for a limited time, based on the
        version history length associated with the team (180 days for most
        teams). This endpoint may initiate an asynchronous job. To obtain the
        final result of the job, the client should periodically poll
        :meth:`team_members_remove_job_status_get`.

        Route attributes:
            scope: members.delete

        :param Nullable[:class:`dropbox.team.UserSelectorArg`] transfer_dest_id:
            If provided, files from the deleted member account will be
            transferred to this user.
        :param Nullable[:class:`dropbox.team.UserSelectorArg`]
            transfer_admin_id: If provided, errors during the transfer process
            will be sent via email to this user. If the transfer_dest_id
            argument was provided, then this argument must be provided as well.
        :param bool keep_account: Downgrade the member to a Basic account. The
            user will retain the email address associated with their Dropbox
            account and data in their account that is not restricted to team
            members. In order to keep the account the argument ``wipe_data``
            should be set to ``False``.
        :param bool retain_team_shares: If provided, allows removed users to
            keep access to Dropbox folders (not Dropbox Paper folders) already
            explicitly shared with them (not via a group) when they are
            downgraded to a Basic account. Users will not retain access to
            folders that do not allow external sharing. In order to keep the
            sharing relationships, the arguments ``wipe_data`` should be set to
            ``False`` and ``keep_account`` should be set to ``True``.
        :rtype: :class:`dropbox.team.LaunchEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersRemoveError`
        """
        arg = team.MembersRemoveArg(user,
                                    wipe_data,
                                    transfer_dest_id,
                                    transfer_admin_id,
                                    keep_account,
                                    retain_team_shares)
        r = self.request(
            team.members_remove,
            'team',
            arg,
            None,
        )
        return r

    def team_members_remove_job_status_get(self,
                                           async_job_id):
        """
        Once an async_job_id is returned from :meth:`team_members_remove` , use
        this to poll the status of the asynchronous request. Permission : Team
        member management.

        Route attributes:
            scope: members.delete

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.PollEmptyResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.PollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.members_remove_job_status_get,
            'team',
            arg,
            None,
        )
        return r

    def team_members_secondary_emails_add(self,
                                          new_secondary_emails):
        """
        Add secondary emails to users. Permission : Team member management.
        Emails that are on verified domains will be verified automatically. For
        each email address not on a verified domain a verification email will be
        sent.

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.UserSecondaryEmailsArg`]
            new_secondary_emails: List of users and secondary emails to add.
        :rtype: :class:`dropbox.team.AddSecondaryEmailsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.AddSecondaryEmailsError`
        """
        arg = team.AddSecondaryEmailsArg(new_secondary_emails)
        r = self.request(
            team.members_secondary_emails_add,
            'team',
            arg,
            None,
        )
        return r

    def team_members_secondary_emails_delete(self,
                                             emails_to_delete):
        """
        Delete secondary emails from users Permission : Team member management.
        Users will be notified of deletions of verified secondary emails at both
        the secondary email and their primary email.

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.UserSecondaryEmailsArg`]
            emails_to_delete: List of users and their secondary emails to
            delete.
        :rtype: :class:`dropbox.team.DeleteSecondaryEmailsResult`
        """
        arg = team.DeleteSecondaryEmailsArg(emails_to_delete)
        r = self.request(
            team.members_secondary_emails_delete,
            'team',
            arg,
            None,
        )
        return r

    def team_members_secondary_emails_resend_verification_emails(self,
                                                                 emails_to_resend):
        """
        Resend secondary email verification emails. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param List[:class:`dropbox.team.UserSecondaryEmailsArg`]
            emails_to_resend: List of users and secondary emails to resend
            verification emails to.
        :rtype: :class:`dropbox.team.ResendVerificationEmailResult`
        """
        arg = team.ResendVerificationEmailArg(emails_to_resend)
        r = self.request(
            team.members_secondary_emails_resend_verification_emails,
            'team',
            arg,
            None,
        )
        return r

    def team_members_send_welcome_email(self,
                                        arg):
        """
        Sends welcome email to pending team member. Permission : Team member
        management Exactly one of team_member_id, email, or external_id must be
        provided to identify the user account. No-op if team member is not
        pending.

        Route attributes:
            scope: members.write

        :param arg: Argument for selecting a single user, either by
            team_member_id, external_id or email.
        :type arg: :class:`dropbox.team.UserSelectorArg`
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSendWelcomeError`
        """
        r = self.request(
            team.members_send_welcome_email,
            'team',
            arg,
            None,
        )
        return None

    def team_members_set_admin_permissions_v2(self,
                                              user,
                                              new_roles=None):
        """
        Updates a team member's permissions. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of user whose role will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param Nullable[List[str]] new_roles: The new roles for the member. Send
            empty list to make user member only. For now, only up to one role is
            allowed.
        :rtype: :class:`dropbox.team.MembersSetPermissions2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetPermissions2Error`
        """
        arg = team.MembersSetPermissions2Arg(user,
                                             new_roles)
        r = self.request(
            team.members_set_admin_permissions_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_set_admin_permissions(self,
                                           user,
                                           new_role):
        """
        Updates a team member's permissions. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of user whose role will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param new_role: The new role of the member.
        :type new_role: :class:`dropbox.team.AdminTier`
        :rtype: :class:`dropbox.team.MembersSetPermissionsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetPermissionsError`
        """
        arg = team.MembersSetPermissionsArg(user,
                                            new_role)
        r = self.request(
            team.members_set_admin_permissions,
            'team',
            arg,
            None,
        )
        return r

    def team_members_set_profile_v2(self,
                                    user,
                                    new_email=None,
                                    new_external_id=None,
                                    new_given_name=None,
                                    new_surname=None,
                                    new_persistent_id=None,
                                    new_is_directory_restricted=None):
        """
        Updates a team member's profile. Permission : Team member management.

        Route attributes:
            scope: members.write

        :param user: Identity of user whose profile will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param Nullable[str] new_email: New email for member.
        :param Nullable[str] new_external_id: New external ID for member.
        :param Nullable[str] new_given_name: New given name for member.
        :param Nullable[str] new_surname: New surname for member.
        :param Nullable[str] new_persistent_id: New persistent ID. This field
            only available to teams using persistent ID SAML configuration.
        :param Nullable[bool] new_is_directory_restricted: New value for whether
            the user is a directory restricted user.
        :rtype: :class:`dropbox.team.TeamMemberInfoV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetProfileError`
        """
        arg = team.MembersSetProfileArg(user,
                                        new_email,
                                        new_external_id,
                                        new_given_name,
                                        new_surname,
                                        new_persistent_id,
                                        new_is_directory_restricted)
        r = self.request(
            team.members_set_profile_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_set_profile(self,
                                 user,
                                 new_email=None,
                                 new_external_id=None,
                                 new_given_name=None,
                                 new_surname=None,
                                 new_persistent_id=None,
                                 new_is_directory_restricted=None):
        """
        Updates a team member's profile. Permission : Team member management.

        Route attributes:
            scope: members.write

        :param user: Identity of user whose profile will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param Nullable[str] new_email: New email for member.
        :param Nullable[str] new_external_id: New external ID for member.
        :param Nullable[str] new_given_name: New given name for member.
        :param Nullable[str] new_surname: New surname for member.
        :param Nullable[str] new_persistent_id: New persistent ID. This field
            only available to teams using persistent ID SAML configuration.
        :param Nullable[bool] new_is_directory_restricted: New value for whether
            the user is a directory restricted user.
        :rtype: :class:`dropbox.team.TeamMemberInfo`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetProfileError`
        """
        arg = team.MembersSetProfileArg(user,
                                        new_email,
                                        new_external_id,
                                        new_given_name,
                                        new_surname,
                                        new_persistent_id,
                                        new_is_directory_restricted)
        r = self.request(
            team.members_set_profile,
            'team',
            arg,
            None,
        )
        return r

    def team_members_set_profile_photo_v2(self,
                                          user,
                                          photo):
        """
        Updates a team member's profile photo. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of the user whose profile photo will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param photo: Image to set as the member's new profile photo.
        :type photo: :class:`dropbox.team.PhotoSourceArg`
        :rtype: :class:`dropbox.team.TeamMemberInfoV2Result`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetProfilePhotoError`
        """
        arg = team.MembersSetProfilePhotoArg(user,
                                             photo)
        r = self.request(
            team.members_set_profile_photo_v2,
            'team',
            arg,
            None,
        )
        return r

    def team_members_set_profile_photo(self,
                                       user,
                                       photo):
        """
        Updates a team member's profile photo. Permission : Team member
        management.

        Route attributes:
            scope: members.write

        :param user: Identity of the user whose profile photo will be set.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :param photo: Image to set as the member's new profile photo.
        :type photo: :class:`dropbox.team.PhotoSourceArg`
        :rtype: :class:`dropbox.team.TeamMemberInfo`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSetProfilePhotoError`
        """
        arg = team.MembersSetProfilePhotoArg(user,
                                             photo)
        r = self.request(
            team.members_set_profile_photo,
            'team',
            arg,
            None,
        )
        return r

    def team_members_suspend(self,
                             user,
                             wipe_data=True):
        """
        Suspend a member from a team. Permission : Team member management
        Exactly one of team_member_id, email, or external_id must be provided to
        identify the user account.

        Route attributes:
            scope: members.write

        :param bool wipe_data: If provided, controls if the user's data will be
            deleted on their linked devices.
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersSuspendError`
        """
        arg = team.MembersDeactivateArg(user,
                                        wipe_data)
        r = self.request(
            team.members_suspend,
            'team',
            arg,
            None,
        )
        return None

    def team_members_unsuspend(self,
                               user):
        """
        Unsuspend a member from a team. Permission : Team member management
        Exactly one of team_member_id, email, or external_id must be provided to
        identify the user account.

        Route attributes:
            scope: members.write

        :param user: Identity of user to unsuspend.
        :type user: :class:`dropbox.team.UserSelectorArg`
        :rtype: None
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.MembersUnsuspendError`
        """
        arg = team.MembersUnsuspendArg(user)
        r = self.request(
            team.members_unsuspend,
            'team',
            arg,
            None,
        )
        return None

    def team_namespaces_list(self,
                             limit=1000):
        """
        Returns a list of all team-accessible namespaces. This list includes
        team folders, shared folders containing team members, team members' home
        namespaces, and team members' app folders. Home namespaces and app
        folders are always owned by this team or members of the team, but shared
        folders may be owned by other users or other teams. Duplicates may occur
        in the list.

        Route attributes:
            scope: team_data.member

        :param int limit: Specifying a value here has no effect.
        :rtype: :class:`dropbox.team.TeamNamespacesListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamNamespacesListError`
        """
        arg = team.TeamNamespacesListArg(limit)
        r = self.request(
            team.namespaces_list,
            'team',
            arg,
            None,
        )
        return r

    def team_namespaces_list_continue(self,
                                      cursor):
        """
        Once a cursor has been retrieved from :meth:`team_namespaces_list`, use
        this to paginate through all team-accessible namespaces. Duplicates may
        occur in the list.

        Route attributes:
            scope: team_data.member

        :param str cursor: Indicates from what point to get the next set of
            team-accessible namespaces.
        :rtype: :class:`dropbox.team.TeamNamespacesListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamNamespacesListContinueError`
        """
        arg = team.TeamNamespacesListContinueArg(cursor)
        r = self.request(
            team.namespaces_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_properties_template_add(self,
                                     name,
                                     description,
                                     fields):
        """
        Permission : Team member file access.

        Route attributes:
            scope: files.team_metadata.write

        :rtype: :class:`dropbox.team.AddTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ModifyTemplateError`
        """
        warnings.warn(
            'properties/template/add is deprecated.',
            DeprecationWarning,
        )
        arg = file_properties.AddTemplateArg(name,
                                             description,
                                             fields)
        r = self.request(
            team.properties_template_add,
            'team',
            arg,
            None,
        )
        return r

    def team_properties_template_get(self,
                                     template_id):
        """
        Permission : Team member file access. The scope for the route is
        files.team_metadata.write.

        Route attributes:
            scope: files.team_metadata.write

        :param str template_id: An identifier for template added by route  See
            :meth:`team_templates_add_for_user` or
            :meth:`team_templates_add_for_team`.
        :rtype: :class:`dropbox.team.GetTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TemplateError`
        """
        warnings.warn(
            'properties/template/get is deprecated.',
            DeprecationWarning,
        )
        arg = file_properties.GetTemplateArg(template_id)
        r = self.request(
            team.properties_template_get,
            'team',
            arg,
            None,
        )
        return r

    def team_properties_template_list(self):
        """
        Permission : Team member file access. The scope for the route is
        files.team_metadata.write.

        Route attributes:
            scope: files.team_metadata.write

        :rtype: :class:`dropbox.team.ListTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TemplateError`
        """
        warnings.warn(
            'properties/template/list is deprecated.',
            DeprecationWarning,
        )
        arg = None
        r = self.request(
            team.properties_template_list,
            'team',
            arg,
            None,
        )
        return r

    def team_properties_template_update(self,
                                        template_id,
                                        name=None,
                                        description=None,
                                        add_fields=None):
        """
        Permission : Team member file access.

        Route attributes:
            scope: files.team_metadata.write

        :param str template_id: An identifier for template added by  See
            :meth:`team_templates_add_for_user` or
            :meth:`team_templates_add_for_team`.
        :param Nullable[str] name: A display name for the template. template
            names can be up to 256 bytes.
        :param Nullable[str] description: Description for the new template.
            Template descriptions can be up to 1024 bytes.
        :param Nullable[List[:class:`dropbox.team.PropertyFieldTemplate`]]
            add_fields: Property field templates to be added to the group
            template. There can be up to 32 properties in a single template.
        :rtype: :class:`dropbox.team.UpdateTemplateResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.ModifyTemplateError`
        """
        warnings.warn(
            'properties/template/update is deprecated.',
            DeprecationWarning,
        )
        arg = file_properties.UpdateTemplateArg(template_id,
                                                name,
                                                description,
                                                add_fields)
        r = self.request(
            team.properties_template_update,
            'team',
            arg,
            None,
        )
        return r

    def team_reports_get_activity(self,
                                  start_date=None,
                                  end_date=None):
        """
        Retrieves reporting data about a team's user activity. Deprecated: Will
        be removed on July 1st 2021.

        Route attributes:
            scope: team_info.read

        :param Nullable[datetime] start_date: Optional starting date
            (inclusive). If start_date is None or too long ago, this field will
            be set to 6 months ago.
        :param Nullable[datetime] end_date: Optional ending date (exclusive).
        :rtype: :class:`dropbox.team.GetActivityReport`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.DateRangeError`
        """
        warnings.warn(
            'reports/get_activity is deprecated.',
            DeprecationWarning,
        )
        arg = team.DateRange(start_date,
                             end_date)
        r = self.request(
            team.reports_get_activity,
            'team',
            arg,
            None,
        )
        return r

    def team_reports_get_devices(self,
                                 start_date=None,
                                 end_date=None):
        """
        Retrieves reporting data about a team's linked devices. Deprecated: Will
        be removed on July 1st 2021.

        Route attributes:
            scope: team_info.read

        :param Nullable[datetime] start_date: Optional starting date
            (inclusive). If start_date is None or too long ago, this field will
            be set to 6 months ago.
        :param Nullable[datetime] end_date: Optional ending date (exclusive).
        :rtype: :class:`dropbox.team.GetDevicesReport`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.DateRangeError`
        """
        warnings.warn(
            'reports/get_devices is deprecated.',
            DeprecationWarning,
        )
        arg = team.DateRange(start_date,
                             end_date)
        r = self.request(
            team.reports_get_devices,
            'team',
            arg,
            None,
        )
        return r

    def team_reports_get_membership(self,
                                    start_date=None,
                                    end_date=None):
        """
        Retrieves reporting data about a team's membership. Deprecated: Will be
        removed on July 1st 2021.

        Route attributes:
            scope: team_info.read

        :param Nullable[datetime] start_date: Optional starting date
            (inclusive). If start_date is None or too long ago, this field will
            be set to 6 months ago.
        :param Nullable[datetime] end_date: Optional ending date (exclusive).
        :rtype: :class:`dropbox.team.GetMembershipReport`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.DateRangeError`
        """
        warnings.warn(
            'reports/get_membership is deprecated.',
            DeprecationWarning,
        )
        arg = team.DateRange(start_date,
                             end_date)
        r = self.request(
            team.reports_get_membership,
            'team',
            arg,
            None,
        )
        return r

    def team_reports_get_storage(self,
                                 start_date=None,
                                 end_date=None):
        """
        Retrieves reporting data about a team's storage usage. Deprecated: Will
        be removed on July 1st 2021.

        Route attributes:
            scope: team_info.read

        :param Nullable[datetime] start_date: Optional starting date
            (inclusive). If start_date is None or too long ago, this field will
            be set to 6 months ago.
        :param Nullable[datetime] end_date: Optional ending date (exclusive).
        :rtype: :class:`dropbox.team.GetStorageReport`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.DateRangeError`
        """
        warnings.warn(
            'reports/get_storage is deprecated.',
            DeprecationWarning,
        )
        arg = team.DateRange(start_date,
                             end_date)
        r = self.request(
            team.reports_get_storage,
            'team',
            arg,
            None,
        )
        return r

    def team_sharing_allowlist_add(self,
                                   domains=None,
                                   emails=None):
        """
        Endpoint adds Approve List entries. Changes are effective immediately.
        Changes are committed in transaction. In case of single validation error
        - all entries are rejected. Valid domains (RFC-1034/5) and emails
        (RFC-5322/822) are accepted. Added entries cannot overflow limit of
        10000 entries per team. Maximum 100 entries per call is allowed.

        Route attributes:
            scope: team_info.write

        :param Nullable[List[str]] domains: List of domains represented by valid
            string representation (RFC-1034/5).
        :param Nullable[List[str]] emails: List of emails represented by valid
            string representation (RFC-5322/822).
        :rtype: :class:`dropbox.team.SharingAllowlistAddResponse`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.SharingAllowlistAddError`
        """
        arg = team.SharingAllowlistAddArgs(domains,
                                           emails)
        r = self.request(
            team.sharing_allowlist_add,
            'team',
            arg,
            None,
        )
        return r

    def team_sharing_allowlist_list(self,
                                    limit=1000):
        """
        Lists Approve List entries for given team, from newest to oldest,
        returning up to `limit` entries at a time. If there are more than
        `limit` entries associated with the current team, more can be fetched by
        passing the returned `cursor` to
        :meth:`team_sharing_allowlist_list_continue`.

        Route attributes:
            scope: team_info.read

        :param int limit: The number of entries to fetch at one time.
        :rtype: :class:`dropbox.team.SharingAllowlistListResponse`
        """
        arg = team.SharingAllowlistListArg(limit)
        r = self.request(
            team.sharing_allowlist_list,
            'team',
            arg,
            None,
        )
        return r

    def team_sharing_allowlist_list_continue(self,
                                             cursor):
        """
        Lists entries associated with given team, starting from a the cursor.
        See :meth:`team_sharing_allowlist_list`.

        Route attributes:
            scope: team_info.read

        :param str cursor: The cursor returned from a previous call to
            :meth:`team_sharing_allowlist_list` or
            :meth:`team_sharing_allowlist_list_continue`.
        :rtype: :class:`dropbox.team.SharingAllowlistListResponse`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.SharingAllowlistListContinueError`
        """
        arg = team.SharingAllowlistListContinueArg(cursor)
        r = self.request(
            team.sharing_allowlist_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_sharing_allowlist_remove(self,
                                      domains=None,
                                      emails=None):
        """
        Endpoint removes Approve List entries. Changes are effective
        immediately. Changes are committed in transaction. In case of single
        validation error - all entries are rejected. Valid domains (RFC-1034/5)
        and emails (RFC-5322/822) are accepted. Entries being removed have to be
        present on the list. Maximum 1000 entries per call is allowed.

        Route attributes:
            scope: team_info.write

        :param Nullable[List[str]] domains: List of domains represented by valid
            string representation (RFC-1034/5).
        :param Nullable[List[str]] emails: List of emails represented by valid
            string representation (RFC-5322/822).
        :rtype: :class:`dropbox.team.SharingAllowlistRemoveResponse`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.SharingAllowlistRemoveError`
        """
        arg = team.SharingAllowlistRemoveArgs(domains,
                                              emails)
        r = self.request(
            team.sharing_allowlist_remove,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_activate(self,
                                  team_folder_id):
        """
        Sets an archived team folder's status to active. Permission : Team
        member file access.

        Route attributes:
            scope: team_data.content.write

        :param str team_folder_id: The ID of the team folder.
        :rtype: :class:`dropbox.team.TeamFolderMetadata`
        """
        arg = team.TeamFolderIdArg(team_folder_id)
        r = self.request(
            team.team_folder_activate,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_archive(self,
                                 team_folder_id,
                                 force_async_off=False):
        """
        Sets an active team folder's status to archived and removes all folder
        and file members. This endpoint cannot be used for teams that have a
        shared team space. Permission : Team member file access.

        Route attributes:
            scope: team_data.content.write

        :param bool force_async_off: Whether to force the archive to happen
            synchronously.
        :rtype: :class:`dropbox.team.TeamFolderArchiveLaunch`
        """
        arg = team.TeamFolderArchiveArg(team_folder_id,
                                        force_async_off)
        r = self.request(
            team.team_folder_archive,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_archive_check(self,
                                       async_job_id):
        """
        Returns the status of an asynchronous job for archiving a team folder.
        Permission : Team member file access.

        Route attributes:
            scope: team_data.content.write

        :param str async_job_id: Id of the asynchronous job. This is the value
            of a response returned from the method that launched the job.
        :rtype: :class:`dropbox.team.TeamFolderArchiveJobStatus`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.PollError`
        """
        arg = async_.PollArg(async_job_id)
        r = self.request(
            team.team_folder_archive_check,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_create(self,
                                name,
                                sync_setting=None):
        """
        Creates a new, active, team folder with no members. This endpoint can
        only be used for teams that do not already have a shared team space.
        Permission : Team member file access.

        Route attributes:
            scope: team_data.content.write

        :param str name: Name for the new team folder.
        :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The
            sync setting to apply to this team folder. Only permitted if the
            team has team selective sync enabled.
        :rtype: :class:`dropbox.team.TeamFolderMetadata`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamFolderCreateError`
        """
        arg = team.TeamFolderCreateArg(name,
                                       sync_setting)
        r = self.request(
            team.team_folder_create,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_get_info(self,
                                  team_folder_ids):
        """
        Retrieves metadata for team folders. Permission : Team member file
        access.

        Route attributes:
            scope: team_data.content.read

        :param List[str] team_folder_ids: The list of team folder IDs.
        :rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`]
        """
        arg = team.TeamFolderIdListArg(team_folder_ids)
        r = self.request(
            team.team_folder_get_info,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_list(self,
                              limit=1000):
        """
        Lists all team folders. Permission : Team member file access.

        Route attributes:
            scope: team_data.content.read

        :param int limit: The maximum number of results to return per request.
        :rtype: :class:`dropbox.team.TeamFolderListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamFolderListError`
        """
        arg = team.TeamFolderListArg(limit)
        r = self.request(
            team.team_folder_list,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_list_continue(self,
                                       cursor):
        """
        Once a cursor has been retrieved from :meth:`team_team_folder_list`, use
        this to paginate through all team folders. Permission : Team member file
        access.

        Route attributes:
            scope: team_data.content.read

        :param str cursor: Indicates from what point to get the next set of team
            folders.
        :rtype: :class:`dropbox.team.TeamFolderListResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamFolderListContinueError`
        """
        arg = team.TeamFolderListContinueArg(cursor)
        r = self.request(
            team.team_folder_list_continue,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_permanently_delete(self,
                                            team_folder_id):
        """
        Permanently deletes an archived team folder. This endpoint cannot be
        used for teams that have a shared team space. Permission : Team member
        file access.

        Route attributes:
            scope: team_data.content.write

        :param str team_folder_id: The ID of the team folder.
        :rtype: None
        """
        arg = team.TeamFolderIdArg(team_folder_id)
        r = self.request(
            team.team_folder_permanently_delete,
            'team',
            arg,
            None,
        )
        return None

    def team_team_folder_rename(self,
                                team_folder_id,
                                name):
        """
        Changes an active team folder's name. Permission : Team member file
        access.

        Route attributes:
            scope: team_data.content.write

        :param str name: New team folder name.
        :rtype: :class:`dropbox.team.TeamFolderMetadata`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamFolderRenameError`
        """
        arg = team.TeamFolderRenameArg(team_folder_id,
                                       name)
        r = self.request(
            team.team_folder_rename,
            'team',
            arg,
            None,
        )
        return r

    def team_team_folder_update_sync_settings(self,
                                              team_folder_id,
                                              sync_setting=None,
                                              content_sync_settings=None):
        """
        Updates the sync settings on a team folder or its contents.  Use of this
        endpoint requires that the team has team selective sync enabled.

        Route attributes:
            scope: team_data.content.write

        :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync
            setting to apply to the team folder itself. Only meaningful if the
            team folder is not a shared team root.
        :param Nullable[List[:class:`dropbox.team.ContentSyncSettingArg`]]
            content_sync_settings: Sync settings to apply to contents of this
            team folder.
        :rtype: :class:`dropbox.team.TeamFolderMetadata`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TeamFolderUpdateSyncSettingsError`
        """
        arg = team.TeamFolderUpdateSyncSettingsArg(team_folder_id,
                                                   sync_setting,
                                                   content_sync_settings)
        r = self.request(
            team.team_folder_update_sync_settings,
            'team',
            arg,
            None,
        )
        return r

    def team_token_get_authenticated_admin(self):
        """
        Returns the member profile of the admin who generated the team access
        token used to make the call.

        Route attributes:
            scope: team_info.read

        :rtype: :class:`dropbox.team.TokenGetAuthenticatedAdminResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team.TokenGetAuthenticatedAdminError`
        """
        arg = None
        r = self.request(
            team.token_get_authenticated_admin,
            'team',
            arg,
            None,
        )
        return r

    # ------------------------------------------
    # Routes in team_log namespace

    def team_log_get_events(self,
                            limit=1000,
                            account_id=None,
                            time=None,
                            category=None,
                            event_type=None):
        """
        Retrieves team events. If the result's ``GetTeamEventsResult.has_more``
        field is ``True``, call :meth:`team_log_get_events_continue` with the
        returned cursor to retrieve more entries. If end_time is not specified
        in your request, you may use the returned cursor to poll
        :meth:`team_log_get_events_continue` for new events. Many attributes
        note 'may be missing due to historical data gap'. Note that the
        file_operations category and & analogous paper events are not available
        on all Dropbox Business `plans </business/plans-comparison>`_. Use
        `features/get_values
        </developers/documentation/http/teams#team-features-get_values>`_ to
        check for this feature. Permission : Team Auditing.

        Route attributes:
            scope: events.read

        :param int limit: The maximal number of results to return per call. Note
            that some calls may not return ``limit`` number of events, and may
            even return no events, even with `has_more` set to true. In this
            case, callers should fetch again using
            :meth:`team_log_get_events_continue`.
        :param Nullable[str] account_id: Filter the events by account ID. Return
            only events with this account_id as either Actor, Context, or
            Participants.
        :param Nullable[:class:`dropbox.team_log.TimeRange`] time: Filter by
            time range.
        :param Nullable[:class:`dropbox.team_log.EventCategory`] category:
            Filter the returned events to a single category. Note that category
            shouldn't be provided together with event_type.
        :param Nullable[:class:`dropbox.team_log.EventTypeArg`] event_type:
            Filter the returned events to a single event type. Note that
            event_type shouldn't be provided together with category.
        :rtype: :class:`dropbox.team_log.GetTeamEventsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team_log.GetTeamEventsError`
        """
        arg = team_log.GetTeamEventsArg(limit,
                                        account_id,
                                        time,
                                        category,
                                        event_type)
        r = self.request(
            team_log.get_events,
            'team_log',
            arg,
            None,
        )
        return r

    def team_log_get_events_continue(self,
                                     cursor):
        """
        Once a cursor has been retrieved from :meth:`team_log_get_events`, use
        this to paginate through all events. Permission : Team Auditing.

        Route attributes:
            scope: events.read

        :param str cursor: Indicates from what point to get the next set of
            events.
        :rtype: :class:`dropbox.team_log.GetTeamEventsResult`
        :raises: :class:`.exceptions.ApiError`

        If this raises, ApiError will contain:
            :class:`dropbox.team_log.GetTeamEventsContinueError`
        """
        arg = team_log.GetTeamEventsContinueArg(cursor)
        r = self.request(
            team_log.get_events_continue,
            'team_log',
            arg,
            None,
        )
        return r

    # ------------------------------------------
    # Routes in users namespace