File: types.go

package info (click to toggle)
golang-github-dropbox-dropbox-sdk-go-unofficial 6.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 2,324 kB
  • sloc: python: 481; sh: 22; makefile: 2
file content (4437 lines) | stat: -rw-r--r-- 153,473 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
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
// Copyright (c) Dropbox, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// Package sharing : This namespace contains endpoints and data types for
// creating and managing shared links and shared folders.
package sharing

import (
	"encoding/json"
	"time"

	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/seen_state"
	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
)

// AccessInheritance : Information about the inheritance policy of a shared
// folder.
type AccessInheritance struct {
	dropbox.Tagged
}

// Valid tag values for AccessInheritance
const (
	AccessInheritanceInherit   = "inherit"
	AccessInheritanceNoInherit = "no_inherit"
	AccessInheritanceOther     = "other"
)

// AccessLevel : Defines the access levels for collaborators.
type AccessLevel struct {
	dropbox.Tagged
}

// Valid tag values for AccessLevel
const (
	AccessLevelOwner           = "owner"
	AccessLevelEditor          = "editor"
	AccessLevelViewer          = "viewer"
	AccessLevelViewerNoComment = "viewer_no_comment"
	AccessLevelTraverse        = "traverse"
	AccessLevelOther           = "other"
)

// AclUpdatePolicy : Who can change a shared folder's access control list (ACL).
// In other words, who can add, remove, or change the privileges of members.
type AclUpdatePolicy struct {
	dropbox.Tagged
}

// Valid tag values for AclUpdatePolicy
const (
	AclUpdatePolicyOwner   = "owner"
	AclUpdatePolicyEditors = "editors"
	AclUpdatePolicyOther   = "other"
)

// AddFileMemberArgs : Arguments for `addFileMember`.
type AddFileMemberArgs struct {
	// File : File to which to add members.
	File string `json:"file"`
	// Members : Members to add. Note that even an email address is given, this
	// may result in a user being directly added to the membership if that email
	// is the user's main account email.
	Members []*MemberSelector `json:"members"`
	// CustomMessage : Message to send to added members in their invitation.
	CustomMessage string `json:"custom_message,omitempty"`
	// Quiet : Whether added members should be notified via email and device
	// notifications of their invitation.
	Quiet bool `json:"quiet"`
	// AccessLevel : AccessLevel union object, describing what access level we
	// want to give new members.
	AccessLevel *AccessLevel `json:"access_level"`
	// AddMessageAsComment : If the custom message should be added as a comment
	// on the file.
	AddMessageAsComment bool `json:"add_message_as_comment"`
}

// NewAddFileMemberArgs returns a new AddFileMemberArgs instance
func NewAddFileMemberArgs(File string, Members []*MemberSelector) *AddFileMemberArgs {
	s := new(AddFileMemberArgs)
	s.File = File
	s.Members = Members
	s.Quiet = false
	s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{Tag: "viewer"}}
	s.AddMessageAsComment = false
	return s
}

// AddFileMemberError : Errors for `addFileMember`.
type AddFileMemberError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for AddFileMemberError
const (
	AddFileMemberErrorUserError      = "user_error"
	AddFileMemberErrorAccessError    = "access_error"
	AddFileMemberErrorRateLimit      = "rate_limit"
	AddFileMemberErrorInvalidComment = "invalid_comment"
	AddFileMemberErrorOther          = "other"
)

// UnmarshalJSON deserializes into a AddFileMemberError instance
func (u *AddFileMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// AddFolderMemberArg : has no documentation (yet)
type AddFolderMemberArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Members : The intended list of members to add.  Added members will
	// receive invites to join the shared folder.
	Members []*AddMember `json:"members"`
	// Quiet : Whether added members should be notified via email and device
	// notifications of their invite.
	Quiet bool `json:"quiet"`
	// CustomMessage : Optional message to display to added members in their
	// invitation.
	CustomMessage string `json:"custom_message,omitempty"`
}

// NewAddFolderMemberArg returns a new AddFolderMemberArg instance
func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) *AddFolderMemberArg {
	s := new(AddFolderMemberArg)
	s.SharedFolderId = SharedFolderId
	s.Members = Members
	s.Quiet = false
	return s
}

// AddFolderMemberError : has no documentation (yet)
type AddFolderMemberError struct {
	dropbox.Tagged
	// AccessError : Unable to access shared folder.
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	// BadMember : `AddFolderMemberArg.members` contains a bad invitation
	// recipient.
	BadMember *AddMemberSelectorError `json:"bad_member,omitempty"`
	// TooManyMembers : The value is the member limit that was reached.
	TooManyMembers uint64 `json:"too_many_members,omitempty"`
	// TooManyPendingInvites : The value is the pending invite limit that was
	// reached.
	TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"`
}

// Valid tag values for AddFolderMemberError
const (
	AddFolderMemberErrorAccessError           = "access_error"
	AddFolderMemberErrorEmailUnverified       = "email_unverified"
	AddFolderMemberErrorBannedMember          = "banned_member"
	AddFolderMemberErrorBadMember             = "bad_member"
	AddFolderMemberErrorCantShareOutsideTeam  = "cant_share_outside_team"
	AddFolderMemberErrorTooManyMembers        = "too_many_members"
	AddFolderMemberErrorTooManyPendingInvites = "too_many_pending_invites"
	AddFolderMemberErrorRateLimit             = "rate_limit"
	AddFolderMemberErrorTooManyInvitees       = "too_many_invitees"
	AddFolderMemberErrorInsufficientPlan      = "insufficient_plan"
	AddFolderMemberErrorTeamFolder            = "team_folder"
	AddFolderMemberErrorNoPermission          = "no_permission"
	AddFolderMemberErrorInvalidSharedFolder   = "invalid_shared_folder"
	AddFolderMemberErrorOther                 = "other"
)

// UnmarshalJSON deserializes into a AddFolderMemberError instance
func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : Unable to access shared folder.
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
		// BadMember : `AddFolderMemberArg.members` contains a bad invitation
		// recipient.
		BadMember *AddMemberSelectorError `json:"bad_member,omitempty"`
		// TooManyMembers : The value is the member limit that was reached.
		TooManyMembers uint64 `json:"too_many_members,omitempty"`
		// TooManyPendingInvites : The value is the pending invite limit that
		// was reached.
		TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	case "bad_member":
		u.BadMember = w.BadMember

	case "too_many_members":
		u.TooManyMembers = w.TooManyMembers

	case "too_many_pending_invites":
		u.TooManyPendingInvites = w.TooManyPendingInvites

	}
	return nil
}

// AddMember : The member and type of access the member should have when added
// to a shared folder.
type AddMember struct {
	// Member : The member to add to the shared folder.
	Member *MemberSelector `json:"member"`
	// AccessLevel : The access level to grant `member` to the shared folder.
	// `AccessLevel.owner` is disallowed.
	AccessLevel *AccessLevel `json:"access_level"`
}

// NewAddMember returns a new AddMember instance
func NewAddMember(Member *MemberSelector) *AddMember {
	s := new(AddMember)
	s.Member = Member
	s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{Tag: "viewer"}}
	return s
}

// AddMemberSelectorError : has no documentation (yet)
type AddMemberSelectorError struct {
	dropbox.Tagged
	// InvalidDropboxId : The value is the ID that could not be identified.
	InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"`
	// InvalidEmail : The value is the e-email address that is malformed.
	InvalidEmail string `json:"invalid_email,omitempty"`
	// UnverifiedDropboxId : The value is the ID of the Dropbox user with an
	// unverified email address. Invite unverified users by email address
	// instead of by their Dropbox ID.
	UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"`
}

// Valid tag values for AddMemberSelectorError
const (
	AddMemberSelectorErrorAutomaticGroup      = "automatic_group"
	AddMemberSelectorErrorInvalidDropboxId    = "invalid_dropbox_id"
	AddMemberSelectorErrorInvalidEmail        = "invalid_email"
	AddMemberSelectorErrorUnverifiedDropboxId = "unverified_dropbox_id"
	AddMemberSelectorErrorGroupDeleted        = "group_deleted"
	AddMemberSelectorErrorGroupNotOnTeam      = "group_not_on_team"
	AddMemberSelectorErrorOther               = "other"
)

// UnmarshalJSON deserializes into a AddMemberSelectorError instance
func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// InvalidDropboxId : The value is the ID that could not be identified.
		InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"`
		// InvalidEmail : The value is the e-email address that is malformed.
		InvalidEmail string `json:"invalid_email,omitempty"`
		// UnverifiedDropboxId : The value is the ID of the Dropbox user with an
		// unverified email address. Invite unverified users by email address
		// instead of by their Dropbox ID.
		UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "invalid_dropbox_id":
		u.InvalidDropboxId = w.InvalidDropboxId

	case "invalid_email":
		u.InvalidEmail = w.InvalidEmail

	case "unverified_dropbox_id":
		u.UnverifiedDropboxId = w.UnverifiedDropboxId

	}
	return nil
}

// RequestedVisibility : The access permission that can be requested by the
// caller for the shared link. Note that the final resolved visibility of the
// shared link takes into account other aspects, such as team and shared folder
// settings. Check the `ResolvedVisibility` for more info on the possible
// resolved visibility values of shared links.
type RequestedVisibility struct {
	dropbox.Tagged
}

// Valid tag values for RequestedVisibility
const (
	RequestedVisibilityPublic   = "public"
	RequestedVisibilityTeamOnly = "team_only"
	RequestedVisibilityPassword = "password"
)

// ResolvedVisibility : The actual access permissions values of shared links
// after taking into account user preferences and the team and shared folder
// settings. Check the `RequestedVisibility` for more info on the possible
// visibility values that can be set by the shared link's owner.
type ResolvedVisibility struct {
	dropbox.Tagged
}

// Valid tag values for ResolvedVisibility
const (
	ResolvedVisibilityPublic           = "public"
	ResolvedVisibilityTeamOnly         = "team_only"
	ResolvedVisibilityPassword         = "password"
	ResolvedVisibilityTeamAndPassword  = "team_and_password"
	ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
	ResolvedVisibilityNoOne            = "no_one"
	ResolvedVisibilityOnlyYou          = "only_you"
	ResolvedVisibilityOther            = "other"
)

// AlphaResolvedVisibility : check documentation for ResolvedVisibility.
type AlphaResolvedVisibility struct {
	dropbox.Tagged
}

// Valid tag values for AlphaResolvedVisibility
const (
	AlphaResolvedVisibilityPublic           = "public"
	AlphaResolvedVisibilityTeamOnly         = "team_only"
	AlphaResolvedVisibilityPassword         = "password"
	AlphaResolvedVisibilityTeamAndPassword  = "team_and_password"
	AlphaResolvedVisibilitySharedFolderOnly = "shared_folder_only"
	AlphaResolvedVisibilityNoOne            = "no_one"
	AlphaResolvedVisibilityOnlyYou          = "only_you"
	AlphaResolvedVisibilityOther            = "other"
)

// AudienceExceptionContentInfo : Information about the content that has a link
// audience different than that of this folder.
type AudienceExceptionContentInfo struct {
	// Name : The name of the content, which is either a file or a folder.
	Name string `json:"name"`
}

// NewAudienceExceptionContentInfo returns a new AudienceExceptionContentInfo instance
func NewAudienceExceptionContentInfo(Name string) *AudienceExceptionContentInfo {
	s := new(AudienceExceptionContentInfo)
	s.Name = Name
	return s
}

// AudienceExceptions : The total count and truncated list of information of
// content inside this folder that has a different audience than the link on
// this folder. This is only returned for folders.
type AudienceExceptions struct {
	// Count : has no documentation (yet)
	Count uint32 `json:"count"`
	// Exceptions : A truncated list of some of the content that is an
	// exception. The length of this list could be smaller than the count since
	// it is only a sample but will not be empty as long as count is not 0.
	Exceptions []*AudienceExceptionContentInfo `json:"exceptions"`
}

// NewAudienceExceptions returns a new AudienceExceptions instance
func NewAudienceExceptions(Count uint32, Exceptions []*AudienceExceptionContentInfo) *AudienceExceptions {
	s := new(AudienceExceptions)
	s.Count = Count
	s.Exceptions = Exceptions
	return s
}

// AudienceRestrictingSharedFolder : Information about the shared folder that
// prevents the link audience for this link from being more restrictive.
type AudienceRestrictingSharedFolder struct {
	// SharedFolderId : The ID of the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Name : The name of the shared folder.
	Name string `json:"name"`
	// Audience : The link audience of the shared folder.
	Audience *LinkAudience `json:"audience"`
}

// NewAudienceRestrictingSharedFolder returns a new AudienceRestrictingSharedFolder instance
func NewAudienceRestrictingSharedFolder(SharedFolderId string, Name string, Audience *LinkAudience) *AudienceRestrictingSharedFolder {
	s := new(AudienceRestrictingSharedFolder)
	s.SharedFolderId = SharedFolderId
	s.Name = Name
	s.Audience = Audience
	return s
}

// LinkMetadata : Metadata for a shared link. This can be either a
// `PathLinkMetadata` or `CollectionLinkMetadata`.
type LinkMetadata struct {
	// Url : URL of the shared link.
	Url string `json:"url"`
	// Visibility : Who can access the link.
	Visibility *Visibility `json:"visibility"`
	// Expires : Expiration time, if set. By default the link won't expire.
	Expires *time.Time `json:"expires,omitempty"`
}

// NewLinkMetadata returns a new LinkMetadata instance
func NewLinkMetadata(Url string, Visibility *Visibility) *LinkMetadata {
	s := new(LinkMetadata)
	s.Url = Url
	s.Visibility = Visibility
	return s
}

// IsLinkMetadata is the interface type for LinkMetadata and its subtypes
type IsLinkMetadata interface {
	IsLinkMetadata()
}

// IsLinkMetadata implements the IsLinkMetadata interface
func (u *LinkMetadata) IsLinkMetadata() {}

type linkMetadataUnion struct {
	dropbox.Tagged
	// Path : has no documentation (yet)
	Path *PathLinkMetadata `json:"path,omitempty"`
	// Collection : has no documentation (yet)
	Collection *CollectionLinkMetadata `json:"collection,omitempty"`
}

// Valid tag values for LinkMetadata
const (
	LinkMetadataPath       = "path"
	LinkMetadataCollection = "collection"
)

// UnmarshalJSON deserializes into a linkMetadataUnion instance
func (u *linkMetadataUnion) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "path":
		if err = json.Unmarshal(body, &u.Path); err != nil {
			return err
		}

	case "collection":
		if err = json.Unmarshal(body, &u.Collection); err != nil {
			return err
		}

	}
	return nil
}

// IsLinkMetadataFromJSON converts JSON to a concrete IsLinkMetadata instance
func IsLinkMetadataFromJSON(data []byte) (IsLinkMetadata, error) {
	var t linkMetadataUnion
	if err := json.Unmarshal(data, &t); err != nil {
		return nil, err
	}
	switch t.Tag {
	case "path":
		return t.Path, nil

	case "collection":
		return t.Collection, nil

	}
	return nil, nil
}

// CollectionLinkMetadata : Metadata for a collection-based shared link.
type CollectionLinkMetadata struct {
	LinkMetadata
}

// NewCollectionLinkMetadata returns a new CollectionLinkMetadata instance
func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *CollectionLinkMetadata {
	s := new(CollectionLinkMetadata)
	s.Url = Url
	s.Visibility = Visibility
	return s
}

// CreateSharedLinkArg : has no documentation (yet)
type CreateSharedLinkArg struct {
	// Path : The path to share.
	Path string `json:"path"`
	// ShortUrl : has no documentation (yet)
	ShortUrl bool `json:"short_url"`
	// PendingUpload : If it's okay to share a path that does not yet exist, set
	// this to either `PendingUploadMode.file` or `PendingUploadMode.folder` to
	// indicate whether to assume it's a file or folder.
	PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"`
}

// NewCreateSharedLinkArg returns a new CreateSharedLinkArg instance
func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg {
	s := new(CreateSharedLinkArg)
	s.Path = Path
	s.ShortUrl = false
	return s
}

// CreateSharedLinkError : has no documentation (yet)
type CreateSharedLinkError struct {
	dropbox.Tagged
	// Path : has no documentation (yet)
	Path *files.LookupError `json:"path,omitempty"`
}

// Valid tag values for CreateSharedLinkError
const (
	CreateSharedLinkErrorPath  = "path"
	CreateSharedLinkErrorOther = "other"
)

// UnmarshalJSON deserializes into a CreateSharedLinkError instance
func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Path : has no documentation (yet)
		Path *files.LookupError `json:"path,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "path":
		u.Path = w.Path

	}
	return nil
}

// CreateSharedLinkWithSettingsArg : has no documentation (yet)
type CreateSharedLinkWithSettingsArg struct {
	// Path : The path to be shared by the shared link.
	Path string `json:"path"`
	// Settings : The requested settings for the newly created shared link.
	Settings *SharedLinkSettings `json:"settings,omitempty"`
}

// NewCreateSharedLinkWithSettingsArg returns a new CreateSharedLinkWithSettingsArg instance
func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg {
	s := new(CreateSharedLinkWithSettingsArg)
	s.Path = Path
	return s
}

// CreateSharedLinkWithSettingsError : has no documentation (yet)
type CreateSharedLinkWithSettingsError struct {
	dropbox.Tagged
	// Path : has no documentation (yet)
	Path *files.LookupError `json:"path,omitempty"`
	// SharedLinkAlreadyExists : The shared link already exists. You can call
	// `listSharedLinks` to get the  existing link, or use the provided metadata
	// if it is returned.
	SharedLinkAlreadyExists *SharedLinkAlreadyExistsMetadata `json:"shared_link_already_exists,omitempty"`
	// SettingsError : There is an error with the given settings.
	SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
}

// Valid tag values for CreateSharedLinkWithSettingsError
const (
	CreateSharedLinkWithSettingsErrorPath                    = "path"
	CreateSharedLinkWithSettingsErrorEmailNotVerified        = "email_not_verified"
	CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists = "shared_link_already_exists"
	CreateSharedLinkWithSettingsErrorSettingsError           = "settings_error"
	CreateSharedLinkWithSettingsErrorAccessDenied            = "access_denied"
)

// UnmarshalJSON deserializes into a CreateSharedLinkWithSettingsError instance
func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Path : has no documentation (yet)
		Path *files.LookupError `json:"path,omitempty"`
		// SharedLinkAlreadyExists : The shared link already exists. You can
		// call `listSharedLinks` to get the  existing link, or use the provided
		// metadata if it is returned.
		SharedLinkAlreadyExists *SharedLinkAlreadyExistsMetadata `json:"shared_link_already_exists,omitempty"`
		// SettingsError : There is an error with the given settings.
		SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "path":
		u.Path = w.Path

	case "shared_link_already_exists":
		u.SharedLinkAlreadyExists = w.SharedLinkAlreadyExists

	case "settings_error":
		u.SettingsError = w.SettingsError

	}
	return nil
}

// SharedContentLinkMetadataBase : has no documentation (yet)
type SharedContentLinkMetadataBase struct {
	// AccessLevel : The access level on the link for this file.
	AccessLevel *AccessLevel `json:"access_level,omitempty"`
	// AudienceOptions : The audience options that are available for the
	// content. Some audience options may be unavailable. For example, team_only
	// may be unavailable if the content is not owned by a user on a team. The
	// 'default' audience option is always available if the user can modify link
	// settings.
	AudienceOptions []*LinkAudience `json:"audience_options"`
	// AudienceRestrictingSharedFolder : The shared folder that prevents the
	// link audience for this link from being more restrictive.
	AudienceRestrictingSharedFolder *AudienceRestrictingSharedFolder `json:"audience_restricting_shared_folder,omitempty"`
	// CurrentAudience : The current audience of the link.
	CurrentAudience *LinkAudience `json:"current_audience"`
	// Expiry : Whether the link has an expiry set on it. A link with an expiry
	// will have its  audience changed to members when the expiry is reached.
	Expiry *time.Time `json:"expiry,omitempty"`
	// LinkPermissions : A list of permissions for actions you can perform on
	// the link.
	LinkPermissions []*LinkPermission `json:"link_permissions"`
	// PasswordProtected : Whether the link is protected by a password.
	PasswordProtected bool `json:"password_protected"`
}

// NewSharedContentLinkMetadataBase returns a new SharedContentLinkMetadataBase instance
func NewSharedContentLinkMetadataBase(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *SharedContentLinkMetadataBase {
	s := new(SharedContentLinkMetadataBase)
	s.AudienceOptions = AudienceOptions
	s.CurrentAudience = CurrentAudience
	s.LinkPermissions = LinkPermissions
	s.PasswordProtected = PasswordProtected
	return s
}

// ExpectedSharedContentLinkMetadata : The expected metadata of a shared link
// for a file or folder when a link is first created for the content. Absent if
// the link already exists.
type ExpectedSharedContentLinkMetadata struct {
	SharedContentLinkMetadataBase
}

// NewExpectedSharedContentLinkMetadata returns a new ExpectedSharedContentLinkMetadata instance
func NewExpectedSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *ExpectedSharedContentLinkMetadata {
	s := new(ExpectedSharedContentLinkMetadata)
	s.AudienceOptions = AudienceOptions
	s.CurrentAudience = CurrentAudience
	s.LinkPermissions = LinkPermissions
	s.PasswordProtected = PasswordProtected
	return s
}

// FileAction : Sharing actions that may be taken on files.
type FileAction struct {
	dropbox.Tagged
}

// Valid tag values for FileAction
const (
	FileActionDisableViewerInfo     = "disable_viewer_info"
	FileActionEditContents          = "edit_contents"
	FileActionEnableViewerInfo      = "enable_viewer_info"
	FileActionInviteViewer          = "invite_viewer"
	FileActionInviteViewerNoComment = "invite_viewer_no_comment"
	FileActionInviteEditor          = "invite_editor"
	FileActionUnshare               = "unshare"
	FileActionRelinquishMembership  = "relinquish_membership"
	FileActionShareLink             = "share_link"
	FileActionCreateLink            = "create_link"
	FileActionCreateViewLink        = "create_view_link"
	FileActionCreateEditLink        = "create_edit_link"
	FileActionOther                 = "other"
)

// FileErrorResult : has no documentation (yet)
type FileErrorResult struct {
	dropbox.Tagged
	// FileNotFoundError : File specified by id was not found.
	FileNotFoundError string `json:"file_not_found_error,omitempty"`
	// InvalidFileActionError : User does not have permission to take the
	// specified action on the file.
	InvalidFileActionError string `json:"invalid_file_action_error,omitempty"`
	// PermissionDeniedError : User does not have permission to access file
	// specified by file.Id.
	PermissionDeniedError string `json:"permission_denied_error,omitempty"`
}

// Valid tag values for FileErrorResult
const (
	FileErrorResultFileNotFoundError      = "file_not_found_error"
	FileErrorResultInvalidFileActionError = "invalid_file_action_error"
	FileErrorResultPermissionDeniedError  = "permission_denied_error"
	FileErrorResultOther                  = "other"
)

// UnmarshalJSON deserializes into a FileErrorResult instance
func (u *FileErrorResult) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// FileNotFoundError : File specified by id was not found.
		FileNotFoundError string `json:"file_not_found_error,omitempty"`
		// InvalidFileActionError : User does not have permission to take the
		// specified action on the file.
		InvalidFileActionError string `json:"invalid_file_action_error,omitempty"`
		// PermissionDeniedError : User does not have permission to access file
		// specified by file.Id.
		PermissionDeniedError string `json:"permission_denied_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "file_not_found_error":
		u.FileNotFoundError = w.FileNotFoundError

	case "invalid_file_action_error":
		u.InvalidFileActionError = w.InvalidFileActionError

	case "permission_denied_error":
		u.PermissionDeniedError = w.PermissionDeniedError

	}
	return nil
}

// SharedLinkMetadata : The metadata of a shared link.
type SharedLinkMetadata struct {
	// Url : URL of the shared link.
	Url string `json:"url"`
	// Id : A unique identifier for the linked file.
	Id string `json:"id,omitempty"`
	// Name : The linked file name (including extension). This never contains a
	// slash.
	Name string `json:"name"`
	// Expires : Expiration time, if set. By default the link won't expire.
	Expires *time.Time `json:"expires,omitempty"`
	// PathLower : The lowercased full path in the user's Dropbox. This always
	// starts with a slash. This field will only be present only if the linked
	// file is in the authenticated user's  dropbox.
	PathLower string `json:"path_lower,omitempty"`
	// LinkPermissions : The link's access permissions.
	LinkPermissions *LinkPermissions `json:"link_permissions"`
	// TeamMemberInfo : The team membership information of the link's owner.
	// This field will only be present  if the link's owner is a team member.
	TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"`
	// ContentOwnerTeamInfo : The team information of the content's owner. This
	// field will only be present if the content's owner is a team member and
	// the content's owner team is different from the link's owner team.
	ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"`
}

// NewSharedLinkMetadata returns a new SharedLinkMetadata instance
func NewSharedLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *SharedLinkMetadata {
	s := new(SharedLinkMetadata)
	s.Url = Url
	s.Name = Name
	s.LinkPermissions = LinkPermissions
	return s
}

// IsSharedLinkMetadata is the interface type for SharedLinkMetadata and its subtypes
type IsSharedLinkMetadata interface {
	IsSharedLinkMetadata()
}

// IsSharedLinkMetadata implements the IsSharedLinkMetadata interface
func (u *SharedLinkMetadata) IsSharedLinkMetadata() {}

type sharedLinkMetadataUnion struct {
	dropbox.Tagged
	// File : has no documentation (yet)
	File *FileLinkMetadata `json:"file,omitempty"`
	// Folder : has no documentation (yet)
	Folder *FolderLinkMetadata `json:"folder,omitempty"`
}

// Valid tag values for SharedLinkMetadata
const (
	SharedLinkMetadataFile   = "file"
	SharedLinkMetadataFolder = "folder"
)

// UnmarshalJSON deserializes into a sharedLinkMetadataUnion instance
func (u *sharedLinkMetadataUnion) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "file":
		if err = json.Unmarshal(body, &u.File); err != nil {
			return err
		}

	case "folder":
		if err = json.Unmarshal(body, &u.Folder); err != nil {
			return err
		}

	}
	return nil
}

// IsSharedLinkMetadataFromJSON converts JSON to a concrete IsSharedLinkMetadata instance
func IsSharedLinkMetadataFromJSON(data []byte) (IsSharedLinkMetadata, error) {
	var t sharedLinkMetadataUnion
	if err := json.Unmarshal(data, &t); err != nil {
		return nil, err
	}
	switch t.Tag {
	case "file":
		return t.File, nil

	case "folder":
		return t.Folder, nil

	}
	return nil, nil
}

// FileLinkMetadata : The metadata of a file shared link.
type FileLinkMetadata struct {
	SharedLinkMetadata
	// ClientModified : The modification time set by the desktop client when the
	// file was added to Dropbox. Since this time is not verified (the Dropbox
	// server stores whatever the desktop client sends up), this should only be
	// used for display purposes (such as sorting) and not, for example, to
	// determine if a file has changed or not.
	ClientModified time.Time `json:"client_modified"`
	// ServerModified : The last time the file was modified on Dropbox.
	ServerModified time.Time `json:"server_modified"`
	// Rev : A unique identifier for the current revision of a file. This field
	// is the same rev as elsewhere in the API and can be used to detect changes
	// and avoid conflicts.
	Rev string `json:"rev"`
	// Size : The file size in bytes.
	Size uint64 `json:"size"`
}

// NewFileLinkMetadata returns a new FileLinkMetadata instance
func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileLinkMetadata {
	s := new(FileLinkMetadata)
	s.Url = Url
	s.Name = Name
	s.LinkPermissions = LinkPermissions
	s.ClientModified = ClientModified
	s.ServerModified = ServerModified
	s.Rev = Rev
	s.Size = Size
	return s
}

// FileMemberActionError : has no documentation (yet)
type FileMemberActionError struct {
	dropbox.Tagged
	// AccessError : Specified file was invalid or user does not have access.
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	// NoExplicitAccess : The action cannot be completed because the target
	// member does not have explicit access to the file. The return value is the
	// access that the member has to the file from a parent folder.
	NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
}

// Valid tag values for FileMemberActionError
const (
	FileMemberActionErrorInvalidMember    = "invalid_member"
	FileMemberActionErrorNoPermission     = "no_permission"
	FileMemberActionErrorAccessError      = "access_error"
	FileMemberActionErrorNoExplicitAccess = "no_explicit_access"
	FileMemberActionErrorOther            = "other"
)

// UnmarshalJSON deserializes into a FileMemberActionError instance
func (u *FileMemberActionError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : Specified file was invalid or user does not have
		// access.
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	case "no_explicit_access":
		if err = json.Unmarshal(body, &u.NoExplicitAccess); err != nil {
			return err
		}

	}
	return nil
}

// FileMemberActionIndividualResult : has no documentation (yet)
type FileMemberActionIndividualResult struct {
	dropbox.Tagged
	// Success : Part of the response for both add_file_member and
	// remove_file_member_v1 (deprecated). For add_file_member, indicates giving
	// access was successful and at what AccessLevel. For remove_file_member_v1,
	// indicates member was successfully removed from the file. If AccessLevel
	// is given, the member still has access via a parent shared folder.
	Success *AccessLevel `json:"success,omitempty"`
	// MemberError : User was not able to perform this action.
	MemberError *FileMemberActionError `json:"member_error,omitempty"`
}

// Valid tag values for FileMemberActionIndividualResult
const (
	FileMemberActionIndividualResultSuccess     = "success"
	FileMemberActionIndividualResultMemberError = "member_error"
)

// UnmarshalJSON deserializes into a FileMemberActionIndividualResult instance
func (u *FileMemberActionIndividualResult) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Success : Part of the response for both add_file_member and
		// remove_file_member_v1 (deprecated). For add_file_member, indicates
		// giving access was successful and at what AccessLevel. For
		// remove_file_member_v1, indicates member was successfully removed from
		// the file. If AccessLevel is given, the member still has access via a
		// parent shared folder.
		Success *AccessLevel `json:"success,omitempty"`
		// MemberError : User was not able to perform this action.
		MemberError *FileMemberActionError `json:"member_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "success":
		u.Success = w.Success

	case "member_error":
		u.MemberError = w.MemberError

	}
	return nil
}

// FileMemberActionResult : Per-member result for `addFileMember`.
type FileMemberActionResult struct {
	// Member : One of specified input members.
	Member *MemberSelector `json:"member"`
	// Result : The outcome of the action on this member.
	Result *FileMemberActionIndividualResult `json:"result"`
	// SckeySha1 : The SHA-1 encrypted shared content key.
	SckeySha1 string `json:"sckey_sha1,omitempty"`
	// InvitationSignature : The sharing sender-recipient invitation signatures
	// for the input member_id. A member_id can be a group and thus have
	// multiple users and multiple invitation signatures.
	InvitationSignature []string `json:"invitation_signature,omitempty"`
}

// NewFileMemberActionResult returns a new FileMemberActionResult instance
func NewFileMemberActionResult(Member *MemberSelector, Result *FileMemberActionIndividualResult) *FileMemberActionResult {
	s := new(FileMemberActionResult)
	s.Member = Member
	s.Result = Result
	return s
}

// FileMemberRemoveActionResult : has no documentation (yet)
type FileMemberRemoveActionResult struct {
	dropbox.Tagged
	// Success : Member was successfully removed from this file.
	Success *MemberAccessLevelResult `json:"success,omitempty"`
	// MemberError : User was not able to remove this member.
	MemberError *FileMemberActionError `json:"member_error,omitempty"`
}

// Valid tag values for FileMemberRemoveActionResult
const (
	FileMemberRemoveActionResultSuccess     = "success"
	FileMemberRemoveActionResultMemberError = "member_error"
	FileMemberRemoveActionResultOther       = "other"
)

// UnmarshalJSON deserializes into a FileMemberRemoveActionResult instance
func (u *FileMemberRemoveActionResult) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// MemberError : User was not able to remove this member.
		MemberError *FileMemberActionError `json:"member_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "success":
		if err = json.Unmarshal(body, &u.Success); err != nil {
			return err
		}

	case "member_error":
		u.MemberError = w.MemberError

	}
	return nil
}

// FilePermission : Whether the user is allowed to take the sharing action on
// the file.
type FilePermission struct {
	// Action : The action that the user may wish to take on the file.
	Action *FileAction `json:"action"`
	// Allow : True if the user is allowed to take the action.
	Allow bool `json:"allow"`
	// Reason : The reason why the user is denied the permission. Not present if
	// the action is allowed.
	Reason *PermissionDeniedReason `json:"reason,omitempty"`
}

// NewFilePermission returns a new FilePermission instance
func NewFilePermission(Action *FileAction, Allow bool) *FilePermission {
	s := new(FilePermission)
	s.Action = Action
	s.Allow = Allow
	return s
}

// FolderAction : Actions that may be taken on shared folders.
type FolderAction struct {
	dropbox.Tagged
}

// Valid tag values for FolderAction
const (
	FolderActionChangeOptions         = "change_options"
	FolderActionDisableViewerInfo     = "disable_viewer_info"
	FolderActionEditContents          = "edit_contents"
	FolderActionEnableViewerInfo      = "enable_viewer_info"
	FolderActionInviteEditor          = "invite_editor"
	FolderActionInviteViewer          = "invite_viewer"
	FolderActionInviteViewerNoComment = "invite_viewer_no_comment"
	FolderActionRelinquishMembership  = "relinquish_membership"
	FolderActionUnmount               = "unmount"
	FolderActionUnshare               = "unshare"
	FolderActionLeaveACopy            = "leave_a_copy"
	FolderActionShareLink             = "share_link"
	FolderActionCreateLink            = "create_link"
	FolderActionSetAccessInheritance  = "set_access_inheritance"
	FolderActionOther                 = "other"
)

// FolderLinkMetadata : The metadata of a folder shared link.
type FolderLinkMetadata struct {
	SharedLinkMetadata
}

// NewFolderLinkMetadata returns a new FolderLinkMetadata instance
func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *FolderLinkMetadata {
	s := new(FolderLinkMetadata)
	s.Url = Url
	s.Name = Name
	s.LinkPermissions = LinkPermissions
	return s
}

// FolderPermission : Whether the user is allowed to take the action on the
// shared folder.
type FolderPermission struct {
	// Action : The action that the user may wish to take on the folder.
	Action *FolderAction `json:"action"`
	// Allow : True if the user is allowed to take the action.
	Allow bool `json:"allow"`
	// Reason : The reason why the user is denied the permission. Not present if
	// the action is allowed, or if no reason is available.
	Reason *PermissionDeniedReason `json:"reason,omitempty"`
}

// NewFolderPermission returns a new FolderPermission instance
func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermission {
	s := new(FolderPermission)
	s.Action = Action
	s.Allow = Allow
	return s
}

// FolderPolicy : A set of policies governing membership and privileges for a
// shared folder.
type FolderPolicy struct {
	// MemberPolicy : Who can be a member of this shared folder, as set on the
	// folder itself. The effective policy may differ from this value if the
	// team-wide policy is more restrictive. Present only if the folder is owned
	// by a team.
	MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
	// ResolvedMemberPolicy : Who can be a member of this shared folder, taking
	// into account both the folder and the team-wide policy. This value may
	// differ from that of member_policy if the team-wide policy is more
	// restrictive than the folder policy. Present only if the folder is owned
	// by a team.
	ResolvedMemberPolicy *MemberPolicy `json:"resolved_member_policy,omitempty"`
	// AclUpdatePolicy : Who can add and remove members from this shared folder.
	AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"`
	// SharedLinkPolicy : Who links can be shared with.
	SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"`
	// ViewerInfoPolicy : Who can enable/disable viewer info for this shared
	// folder.
	ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
}

// NewFolderPolicy returns a new FolderPolicy instance
func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy *SharedLinkPolicy) *FolderPolicy {
	s := new(FolderPolicy)
	s.AclUpdatePolicy = AclUpdatePolicy
	s.SharedLinkPolicy = SharedLinkPolicy
	return s
}

// GetFileMetadataArg : Arguments of `getFileMetadata`.
type GetFileMetadataArg struct {
	// File : The file to query.
	File string `json:"file"`
	// Actions : A list of `FileAction`s corresponding to `FilePermission`s that
	// should appear in the  response's `SharedFileMetadata.permissions` field
	// describing the actions the  authenticated user can perform on the file.
	Actions []*FileAction `json:"actions,omitempty"`
}

// NewGetFileMetadataArg returns a new GetFileMetadataArg instance
func NewGetFileMetadataArg(File string) *GetFileMetadataArg {
	s := new(GetFileMetadataArg)
	s.File = File
	return s
}

// GetFileMetadataBatchArg : Arguments of `getFileMetadataBatch`.
type GetFileMetadataBatchArg struct {
	// Files : The files to query.
	Files []string `json:"files"`
	// Actions : A list of `FileAction`s corresponding to `FilePermission`s that
	// should appear in the  response's `SharedFileMetadata.permissions` field
	// describing the actions the  authenticated user can perform on the file.
	Actions []*FileAction `json:"actions,omitempty"`
}

// NewGetFileMetadataBatchArg returns a new GetFileMetadataBatchArg instance
func NewGetFileMetadataBatchArg(Files []string) *GetFileMetadataBatchArg {
	s := new(GetFileMetadataBatchArg)
	s.Files = Files
	return s
}

// GetFileMetadataBatchResult : Per file results of `getFileMetadataBatch`.
type GetFileMetadataBatchResult struct {
	// File : This is the input file identifier corresponding to one of
	// `GetFileMetadataBatchArg.files`.
	File string `json:"file"`
	// Result : The result for this particular file.
	Result *GetFileMetadataIndividualResult `json:"result"`
}

// NewGetFileMetadataBatchResult returns a new GetFileMetadataBatchResult instance
func NewGetFileMetadataBatchResult(File string, Result *GetFileMetadataIndividualResult) *GetFileMetadataBatchResult {
	s := new(GetFileMetadataBatchResult)
	s.File = File
	s.Result = Result
	return s
}

// GetFileMetadataError : Error result for `getFileMetadata`.
type GetFileMetadataError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for GetFileMetadataError
const (
	GetFileMetadataErrorUserError   = "user_error"
	GetFileMetadataErrorAccessError = "access_error"
	GetFileMetadataErrorOther       = "other"
)

// UnmarshalJSON deserializes into a GetFileMetadataError instance
func (u *GetFileMetadataError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// GetFileMetadataIndividualResult : has no documentation (yet)
type GetFileMetadataIndividualResult struct {
	dropbox.Tagged
	// Metadata : The result for this file if it was successful.
	Metadata *SharedFileMetadata `json:"metadata,omitempty"`
	// AccessError : The result for this file if it was an error.
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for GetFileMetadataIndividualResult
const (
	GetFileMetadataIndividualResultMetadata    = "metadata"
	GetFileMetadataIndividualResultAccessError = "access_error"
	GetFileMetadataIndividualResultOther       = "other"
)

// UnmarshalJSON deserializes into a GetFileMetadataIndividualResult instance
func (u *GetFileMetadataIndividualResult) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : The result for this file if it was an error.
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "metadata":
		if err = json.Unmarshal(body, &u.Metadata); err != nil {
			return err
		}

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// GetMetadataArgs : has no documentation (yet)
type GetMetadataArgs struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
	// that should appear in the  response's `SharedFolderMetadata.permissions`
	// field describing the actions the  authenticated user can perform on the
	// folder.
	Actions []*FolderAction `json:"actions,omitempty"`
}

// NewGetMetadataArgs returns a new GetMetadataArgs instance
func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs {
	s := new(GetMetadataArgs)
	s.SharedFolderId = SharedFolderId
	return s
}

// SharedLinkError : has no documentation (yet)
type SharedLinkError struct {
	dropbox.Tagged
}

// Valid tag values for SharedLinkError
const (
	SharedLinkErrorSharedLinkNotFound     = "shared_link_not_found"
	SharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
	SharedLinkErrorUnsupportedLinkType    = "unsupported_link_type"
	SharedLinkErrorOther                  = "other"
)

// GetSharedLinkFileError : has no documentation (yet)
type GetSharedLinkFileError struct {
	dropbox.Tagged
}

// Valid tag values for GetSharedLinkFileError
const (
	GetSharedLinkFileErrorSharedLinkNotFound     = "shared_link_not_found"
	GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied"
	GetSharedLinkFileErrorUnsupportedLinkType    = "unsupported_link_type"
	GetSharedLinkFileErrorOther                  = "other"
	GetSharedLinkFileErrorSharedLinkIsDirectory  = "shared_link_is_directory"
)

// GetSharedLinkMetadataArg : has no documentation (yet)
type GetSharedLinkMetadataArg struct {
	// Url : URL of the shared link.
	Url string `json:"url"`
	// Path : If the shared link is to a folder, this parameter can be used to
	// retrieve the metadata for a specific file or sub-folder in this folder. A
	// relative path should be used.
	Path string `json:"path,omitempty"`
	// LinkPassword : If the shared link has a password, this parameter can be
	// used.
	LinkPassword string `json:"link_password,omitempty"`
}

// NewGetSharedLinkMetadataArg returns a new GetSharedLinkMetadataArg instance
func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg {
	s := new(GetSharedLinkMetadataArg)
	s.Url = Url
	return s
}

// GetSharedLinksArg : has no documentation (yet)
type GetSharedLinksArg struct {
	// Path : See `getSharedLinks` description.
	Path string `json:"path,omitempty"`
}

// NewGetSharedLinksArg returns a new GetSharedLinksArg instance
func NewGetSharedLinksArg() *GetSharedLinksArg {
	s := new(GetSharedLinksArg)
	return s
}

// GetSharedLinksError : has no documentation (yet)
type GetSharedLinksError struct {
	dropbox.Tagged
	// Path : has no documentation (yet)
	Path string `json:"path,omitempty"`
}

// Valid tag values for GetSharedLinksError
const (
	GetSharedLinksErrorPath  = "path"
	GetSharedLinksErrorOther = "other"
)

// UnmarshalJSON deserializes into a GetSharedLinksError instance
func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Path : has no documentation (yet)
		Path string `json:"path,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "path":
		u.Path = w.Path

	}
	return nil
}

// GetSharedLinksResult : has no documentation (yet)
type GetSharedLinksResult struct {
	// Links : Shared links applicable to the path argument.
	Links []IsLinkMetadata `json:"links"`
}

// NewGetSharedLinksResult returns a new GetSharedLinksResult instance
func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResult {
	s := new(GetSharedLinksResult)
	s.Links = Links
	return s
}

// UnmarshalJSON deserializes into a GetSharedLinksResult instance
func (u *GetSharedLinksResult) UnmarshalJSON(b []byte) error {
	type wrap struct {
		// Links : Shared links applicable to the path argument.
		Links []json.RawMessage `json:"links"`
	}
	var w wrap
	if err := json.Unmarshal(b, &w); err != nil {
		return err
	}
	u.Links = make([]IsLinkMetadata, len(w.Links))
	for i, e := range w.Links {
		v, err := IsLinkMetadataFromJSON(e)
		if err != nil {
			return err
		}
		u.Links[i] = v
	}
	return nil
}

// GroupInfo : The information about a group. Groups is a way to manage a list
// of users  who need same access permission to the shared folder.
type GroupInfo struct {
	team_common.GroupSummary
	// GroupType : The type of group.
	GroupType *team_common.GroupType `json:"group_type"`
	// IsMember : If the current user is a member of the group.
	IsMember bool `json:"is_member"`
	// IsOwner : If the current user is an owner of the group.
	IsOwner bool `json:"is_owner"`
	// SameTeam : If the group is owned by the current user's team.
	SameTeam bool `json:"same_team"`
}

// NewGroupInfo returns a new GroupInfo instance
func NewGroupInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, GroupType *team_common.GroupType, IsMember bool, IsOwner bool, SameTeam bool) *GroupInfo {
	s := new(GroupInfo)
	s.GroupName = GroupName
	s.GroupId = GroupId
	s.GroupManagementType = GroupManagementType
	s.GroupType = GroupType
	s.IsMember = IsMember
	s.IsOwner = IsOwner
	s.SameTeam = SameTeam
	return s
}

// MembershipInfo : The information about a member of the shared content.
type MembershipInfo struct {
	// AccessType : The access type for this member. It contains inherited
	// access type from parent folder, and acquired access type from this
	// folder.
	AccessType *AccessLevel `json:"access_type"`
	// Permissions : The permissions that requesting user has on this member.
	// The set of permissions corresponds to the MemberActions in the request.
	Permissions []*MemberPermission `json:"permissions,omitempty"`
	// Initials : Never set.
	Initials string `json:"initials,omitempty"`
	// IsInherited : True if the member has access from a parent folder.
	IsInherited bool `json:"is_inherited"`
}

// NewMembershipInfo returns a new MembershipInfo instance
func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo {
	s := new(MembershipInfo)
	s.AccessType = AccessType
	s.IsInherited = false
	return s
}

// GroupMembershipInfo : The information about a group member of the shared
// content.
type GroupMembershipInfo struct {
	MembershipInfo
	// Group : The information about the membership group.
	Group *GroupInfo `json:"group"`
}

// NewGroupMembershipInfo returns a new GroupMembershipInfo instance
func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *GroupMembershipInfo {
	s := new(GroupMembershipInfo)
	s.AccessType = AccessType
	s.Group = Group
	s.IsInherited = false
	return s
}

// InsufficientPlan : has no documentation (yet)
type InsufficientPlan struct {
	// Message : A message to tell the user to upgrade in order to support
	// expected action.
	Message string `json:"message"`
	// UpsellUrl : A URL to send the user to in order to obtain the account type
	// they need, e.g. upgrading. Absent if there is no action the user can take
	// to upgrade.
	UpsellUrl string `json:"upsell_url,omitempty"`
}

// NewInsufficientPlan returns a new InsufficientPlan instance
func NewInsufficientPlan(Message string) *InsufficientPlan {
	s := new(InsufficientPlan)
	s.Message = Message
	return s
}

// InsufficientQuotaAmounts : has no documentation (yet)
type InsufficientQuotaAmounts struct {
	// SpaceNeeded : The amount of space needed to add the item (the size of the
	// item).
	SpaceNeeded uint64 `json:"space_needed"`
	// SpaceShortage : The amount of extra space needed to add the item.
	SpaceShortage uint64 `json:"space_shortage"`
	// SpaceLeft : The amount of space left in the user's Dropbox, less than
	// space_needed.
	SpaceLeft uint64 `json:"space_left"`
}

// NewInsufficientQuotaAmounts returns a new InsufficientQuotaAmounts instance
func NewInsufficientQuotaAmounts(SpaceNeeded uint64, SpaceShortage uint64, SpaceLeft uint64) *InsufficientQuotaAmounts {
	s := new(InsufficientQuotaAmounts)
	s.SpaceNeeded = SpaceNeeded
	s.SpaceShortage = SpaceShortage
	s.SpaceLeft = SpaceLeft
	return s
}

// InviteeInfo : Information about the recipient of a shared content invitation.
type InviteeInfo struct {
	dropbox.Tagged
	// Email : Email address of invited user.
	Email string `json:"email,omitempty"`
}

// Valid tag values for InviteeInfo
const (
	InviteeInfoEmail = "email"
	InviteeInfoOther = "other"
)

// UnmarshalJSON deserializes into a InviteeInfo instance
func (u *InviteeInfo) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Email : Email address of invited user.
		Email string `json:"email,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "email":
		u.Email = w.Email

	}
	return nil
}

// InviteeMembershipInfo : Information about an invited member of a shared
// content.
type InviteeMembershipInfo struct {
	MembershipInfo
	// Invitee : Recipient of the invitation.
	Invitee *InviteeInfo `json:"invitee"`
	// User : The user this invitation is tied to, if available.
	User *UserInfo `json:"user,omitempty"`
}

// NewInviteeMembershipInfo returns a new InviteeMembershipInfo instance
func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeInfo) *InviteeMembershipInfo {
	s := new(InviteeMembershipInfo)
	s.AccessType = AccessType
	s.Invitee = Invitee
	s.IsInherited = false
	return s
}

// JobError : Error occurred while performing an asynchronous job from
// `unshareFolder` or `removeFolderMember`.
type JobError struct {
	dropbox.Tagged
	// UnshareFolderError : Error occurred while performing `unshareFolder`
	// action.
	UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"`
	// RemoveFolderMemberError : Error occurred while performing
	// `removeFolderMember` action.
	RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"`
	// RelinquishFolderMembershipError : Error occurred while performing
	// `relinquishFolderMembership` action.
	RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"`
}

// Valid tag values for JobError
const (
	JobErrorUnshareFolderError              = "unshare_folder_error"
	JobErrorRemoveFolderMemberError         = "remove_folder_member_error"
	JobErrorRelinquishFolderMembershipError = "relinquish_folder_membership_error"
	JobErrorOther                           = "other"
)

// UnmarshalJSON deserializes into a JobError instance
func (u *JobError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UnshareFolderError : Error occurred while performing `unshareFolder`
		// action.
		UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"`
		// RemoveFolderMemberError : Error occurred while performing
		// `removeFolderMember` action.
		RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"`
		// RelinquishFolderMembershipError : Error occurred while performing
		// `relinquishFolderMembership` action.
		RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "unshare_folder_error":
		u.UnshareFolderError = w.UnshareFolderError

	case "remove_folder_member_error":
		u.RemoveFolderMemberError = w.RemoveFolderMemberError

	case "relinquish_folder_membership_error":
		u.RelinquishFolderMembershipError = w.RelinquishFolderMembershipError

	}
	return nil
}

// JobStatus : has no documentation (yet)
type JobStatus struct {
	dropbox.Tagged
	// Failed : The asynchronous job returned an error.
	Failed *JobError `json:"failed,omitempty"`
}

// Valid tag values for JobStatus
const (
	JobStatusInProgress = "in_progress"
	JobStatusComplete   = "complete"
	JobStatusFailed     = "failed"
)

// UnmarshalJSON deserializes into a JobStatus instance
func (u *JobStatus) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Failed : The asynchronous job returned an error.
		Failed *JobError `json:"failed,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "failed":
		u.Failed = w.Failed

	}
	return nil
}

// LinkAccessLevel : has no documentation (yet)
type LinkAccessLevel struct {
	dropbox.Tagged
}

// Valid tag values for LinkAccessLevel
const (
	LinkAccessLevelViewer = "viewer"
	LinkAccessLevelEditor = "editor"
	LinkAccessLevelOther  = "other"
)

// LinkAction : Actions that can be performed on a link.
type LinkAction struct {
	dropbox.Tagged
}

// Valid tag values for LinkAction
const (
	LinkActionChangeAccessLevel = "change_access_level"
	LinkActionChangeAudience    = "change_audience"
	LinkActionRemoveExpiry      = "remove_expiry"
	LinkActionRemovePassword    = "remove_password"
	LinkActionSetExpiry         = "set_expiry"
	LinkActionSetPassword       = "set_password"
	LinkActionOther             = "other"
)

// LinkAudience : has no documentation (yet)
type LinkAudience struct {
	dropbox.Tagged
}

// Valid tag values for LinkAudience
const (
	LinkAudiencePublic   = "public"
	LinkAudienceTeam     = "team"
	LinkAudienceNoOne    = "no_one"
	LinkAudiencePassword = "password"
	LinkAudienceMembers  = "members"
	LinkAudienceOther    = "other"
)

// VisibilityPolicyDisallowedReason : has no documentation (yet)
type VisibilityPolicyDisallowedReason struct {
	dropbox.Tagged
}

// Valid tag values for VisibilityPolicyDisallowedReason
const (
	VisibilityPolicyDisallowedReasonDeleteAndRecreate        = "delete_and_recreate"
	VisibilityPolicyDisallowedReasonRestrictedBySharedFolder = "restricted_by_shared_folder"
	VisibilityPolicyDisallowedReasonRestrictedByTeam         = "restricted_by_team"
	VisibilityPolicyDisallowedReasonUserNotOnTeam            = "user_not_on_team"
	VisibilityPolicyDisallowedReasonUserAccountType          = "user_account_type"
	VisibilityPolicyDisallowedReasonPermissionDenied         = "permission_denied"
	VisibilityPolicyDisallowedReasonOther                    = "other"
)

// LinkAudienceDisallowedReason : check documentation for
// VisibilityPolicyDisallowedReason.
type LinkAudienceDisallowedReason struct {
	dropbox.Tagged
}

// Valid tag values for LinkAudienceDisallowedReason
const (
	LinkAudienceDisallowedReasonDeleteAndRecreate        = "delete_and_recreate"
	LinkAudienceDisallowedReasonRestrictedBySharedFolder = "restricted_by_shared_folder"
	LinkAudienceDisallowedReasonRestrictedByTeam         = "restricted_by_team"
	LinkAudienceDisallowedReasonUserNotOnTeam            = "user_not_on_team"
	LinkAudienceDisallowedReasonUserAccountType          = "user_account_type"
	LinkAudienceDisallowedReasonPermissionDenied         = "permission_denied"
	LinkAudienceDisallowedReasonOther                    = "other"
)

// LinkAudienceOption : has no documentation (yet)
type LinkAudienceOption struct {
	// Audience : Specifies who can access the link.
	Audience *LinkAudience `json:"audience"`
	// Allowed : Whether the user calling this API can select this audience
	// option.
	Allowed bool `json:"allowed"`
	// DisallowedReason : If `allowed` is false, this will provide the reason
	// that the user is not permitted to set the visibility to this policy.
	DisallowedReason *LinkAudienceDisallowedReason `json:"disallowed_reason,omitempty"`
}

// NewLinkAudienceOption returns a new LinkAudienceOption instance
func NewLinkAudienceOption(Audience *LinkAudience, Allowed bool) *LinkAudienceOption {
	s := new(LinkAudienceOption)
	s.Audience = Audience
	s.Allowed = Allowed
	return s
}

// LinkExpiry : has no documentation (yet)
type LinkExpiry struct {
	dropbox.Tagged
	// SetExpiry : Set a new expiry or change an existing expiry.
	SetExpiry time.Time `json:"set_expiry,omitempty"`
}

// Valid tag values for LinkExpiry
const (
	LinkExpiryRemoveExpiry = "remove_expiry"
	LinkExpirySetExpiry    = "set_expiry"
	LinkExpiryOther        = "other"
)

// UnmarshalJSON deserializes into a LinkExpiry instance
func (u *LinkExpiry) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// SetExpiry : Set a new expiry or change an existing expiry.
		SetExpiry time.Time `json:"set_expiry,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "set_expiry":
		u.SetExpiry = w.SetExpiry

	}
	return nil
}

// LinkPassword : has no documentation (yet)
type LinkPassword struct {
	dropbox.Tagged
	// SetPassword : Set a new password or change an existing password.
	SetPassword string `json:"set_password,omitempty"`
}

// Valid tag values for LinkPassword
const (
	LinkPasswordRemovePassword = "remove_password"
	LinkPasswordSetPassword    = "set_password"
	LinkPasswordOther          = "other"
)

// UnmarshalJSON deserializes into a LinkPassword instance
func (u *LinkPassword) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// SetPassword : Set a new password or change an existing password.
		SetPassword string `json:"set_password,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "set_password":
		u.SetPassword = w.SetPassword

	}
	return nil
}

// LinkPermission : Permissions for actions that can be performed on a link.
type LinkPermission struct {
	// Action : has no documentation (yet)
	Action *LinkAction `json:"action"`
	// Allow : has no documentation (yet)
	Allow bool `json:"allow"`
	// Reason : has no documentation (yet)
	Reason *PermissionDeniedReason `json:"reason,omitempty"`
}

// NewLinkPermission returns a new LinkPermission instance
func NewLinkPermission(Action *LinkAction, Allow bool) *LinkPermission {
	s := new(LinkPermission)
	s.Action = Action
	s.Allow = Allow
	return s
}

// LinkPermissions : has no documentation (yet)
type LinkPermissions struct {
	// ResolvedVisibility : The current visibility of the link after considering
	// the shared links policies of the the team (in case the link's owner is
	// part of a team) and the shared folder (in case the linked file is part of
	// a shared folder). This field is shown only if the caller has access to
	// this info (the link's owner always has access to this data). For some
	// links, an effective_audience value is returned instead.
	ResolvedVisibility *ResolvedVisibility `json:"resolved_visibility,omitempty"`
	// RequestedVisibility : The shared link's requested visibility. This can be
	// overridden by the team and shared folder policies. The final visibility,
	// after considering these policies, can be found in `resolved_visibility`.
	// This is shown only if the caller is the link's owner and
	// resolved_visibility is returned instead of effective_audience.
	RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
	// CanRevoke : Whether the caller can revoke the shared link.
	CanRevoke bool `json:"can_revoke"`
	// RevokeFailureReason : The failure reason for revoking the link. This
	// field will only be present if the `can_revoke` is false.
	RevokeFailureReason *SharedLinkAccessFailureReason `json:"revoke_failure_reason,omitempty"`
	// EffectiveAudience : The type of audience who can benefit from the access
	// level specified by the `link_access_level` field.
	EffectiveAudience *LinkAudience `json:"effective_audience,omitempty"`
	// LinkAccessLevel : The access level that the link will grant to its users.
	// A link can grant additional rights to a user beyond their current access
	// level. For example, if a user was invited as a viewer to a file, and then
	// opens a link with `link_access_level` set to `editor`, then they will
	// gain editor privileges. The `link_access_level` is a property of the
	// link, and does not depend on who is calling this API. In particular,
	// `link_access_level` does not take into account the API caller's current
	// permissions to the content.
	LinkAccessLevel *LinkAccessLevel `json:"link_access_level,omitempty"`
	// VisibilityPolicies : A list of policies that the user might be able to
	// set for the visibility.
	VisibilityPolicies []*VisibilityPolicy `json:"visibility_policies"`
	// CanSetExpiry : Whether the user can set the expiry settings of the link.
	// This refers to the ability to create a new expiry and modify an existing
	// expiry.
	CanSetExpiry bool `json:"can_set_expiry"`
	// CanRemoveExpiry : Whether the user can remove the expiry of the link.
	CanRemoveExpiry bool `json:"can_remove_expiry"`
	// AllowDownload : Whether the link can be downloaded or not.
	AllowDownload bool `json:"allow_download"`
	// CanAllowDownload : Whether the user can allow downloads via the link.
	// This refers to the ability to remove a no-download restriction on the
	// link.
	CanAllowDownload bool `json:"can_allow_download"`
	// CanDisallowDownload : Whether the user can disallow downloads via the
	// link. This refers to the ability to impose a no-download restriction on
	// the link.
	CanDisallowDownload bool `json:"can_disallow_download"`
	// AllowComments : Whether comments are enabled for the linked file. This
	// takes the team commenting policy into account.
	AllowComments bool `json:"allow_comments"`
	// TeamRestrictsComments : Whether the team has disabled commenting
	// globally.
	TeamRestrictsComments bool `json:"team_restricts_comments"`
	// AudienceOptions : A list of link audience options the user might be able
	// to set as the new audience.
	AudienceOptions []*LinkAudienceOption `json:"audience_options,omitempty"`
	// CanSetPassword : Whether the user can set a password for the link.
	CanSetPassword bool `json:"can_set_password,omitempty"`
	// CanRemovePassword : Whether the user can remove the password of the link.
	CanRemovePassword bool `json:"can_remove_password,omitempty"`
	// RequirePassword : Whether the user is required to provide a password to
	// view the link.
	RequirePassword bool `json:"require_password,omitempty"`
	// CanUseExtendedSharingControls : Whether the user can use extended sharing
	// controls, based on their account type.
	CanUseExtendedSharingControls bool `json:"can_use_extended_sharing_controls,omitempty"`
}

// NewLinkPermissions returns a new LinkPermissions instance
func NewLinkPermissions(CanRevoke bool, VisibilityPolicies []*VisibilityPolicy, CanSetExpiry bool, CanRemoveExpiry bool, AllowDownload bool, CanAllowDownload bool, CanDisallowDownload bool, AllowComments bool, TeamRestrictsComments bool) *LinkPermissions {
	s := new(LinkPermissions)
	s.CanRevoke = CanRevoke
	s.VisibilityPolicies = VisibilityPolicies
	s.CanSetExpiry = CanSetExpiry
	s.CanRemoveExpiry = CanRemoveExpiry
	s.AllowDownload = AllowDownload
	s.CanAllowDownload = CanAllowDownload
	s.CanDisallowDownload = CanDisallowDownload
	s.AllowComments = AllowComments
	s.TeamRestrictsComments = TeamRestrictsComments
	return s
}

// LinkSettings : Settings that apply to a link.
type LinkSettings struct {
	// AccessLevel : The access level on the link for this file. Currently, it
	// only accepts 'viewer' and 'viewer_no_comment'.
	AccessLevel *AccessLevel `json:"access_level,omitempty"`
	// Audience : The type of audience on the link for this file.
	Audience *LinkAudience `json:"audience,omitempty"`
	// Expiry : An expiry timestamp to set on a link.
	Expiry *LinkExpiry `json:"expiry,omitempty"`
	// Password : The password for the link.
	Password *LinkPassword `json:"password,omitempty"`
}

// NewLinkSettings returns a new LinkSettings instance
func NewLinkSettings() *LinkSettings {
	s := new(LinkSettings)
	return s
}

// ListFileMembersArg : Arguments for `listFileMembers`.
type ListFileMembersArg struct {
	// File : The file for which you want to see members.
	File string `json:"file"`
	// Actions : The actions for which to return permissions on a member.
	Actions []*MemberAction `json:"actions,omitempty"`
	// IncludeInherited : Whether to include members who only have access from a
	// parent shared folder.
	IncludeInherited bool `json:"include_inherited"`
	// Limit : Number of members to return max per query. Defaults to 100 if no
	// limit is specified.
	Limit uint32 `json:"limit"`
}

// NewListFileMembersArg returns a new ListFileMembersArg instance
func NewListFileMembersArg(File string) *ListFileMembersArg {
	s := new(ListFileMembersArg)
	s.File = File
	s.IncludeInherited = true
	s.Limit = 100
	return s
}

// ListFileMembersBatchArg : Arguments for `listFileMembersBatch`.
type ListFileMembersBatchArg struct {
	// Files : Files for which to return members.
	Files []string `json:"files"`
	// Limit : Number of members to return max per query. Defaults to 10 if no
	// limit is specified.
	Limit uint32 `json:"limit"`
}

// NewListFileMembersBatchArg returns a new ListFileMembersBatchArg instance
func NewListFileMembersBatchArg(Files []string) *ListFileMembersBatchArg {
	s := new(ListFileMembersBatchArg)
	s.Files = Files
	s.Limit = 10
	return s
}

// ListFileMembersBatchResult : Per-file result for `listFileMembersBatch`.
type ListFileMembersBatchResult struct {
	// File : This is the input file identifier, whether an ID or a path.
	File string `json:"file"`
	// Result : The result for this particular file.
	Result *ListFileMembersIndividualResult `json:"result"`
}

// NewListFileMembersBatchResult returns a new ListFileMembersBatchResult instance
func NewListFileMembersBatchResult(File string, Result *ListFileMembersIndividualResult) *ListFileMembersBatchResult {
	s := new(ListFileMembersBatchResult)
	s.File = File
	s.Result = Result
	return s
}

// ListFileMembersContinueArg : Arguments for `listFileMembersContinue`.
type ListFileMembersContinueArg struct {
	// Cursor : The cursor returned by your last call to `listFileMembers`,
	// `listFileMembersContinue`, or `listFileMembersBatch`.
	Cursor string `json:"cursor"`
}

// NewListFileMembersContinueArg returns a new ListFileMembersContinueArg instance
func NewListFileMembersContinueArg(Cursor string) *ListFileMembersContinueArg {
	s := new(ListFileMembersContinueArg)
	s.Cursor = Cursor
	return s
}

// ListFileMembersContinueError : Error for `listFileMembersContinue`.
type ListFileMembersContinueError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for ListFileMembersContinueError
const (
	ListFileMembersContinueErrorUserError     = "user_error"
	ListFileMembersContinueErrorAccessError   = "access_error"
	ListFileMembersContinueErrorInvalidCursor = "invalid_cursor"
	ListFileMembersContinueErrorOther         = "other"
)

// UnmarshalJSON deserializes into a ListFileMembersContinueError instance
func (u *ListFileMembersContinueError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// ListFileMembersCountResult : has no documentation (yet)
type ListFileMembersCountResult struct {
	// Members : A list of members on this file.
	Members *SharedFileMembers `json:"members"`
	// MemberCount : The number of members on this file. This does not include
	// inherited members.
	MemberCount uint32 `json:"member_count"`
}

// NewListFileMembersCountResult returns a new ListFileMembersCountResult instance
func NewListFileMembersCountResult(Members *SharedFileMembers, MemberCount uint32) *ListFileMembersCountResult {
	s := new(ListFileMembersCountResult)
	s.Members = Members
	s.MemberCount = MemberCount
	return s
}

// ListFileMembersError : Error for `listFileMembers`.
type ListFileMembersError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for ListFileMembersError
const (
	ListFileMembersErrorUserError   = "user_error"
	ListFileMembersErrorAccessError = "access_error"
	ListFileMembersErrorOther       = "other"
)

// UnmarshalJSON deserializes into a ListFileMembersError instance
func (u *ListFileMembersError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// ListFileMembersIndividualResult : has no documentation (yet)
type ListFileMembersIndividualResult struct {
	dropbox.Tagged
	// Result : The results of the query for this file if it was successful.
	Result *ListFileMembersCountResult `json:"result,omitempty"`
	// AccessError : The result of the query for this file if it was an error.
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for ListFileMembersIndividualResult
const (
	ListFileMembersIndividualResultResult      = "result"
	ListFileMembersIndividualResultAccessError = "access_error"
	ListFileMembersIndividualResultOther       = "other"
)

// UnmarshalJSON deserializes into a ListFileMembersIndividualResult instance
func (u *ListFileMembersIndividualResult) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : The result of the query for this file if it was an
		// error.
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "result":
		if err = json.Unmarshal(body, &u.Result); err != nil {
			return err
		}

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// ListFilesArg : Arguments for `listReceivedFiles`.
type ListFilesArg struct {
	// Limit : Number of files to return max per query. Defaults to 100 if no
	// limit is specified.
	Limit uint32 `json:"limit"`
	// Actions : A list of `FileAction`s corresponding to `FilePermission`s that
	// should appear in the  response's `SharedFileMetadata.permissions` field
	// describing the actions the  authenticated user can perform on the file.
	Actions []*FileAction `json:"actions,omitempty"`
}

// NewListFilesArg returns a new ListFilesArg instance
func NewListFilesArg() *ListFilesArg {
	s := new(ListFilesArg)
	s.Limit = 100
	return s
}

// ListFilesContinueArg : Arguments for `listReceivedFilesContinue`.
type ListFilesContinueArg struct {
	// Cursor : Cursor in `ListFilesResult.cursor`.
	Cursor string `json:"cursor"`
}

// NewListFilesContinueArg returns a new ListFilesContinueArg instance
func NewListFilesContinueArg(Cursor string) *ListFilesContinueArg {
	s := new(ListFilesContinueArg)
	s.Cursor = Cursor
	return s
}

// ListFilesContinueError : Error results for `listReceivedFilesContinue`.
type ListFilesContinueError struct {
	dropbox.Tagged
	// UserError : User account had a problem.
	UserError *SharingUserError `json:"user_error,omitempty"`
}

// Valid tag values for ListFilesContinueError
const (
	ListFilesContinueErrorUserError     = "user_error"
	ListFilesContinueErrorInvalidCursor = "invalid_cursor"
	ListFilesContinueErrorOther         = "other"
)

// UnmarshalJSON deserializes into a ListFilesContinueError instance
func (u *ListFilesContinueError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : User account had a problem.
		UserError *SharingUserError `json:"user_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	}
	return nil
}

// ListFilesResult : Success results for `listReceivedFiles`.
type ListFilesResult struct {
	// Entries : Information about the files shared with current user.
	Entries []*SharedFileMetadata `json:"entries"`
	// Cursor : Cursor used to obtain additional shared files.
	Cursor string `json:"cursor,omitempty"`
}

// NewListFilesResult returns a new ListFilesResult instance
func NewListFilesResult(Entries []*SharedFileMetadata) *ListFilesResult {
	s := new(ListFilesResult)
	s.Entries = Entries
	return s
}

// ListFolderMembersCursorArg : has no documentation (yet)
type ListFolderMembersCursorArg struct {
	// Actions : This is a list indicating whether each returned member will
	// include a boolean value `MemberPermission.allow` that describes whether
	// the current user can perform the MemberAction on the member.
	Actions []*MemberAction `json:"actions,omitempty"`
	// Limit : The maximum number of results that include members, groups and
	// invitees to return per request.
	Limit uint32 `json:"limit"`
}

// NewListFolderMembersCursorArg returns a new ListFolderMembersCursorArg instance
func NewListFolderMembersCursorArg() *ListFolderMembersCursorArg {
	s := new(ListFolderMembersCursorArg)
	s.Limit = 1000
	return s
}

// ListFolderMembersArgs : has no documentation (yet)
type ListFolderMembersArgs struct {
	ListFolderMembersCursorArg
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
}

// NewListFolderMembersArgs returns a new ListFolderMembersArgs instance
func NewListFolderMembersArgs(SharedFolderId string) *ListFolderMembersArgs {
	s := new(ListFolderMembersArgs)
	s.SharedFolderId = SharedFolderId
	s.Limit = 1000
	return s
}

// ListFolderMembersContinueArg : has no documentation (yet)
type ListFolderMembersContinueArg struct {
	// Cursor : The cursor returned by your last call to `listFolderMembers` or
	// `listFolderMembersContinue`.
	Cursor string `json:"cursor"`
}

// NewListFolderMembersContinueArg returns a new ListFolderMembersContinueArg instance
func NewListFolderMembersContinueArg(Cursor string) *ListFolderMembersContinueArg {
	s := new(ListFolderMembersContinueArg)
	s.Cursor = Cursor
	return s
}

// ListFolderMembersContinueError : has no documentation (yet)
type ListFolderMembersContinueError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for ListFolderMembersContinueError
const (
	ListFolderMembersContinueErrorAccessError   = "access_error"
	ListFolderMembersContinueErrorInvalidCursor = "invalid_cursor"
	ListFolderMembersContinueErrorOther         = "other"
)

// UnmarshalJSON deserializes into a ListFolderMembersContinueError instance
func (u *ListFolderMembersContinueError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// ListFoldersArgs : has no documentation (yet)
type ListFoldersArgs struct {
	// Limit : The maximum number of results to return per request.
	Limit uint32 `json:"limit"`
	// Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
	// that should appear in the  response's `SharedFolderMetadata.permissions`
	// field describing the actions the  authenticated user can perform on the
	// folder.
	Actions []*FolderAction `json:"actions,omitempty"`
}

// NewListFoldersArgs returns a new ListFoldersArgs instance
func NewListFoldersArgs() *ListFoldersArgs {
	s := new(ListFoldersArgs)
	s.Limit = 1000
	return s
}

// ListFoldersContinueArg : has no documentation (yet)
type ListFoldersContinueArg struct {
	// Cursor : The cursor returned by the previous API call specified in the
	// endpoint description.
	Cursor string `json:"cursor"`
}

// NewListFoldersContinueArg returns a new ListFoldersContinueArg instance
func NewListFoldersContinueArg(Cursor string) *ListFoldersContinueArg {
	s := new(ListFoldersContinueArg)
	s.Cursor = Cursor
	return s
}

// ListFoldersContinueError : has no documentation (yet)
type ListFoldersContinueError struct {
	dropbox.Tagged
}

// Valid tag values for ListFoldersContinueError
const (
	ListFoldersContinueErrorInvalidCursor = "invalid_cursor"
	ListFoldersContinueErrorOther         = "other"
)

// ListFoldersResult : Result for `listFolders` or `listMountableFolders`,
// depending on which endpoint was requested. Unmounted shared folders can be
// identified by the absence of `SharedFolderMetadata.path_lower`.
type ListFoldersResult struct {
	// Entries : List of all shared folders the authenticated user has access
	// to.
	Entries []*SharedFolderMetadata `json:"entries"`
	// Cursor : Present if there are additional shared folders that have not
	// been returned yet. Pass the cursor into the corresponding continue
	// endpoint (either `listFoldersContinue` or `listMountableFoldersContinue`)
	// to list additional folders.
	Cursor string `json:"cursor,omitempty"`
}

// NewListFoldersResult returns a new ListFoldersResult instance
func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult {
	s := new(ListFoldersResult)
	s.Entries = Entries
	return s
}

// ListSharedLinksArg : has no documentation (yet)
type ListSharedLinksArg struct {
	// Path : See `listSharedLinks` description.
	Path string `json:"path,omitempty"`
	// Cursor : The cursor returned by your last call to `listSharedLinks`.
	Cursor string `json:"cursor,omitempty"`
	// DirectOnly : See `listSharedLinks` description.
	DirectOnly bool `json:"direct_only,omitempty"`
}

// NewListSharedLinksArg returns a new ListSharedLinksArg instance
func NewListSharedLinksArg() *ListSharedLinksArg {
	s := new(ListSharedLinksArg)
	return s
}

// ListSharedLinksError : has no documentation (yet)
type ListSharedLinksError struct {
	dropbox.Tagged
	// Path : has no documentation (yet)
	Path *files.LookupError `json:"path,omitempty"`
}

// Valid tag values for ListSharedLinksError
const (
	ListSharedLinksErrorPath  = "path"
	ListSharedLinksErrorReset = "reset"
	ListSharedLinksErrorOther = "other"
)

// UnmarshalJSON deserializes into a ListSharedLinksError instance
func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Path : has no documentation (yet)
		Path *files.LookupError `json:"path,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "path":
		u.Path = w.Path

	}
	return nil
}

// ListSharedLinksResult : has no documentation (yet)
type ListSharedLinksResult struct {
	// Links : Shared links applicable to the path argument.
	Links []IsSharedLinkMetadata `json:"links"`
	// HasMore : Is true if there are additional shared links that have not been
	// returned yet. Pass the cursor into `listSharedLinks` to retrieve them.
	HasMore bool `json:"has_more"`
	// Cursor : Pass the cursor into `listSharedLinks` to obtain the additional
	// links. Cursor is returned only if no path is given.
	Cursor string `json:"cursor,omitempty"`
}

// NewListSharedLinksResult returns a new ListSharedLinksResult instance
func NewListSharedLinksResult(Links []IsSharedLinkMetadata, HasMore bool) *ListSharedLinksResult {
	s := new(ListSharedLinksResult)
	s.Links = Links
	s.HasMore = HasMore
	return s
}

// UnmarshalJSON deserializes into a ListSharedLinksResult instance
func (u *ListSharedLinksResult) UnmarshalJSON(b []byte) error {
	type wrap struct {
		// Links : Shared links applicable to the path argument.
		Links []json.RawMessage `json:"links"`
		// HasMore : Is true if there are additional shared links that have not
		// been returned yet. Pass the cursor into `listSharedLinks` to retrieve
		// them.
		HasMore bool `json:"has_more"`
		// Cursor : Pass the cursor into `listSharedLinks` to obtain the
		// additional links. Cursor is returned only if no path is given.
		Cursor string `json:"cursor,omitempty"`
	}
	var w wrap
	if err := json.Unmarshal(b, &w); err != nil {
		return err
	}
	u.Links = make([]IsSharedLinkMetadata, len(w.Links))
	for i, e := range w.Links {
		v, err := IsSharedLinkMetadataFromJSON(e)
		if err != nil {
			return err
		}
		u.Links[i] = v
	}
	u.HasMore = w.HasMore
	u.Cursor = w.Cursor
	return nil
}

// MemberAccessLevelResult : Contains information about a member's access level
// to content after an operation.
type MemberAccessLevelResult struct {
	// AccessLevel : The member still has this level of access to the content
	// through a parent folder.
	AccessLevel *AccessLevel `json:"access_level,omitempty"`
	// Warning : A localized string with additional information about why the
	// user has this access level to the content.
	Warning string `json:"warning,omitempty"`
	// AccessDetails : The parent folders that a member has access to. The field
	// is present if the user has access to the first parent folder where the
	// member gains access.
	AccessDetails []*ParentFolderAccessInfo `json:"access_details,omitempty"`
}

// NewMemberAccessLevelResult returns a new MemberAccessLevelResult instance
func NewMemberAccessLevelResult() *MemberAccessLevelResult {
	s := new(MemberAccessLevelResult)
	return s
}

// MemberAction : Actions that may be taken on members of a shared folder.
type MemberAction struct {
	dropbox.Tagged
}

// Valid tag values for MemberAction
const (
	MemberActionLeaveACopy          = "leave_a_copy"
	MemberActionMakeEditor          = "make_editor"
	MemberActionMakeOwner           = "make_owner"
	MemberActionMakeViewer          = "make_viewer"
	MemberActionMakeViewerNoComment = "make_viewer_no_comment"
	MemberActionRemove              = "remove"
	MemberActionOther               = "other"
)

// MemberPermission : Whether the user is allowed to take the action on the
// associated member.
type MemberPermission struct {
	// Action : The action that the user may wish to take on the member.
	Action *MemberAction `json:"action"`
	// Allow : True if the user is allowed to take the action.
	Allow bool `json:"allow"`
	// Reason : The reason why the user is denied the permission. Not present if
	// the action is allowed.
	Reason *PermissionDeniedReason `json:"reason,omitempty"`
}

// NewMemberPermission returns a new MemberPermission instance
func NewMemberPermission(Action *MemberAction, Allow bool) *MemberPermission {
	s := new(MemberPermission)
	s.Action = Action
	s.Allow = Allow
	return s
}

// MemberPolicy : Policy governing who can be a member of a shared folder. Only
// applicable to folders owned by a user on a team.
type MemberPolicy struct {
	dropbox.Tagged
}

// Valid tag values for MemberPolicy
const (
	MemberPolicyTeam   = "team"
	MemberPolicyAnyone = "anyone"
	MemberPolicyOther  = "other"
)

// MemberSelector : Includes different ways to identify a member of a shared
// folder.
type MemberSelector struct {
	dropbox.Tagged
	// DropboxId : Dropbox account, team member, or group ID of member.
	DropboxId string `json:"dropbox_id,omitempty"`
	// Email : Email address of member.
	Email string `json:"email,omitempty"`
}

// Valid tag values for MemberSelector
const (
	MemberSelectorDropboxId = "dropbox_id"
	MemberSelectorEmail     = "email"
	MemberSelectorOther     = "other"
)

// UnmarshalJSON deserializes into a MemberSelector instance
func (u *MemberSelector) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// DropboxId : Dropbox account, team member, or group ID of member.
		DropboxId string `json:"dropbox_id,omitempty"`
		// Email : Email address of member.
		Email string `json:"email,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "dropbox_id":
		u.DropboxId = w.DropboxId

	case "email":
		u.Email = w.Email

	}
	return nil
}

// ModifySharedLinkSettingsArgs : has no documentation (yet)
type ModifySharedLinkSettingsArgs struct {
	// Url : URL of the shared link to change its settings.
	Url string `json:"url"`
	// Settings : Set of settings for the shared link.
	Settings *SharedLinkSettings `json:"settings"`
	// RemoveExpiration : If set to true, removes the expiration of the shared
	// link.
	RemoveExpiration bool `json:"remove_expiration"`
}

// NewModifySharedLinkSettingsArgs returns a new ModifySharedLinkSettingsArgs instance
func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs {
	s := new(ModifySharedLinkSettingsArgs)
	s.Url = Url
	s.Settings = Settings
	s.RemoveExpiration = false
	return s
}

// ModifySharedLinkSettingsError : has no documentation (yet)
type ModifySharedLinkSettingsError struct {
	dropbox.Tagged
	// SettingsError : There is an error with the given settings.
	SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
}

// Valid tag values for ModifySharedLinkSettingsError
const (
	ModifySharedLinkSettingsErrorSharedLinkNotFound     = "shared_link_not_found"
	ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied"
	ModifySharedLinkSettingsErrorUnsupportedLinkType    = "unsupported_link_type"
	ModifySharedLinkSettingsErrorOther                  = "other"
	ModifySharedLinkSettingsErrorSettingsError          = "settings_error"
	ModifySharedLinkSettingsErrorEmailNotVerified       = "email_not_verified"
)

// UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// SettingsError : There is an error with the given settings.
		SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "settings_error":
		u.SettingsError = w.SettingsError

	}
	return nil
}

// MountFolderArg : has no documentation (yet)
type MountFolderArg struct {
	// SharedFolderId : The ID of the shared folder to mount.
	SharedFolderId string `json:"shared_folder_id"`
}

// NewMountFolderArg returns a new MountFolderArg instance
func NewMountFolderArg(SharedFolderId string) *MountFolderArg {
	s := new(MountFolderArg)
	s.SharedFolderId = SharedFolderId
	return s
}

// MountFolderError : has no documentation (yet)
type MountFolderError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	// InsufficientQuota : The current user does not have enough space to mount
	// the shared folder.
	InsufficientQuota *InsufficientQuotaAmounts `json:"insufficient_quota,omitempty"`
}

// Valid tag values for MountFolderError
const (
	MountFolderErrorAccessError        = "access_error"
	MountFolderErrorInsideSharedFolder = "inside_shared_folder"
	MountFolderErrorInsufficientQuota  = "insufficient_quota"
	MountFolderErrorAlreadyMounted     = "already_mounted"
	MountFolderErrorNoPermission       = "no_permission"
	MountFolderErrorNotMountable       = "not_mountable"
	MountFolderErrorOther              = "other"
)

// UnmarshalJSON deserializes into a MountFolderError instance
func (u *MountFolderError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	case "insufficient_quota":
		if err = json.Unmarshal(body, &u.InsufficientQuota); err != nil {
			return err
		}

	}
	return nil
}

// ParentFolderAccessInfo : Contains information about a parent folder that a
// member has access to.
type ParentFolderAccessInfo struct {
	// FolderName : Display name for the folder.
	FolderName string `json:"folder_name"`
	// SharedFolderId : The identifier of the parent shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Permissions : The user's permissions for the parent shared folder.
	Permissions []*MemberPermission `json:"permissions"`
	// Path : The full path to the parent shared folder relative to the acting
	// user's root.
	Path string `json:"path"`
}

// NewParentFolderAccessInfo returns a new ParentFolderAccessInfo instance
func NewParentFolderAccessInfo(FolderName string, SharedFolderId string, Permissions []*MemberPermission, Path string) *ParentFolderAccessInfo {
	s := new(ParentFolderAccessInfo)
	s.FolderName = FolderName
	s.SharedFolderId = SharedFolderId
	s.Permissions = Permissions
	s.Path = Path
	return s
}

// PathLinkMetadata : Metadata for a path-based shared link.
type PathLinkMetadata struct {
	LinkMetadata
	// Path : Path in user's Dropbox.
	Path string `json:"path"`
}

// NewPathLinkMetadata returns a new PathLinkMetadata instance
func NewPathLinkMetadata(Url string, Visibility *Visibility, Path string) *PathLinkMetadata {
	s := new(PathLinkMetadata)
	s.Url = Url
	s.Visibility = Visibility
	s.Path = Path
	return s
}

// PendingUploadMode : Flag to indicate pending upload default (for linking to
// not-yet-existing paths).
type PendingUploadMode struct {
	dropbox.Tagged
}

// Valid tag values for PendingUploadMode
const (
	PendingUploadModeFile   = "file"
	PendingUploadModeFolder = "folder"
)

// PermissionDeniedReason : Possible reasons the user is denied a permission.
type PermissionDeniedReason struct {
	dropbox.Tagged
	// InsufficientPlan : has no documentation (yet)
	InsufficientPlan *InsufficientPlan `json:"insufficient_plan,omitempty"`
}

// Valid tag values for PermissionDeniedReason
const (
	PermissionDeniedReasonUserNotSameTeamAsOwner     = "user_not_same_team_as_owner"
	PermissionDeniedReasonUserNotAllowedByOwner      = "user_not_allowed_by_owner"
	PermissionDeniedReasonTargetIsIndirectMember     = "target_is_indirect_member"
	PermissionDeniedReasonTargetIsOwner              = "target_is_owner"
	PermissionDeniedReasonTargetIsSelf               = "target_is_self"
	PermissionDeniedReasonTargetNotActive            = "target_not_active"
	PermissionDeniedReasonFolderIsLimitedTeamFolder  = "folder_is_limited_team_folder"
	PermissionDeniedReasonOwnerNotOnTeam             = "owner_not_on_team"
	PermissionDeniedReasonPermissionDenied           = "permission_denied"
	PermissionDeniedReasonRestrictedByTeam           = "restricted_by_team"
	PermissionDeniedReasonUserAccountType            = "user_account_type"
	PermissionDeniedReasonUserNotOnTeam              = "user_not_on_team"
	PermissionDeniedReasonFolderIsInsideSharedFolder = "folder_is_inside_shared_folder"
	PermissionDeniedReasonRestrictedByParentFolder   = "restricted_by_parent_folder"
	PermissionDeniedReasonInsufficientPlan           = "insufficient_plan"
	PermissionDeniedReasonOther                      = "other"
)

// UnmarshalJSON deserializes into a PermissionDeniedReason instance
func (u *PermissionDeniedReason) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "insufficient_plan":
		if err = json.Unmarshal(body, &u.InsufficientPlan); err != nil {
			return err
		}

	}
	return nil
}

// RelinquishFileMembershipArg : has no documentation (yet)
type RelinquishFileMembershipArg struct {
	// File : The path or id for the file.
	File string `json:"file"`
}

// NewRelinquishFileMembershipArg returns a new RelinquishFileMembershipArg instance
func NewRelinquishFileMembershipArg(File string) *RelinquishFileMembershipArg {
	s := new(RelinquishFileMembershipArg)
	s.File = File
	return s
}

// RelinquishFileMembershipError : has no documentation (yet)
type RelinquishFileMembershipError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for RelinquishFileMembershipError
const (
	RelinquishFileMembershipErrorAccessError  = "access_error"
	RelinquishFileMembershipErrorGroupAccess  = "group_access"
	RelinquishFileMembershipErrorNoPermission = "no_permission"
	RelinquishFileMembershipErrorOther        = "other"
)

// UnmarshalJSON deserializes into a RelinquishFileMembershipError instance
func (u *RelinquishFileMembershipError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// RelinquishFolderMembershipArg : has no documentation (yet)
type RelinquishFolderMembershipArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// LeaveACopy : Keep a copy of the folder's contents upon relinquishing
	// membership. This must be set to false when the folder is within a team
	// folder or another shared folder.
	LeaveACopy bool `json:"leave_a_copy"`
}

// NewRelinquishFolderMembershipArg returns a new RelinquishFolderMembershipArg instance
func NewRelinquishFolderMembershipArg(SharedFolderId string) *RelinquishFolderMembershipArg {
	s := new(RelinquishFolderMembershipArg)
	s.SharedFolderId = SharedFolderId
	s.LeaveACopy = false
	return s
}

// RelinquishFolderMembershipError : has no documentation (yet)
type RelinquishFolderMembershipError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for RelinquishFolderMembershipError
const (
	RelinquishFolderMembershipErrorAccessError      = "access_error"
	RelinquishFolderMembershipErrorFolderOwner      = "folder_owner"
	RelinquishFolderMembershipErrorMounted          = "mounted"
	RelinquishFolderMembershipErrorGroupAccess      = "group_access"
	RelinquishFolderMembershipErrorTeamFolder       = "team_folder"
	RelinquishFolderMembershipErrorNoPermission     = "no_permission"
	RelinquishFolderMembershipErrorNoExplicitAccess = "no_explicit_access"
	RelinquishFolderMembershipErrorOther            = "other"
)

// UnmarshalJSON deserializes into a RelinquishFolderMembershipError instance
func (u *RelinquishFolderMembershipError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// RemoveFileMemberArg : Arguments for `removeFileMember2`.
type RemoveFileMemberArg struct {
	// File : File from which to remove members.
	File string `json:"file"`
	// Member : Member to remove from this file. Note that even if an email is
	// specified, it may result in the removal of a user (not an invitee) if the
	// user's main account corresponds to that email address.
	Member *MemberSelector `json:"member"`
}

// NewRemoveFileMemberArg returns a new RemoveFileMemberArg instance
func NewRemoveFileMemberArg(File string, Member *MemberSelector) *RemoveFileMemberArg {
	s := new(RemoveFileMemberArg)
	s.File = File
	s.Member = Member
	return s
}

// RemoveFileMemberError : Errors for `removeFileMember2`.
type RemoveFileMemberError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	// NoExplicitAccess : This member does not have explicit access to the file
	// and therefore cannot be removed. The return value is the access that a
	// user might have to the file from a parent folder.
	NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
}

// Valid tag values for RemoveFileMemberError
const (
	RemoveFileMemberErrorUserError        = "user_error"
	RemoveFileMemberErrorAccessError      = "access_error"
	RemoveFileMemberErrorNoExplicitAccess = "no_explicit_access"
	RemoveFileMemberErrorOther            = "other"
)

// UnmarshalJSON deserializes into a RemoveFileMemberError instance
func (u *RemoveFileMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	case "no_explicit_access":
		if err = json.Unmarshal(body, &u.NoExplicitAccess); err != nil {
			return err
		}

	}
	return nil
}

// RemoveFolderMemberArg : has no documentation (yet)
type RemoveFolderMemberArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Member : The member to remove from the folder.
	Member *MemberSelector `json:"member"`
	// LeaveACopy : If true, the removed user will keep their copy of the folder
	// after it's unshared, assuming it was mounted. Otherwise, it will be
	// removed from their Dropbox. This must be set to false when removing a
	// group, or when the folder is within a team folder or another shared
	// folder.
	LeaveACopy bool `json:"leave_a_copy"`
}

// NewRemoveFolderMemberArg returns a new RemoveFolderMemberArg instance
func NewRemoveFolderMemberArg(SharedFolderId string, Member *MemberSelector, LeaveACopy bool) *RemoveFolderMemberArg {
	s := new(RemoveFolderMemberArg)
	s.SharedFolderId = SharedFolderId
	s.Member = Member
	s.LeaveACopy = LeaveACopy
	return s
}

// RemoveFolderMemberError : has no documentation (yet)
type RemoveFolderMemberError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	// MemberError : has no documentation (yet)
	MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
}

// Valid tag values for RemoveFolderMemberError
const (
	RemoveFolderMemberErrorAccessError  = "access_error"
	RemoveFolderMemberErrorMemberError  = "member_error"
	RemoveFolderMemberErrorFolderOwner  = "folder_owner"
	RemoveFolderMemberErrorGroupAccess  = "group_access"
	RemoveFolderMemberErrorTeamFolder   = "team_folder"
	RemoveFolderMemberErrorNoPermission = "no_permission"
	RemoveFolderMemberErrorTooManyFiles = "too_many_files"
	RemoveFolderMemberErrorOther        = "other"
)

// UnmarshalJSON deserializes into a RemoveFolderMemberError instance
func (u *RemoveFolderMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
		// MemberError : has no documentation (yet)
		MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	case "member_error":
		u.MemberError = w.MemberError

	}
	return nil
}

// RemoveMemberJobStatus : has no documentation (yet)
type RemoveMemberJobStatus struct {
	dropbox.Tagged
	// Complete : Removing the folder member has finished. The value is
	// information about whether the member has another form of access.
	Complete *MemberAccessLevelResult `json:"complete,omitempty"`
	// Failed : has no documentation (yet)
	Failed *RemoveFolderMemberError `json:"failed,omitempty"`
}

// Valid tag values for RemoveMemberJobStatus
const (
	RemoveMemberJobStatusInProgress = "in_progress"
	RemoveMemberJobStatusComplete   = "complete"
	RemoveMemberJobStatusFailed     = "failed"
)

// UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
func (u *RemoveMemberJobStatus) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Failed : has no documentation (yet)
		Failed *RemoveFolderMemberError `json:"failed,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "complete":
		if err = json.Unmarshal(body, &u.Complete); err != nil {
			return err
		}

	case "failed":
		u.Failed = w.Failed

	}
	return nil
}

// RequestedLinkAccessLevel : has no documentation (yet)
type RequestedLinkAccessLevel struct {
	dropbox.Tagged
}

// Valid tag values for RequestedLinkAccessLevel
const (
	RequestedLinkAccessLevelViewer = "viewer"
	RequestedLinkAccessLevelEditor = "editor"
	RequestedLinkAccessLevelMax    = "max"
	RequestedLinkAccessLevelOther  = "other"
)

// RevokeSharedLinkArg : has no documentation (yet)
type RevokeSharedLinkArg struct {
	// Url : URL of the shared link.
	Url string `json:"url"`
}

// NewRevokeSharedLinkArg returns a new RevokeSharedLinkArg instance
func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg {
	s := new(RevokeSharedLinkArg)
	s.Url = Url
	return s
}

// RevokeSharedLinkError : has no documentation (yet)
type RevokeSharedLinkError struct {
	dropbox.Tagged
}

// Valid tag values for RevokeSharedLinkError
const (
	RevokeSharedLinkErrorSharedLinkNotFound     = "shared_link_not_found"
	RevokeSharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
	RevokeSharedLinkErrorUnsupportedLinkType    = "unsupported_link_type"
	RevokeSharedLinkErrorOther                  = "other"
	RevokeSharedLinkErrorSharedLinkMalformed    = "shared_link_malformed"
)

// SetAccessInheritanceArg : has no documentation (yet)
type SetAccessInheritanceArg struct {
	// AccessInheritance : The access inheritance settings for the folder.
	AccessInheritance *AccessInheritance `json:"access_inheritance"`
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
}

// NewSetAccessInheritanceArg returns a new SetAccessInheritanceArg instance
func NewSetAccessInheritanceArg(SharedFolderId string) *SetAccessInheritanceArg {
	s := new(SetAccessInheritanceArg)
	s.SharedFolderId = SharedFolderId
	s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
	return s
}

// SetAccessInheritanceError : has no documentation (yet)
type SetAccessInheritanceError struct {
	dropbox.Tagged
	// AccessError : Unable to access shared folder.
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for SetAccessInheritanceError
const (
	SetAccessInheritanceErrorAccessError  = "access_error"
	SetAccessInheritanceErrorNoPermission = "no_permission"
	SetAccessInheritanceErrorOther        = "other"
)

// UnmarshalJSON deserializes into a SetAccessInheritanceError instance
func (u *SetAccessInheritanceError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : Unable to access shared folder.
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// ShareFolderArgBase : has no documentation (yet)
type ShareFolderArgBase struct {
	// AclUpdatePolicy : Who can add and remove members of this shared folder.
	AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
	// ForceAsync : Whether to force the share to happen asynchronously.
	ForceAsync bool `json:"force_async"`
	// MemberPolicy : Who can be a member of this shared folder. Only applicable
	// if the current user is on a team.
	MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
	// Path : The path to the folder to share. If it does not exist, then a new
	// one is created.
	Path string `json:"path"`
	// SharedLinkPolicy : The policy to apply to shared links created for
	// content inside this shared folder.  The current user must be on a team to
	// set this policy to `SharedLinkPolicy.members`.
	SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
	// ViewerInfoPolicy : Who can enable/disable viewer info for this shared
	// folder.
	ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
	// AccessInheritance : The access inheritance settings for the folder.
	AccessInheritance *AccessInheritance `json:"access_inheritance"`
}

// NewShareFolderArgBase returns a new ShareFolderArgBase instance
func NewShareFolderArgBase(Path string) *ShareFolderArgBase {
	s := new(ShareFolderArgBase)
	s.Path = Path
	s.ForceAsync = false
	s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
	return s
}

// ShareFolderArg : has no documentation (yet)
type ShareFolderArg struct {
	ShareFolderArgBase
	// Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
	// that should appear in the  response's `SharedFolderMetadata.permissions`
	// field describing the actions the  authenticated user can perform on the
	// folder.
	Actions []*FolderAction `json:"actions,omitempty"`
	// LinkSettings : Settings on the link for this folder.
	LinkSettings *LinkSettings `json:"link_settings,omitempty"`
}

// NewShareFolderArg returns a new ShareFolderArg instance
func NewShareFolderArg(Path string) *ShareFolderArg {
	s := new(ShareFolderArg)
	s.Path = Path
	s.ForceAsync = false
	s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
	return s
}

// ShareFolderErrorBase : has no documentation (yet)
type ShareFolderErrorBase struct {
	dropbox.Tagged
	// BadPath : `ShareFolderArg.path` is invalid.
	BadPath *SharePathError `json:"bad_path,omitempty"`
}

// Valid tag values for ShareFolderErrorBase
const (
	ShareFolderErrorBaseEmailUnverified                 = "email_unverified"
	ShareFolderErrorBaseBadPath                         = "bad_path"
	ShareFolderErrorBaseTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
	ShareFolderErrorBaseDisallowedSharedLinkPolicy      = "disallowed_shared_link_policy"
	ShareFolderErrorBaseOther                           = "other"
)

// UnmarshalJSON deserializes into a ShareFolderErrorBase instance
func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// BadPath : `ShareFolderArg.path` is invalid.
		BadPath *SharePathError `json:"bad_path,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "bad_path":
		u.BadPath = w.BadPath

	}
	return nil
}

// ShareFolderError : has no documentation (yet)
type ShareFolderError struct {
	dropbox.Tagged
	// BadPath : `ShareFolderArg.path` is invalid.
	BadPath *SharePathError `json:"bad_path,omitempty"`
}

// Valid tag values for ShareFolderError
const (
	ShareFolderErrorEmailUnverified                 = "email_unverified"
	ShareFolderErrorBadPath                         = "bad_path"
	ShareFolderErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
	ShareFolderErrorDisallowedSharedLinkPolicy      = "disallowed_shared_link_policy"
	ShareFolderErrorOther                           = "other"
	ShareFolderErrorNoPermission                    = "no_permission"
)

// UnmarshalJSON deserializes into a ShareFolderError instance
func (u *ShareFolderError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// BadPath : `ShareFolderArg.path` is invalid.
		BadPath *SharePathError `json:"bad_path,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "bad_path":
		u.BadPath = w.BadPath

	}
	return nil
}

// ShareFolderJobStatus : has no documentation (yet)
type ShareFolderJobStatus struct {
	dropbox.Tagged
	// Complete : The share job has finished. The value is the metadata for the
	// folder.
	Complete *SharedFolderMetadata `json:"complete,omitempty"`
	// Failed : has no documentation (yet)
	Failed *ShareFolderError `json:"failed,omitempty"`
}

// Valid tag values for ShareFolderJobStatus
const (
	ShareFolderJobStatusInProgress = "in_progress"
	ShareFolderJobStatusComplete   = "complete"
	ShareFolderJobStatusFailed     = "failed"
)

// UnmarshalJSON deserializes into a ShareFolderJobStatus instance
func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Failed : has no documentation (yet)
		Failed *ShareFolderError `json:"failed,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "complete":
		if err = json.Unmarshal(body, &u.Complete); err != nil {
			return err
		}

	case "failed":
		u.Failed = w.Failed

	}
	return nil
}

// ShareFolderLaunch : has no documentation (yet)
type ShareFolderLaunch struct {
	dropbox.Tagged
	// AsyncJobId : This response indicates that the processing is asynchronous.
	// The string is an id that can be used to obtain the status of the
	// asynchronous job.
	AsyncJobId string `json:"async_job_id,omitempty"`
	// Complete : has no documentation (yet)
	Complete *SharedFolderMetadata `json:"complete,omitempty"`
}

// Valid tag values for ShareFolderLaunch
const (
	ShareFolderLaunchAsyncJobId = "async_job_id"
	ShareFolderLaunchComplete   = "complete"
)

// UnmarshalJSON deserializes into a ShareFolderLaunch instance
func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AsyncJobId : This response indicates that the processing is
		// asynchronous. The string is an id that can be used to obtain the
		// status of the asynchronous job.
		AsyncJobId string `json:"async_job_id,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "async_job_id":
		u.AsyncJobId = w.AsyncJobId

	case "complete":
		if err = json.Unmarshal(body, &u.Complete); err != nil {
			return err
		}

	}
	return nil
}

// SharePathError : has no documentation (yet)
type SharePathError struct {
	dropbox.Tagged
	// AlreadyShared : Folder is already shared. Contains metadata about the
	// existing shared folder.
	AlreadyShared *SharedFolderMetadata `json:"already_shared,omitempty"`
}

// Valid tag values for SharePathError
const (
	SharePathErrorIsFile               = "is_file"
	SharePathErrorInsideSharedFolder   = "inside_shared_folder"
	SharePathErrorContainsSharedFolder = "contains_shared_folder"
	SharePathErrorContainsAppFolder    = "contains_app_folder"
	SharePathErrorContainsTeamFolder   = "contains_team_folder"
	SharePathErrorIsAppFolder          = "is_app_folder"
	SharePathErrorInsideAppFolder      = "inside_app_folder"
	SharePathErrorIsPublicFolder       = "is_public_folder"
	SharePathErrorInsidePublicFolder   = "inside_public_folder"
	SharePathErrorAlreadyShared        = "already_shared"
	SharePathErrorInvalidPath          = "invalid_path"
	SharePathErrorIsOsxPackage         = "is_osx_package"
	SharePathErrorInsideOsxPackage     = "inside_osx_package"
	SharePathErrorIsVault              = "is_vault"
	SharePathErrorIsVaultLocked        = "is_vault_locked"
	SharePathErrorIsFamily             = "is_family"
	SharePathErrorOther                = "other"
)

// UnmarshalJSON deserializes into a SharePathError instance
func (u *SharePathError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "already_shared":
		if err = json.Unmarshal(body, &u.AlreadyShared); err != nil {
			return err
		}

	}
	return nil
}

// SharedContentLinkMetadata : Metadata of a shared link for a file or folder.
type SharedContentLinkMetadata struct {
	SharedContentLinkMetadataBase
	// AudienceExceptions : The content inside this folder with link audience
	// different than this folder's. This is only returned when an endpoint that
	// returns metadata for a single shared folder is called, e.g.
	// /get_folder_metadata.
	AudienceExceptions *AudienceExceptions `json:"audience_exceptions,omitempty"`
	// Url : The URL of the link.
	Url string `json:"url"`
}

// NewSharedContentLinkMetadata returns a new SharedContentLinkMetadata instance
func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool, Url string) *SharedContentLinkMetadata {
	s := new(SharedContentLinkMetadata)
	s.AudienceOptions = AudienceOptions
	s.CurrentAudience = CurrentAudience
	s.LinkPermissions = LinkPermissions
	s.PasswordProtected = PasswordProtected
	s.Url = Url
	return s
}

// SharedFileMembers : Shared file user, group, and invitee membership. Used for
// the results of `listFileMembers` and `listFileMembersContinue`, and used as
// part of the results for `listFileMembersBatch`.
type SharedFileMembers struct {
	// Users : The list of user members of the shared file.
	Users []*UserFileMembershipInfo `json:"users"`
	// Groups : The list of group members of the shared file.
	Groups []*GroupMembershipInfo `json:"groups"`
	// Invitees : The list of invited members of a file, but have not logged in
	// and claimed this.
	Invitees []*InviteeMembershipInfo `json:"invitees"`
	// Cursor : Present if there are additional shared file members that have
	// not been returned yet. Pass the cursor into `listFileMembersContinue` to
	// list additional members.
	Cursor string `json:"cursor,omitempty"`
}

// NewSharedFileMembers returns a new SharedFileMembers instance
func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
	s := new(SharedFileMembers)
	s.Users = Users
	s.Groups = Groups
	s.Invitees = Invitees
	return s
}

// SharedFileMetadata : Properties of the shared file.
type SharedFileMetadata struct {
	// AccessType : The current user's access level for this shared file.
	AccessType *AccessLevel `json:"access_type,omitempty"`
	// Id : The ID of the file.
	Id string `json:"id"`
	// ExpectedLinkMetadata : The expected metadata of the link associated for
	// the file when it is first shared. Absent if the link already exists. This
	// is for an unreleased feature so it may not be returned yet.
	ExpectedLinkMetadata *ExpectedSharedContentLinkMetadata `json:"expected_link_metadata,omitempty"`
	// LinkMetadata : The metadata of the link associated for the file. This is
	// for an unreleased feature so it may not be returned yet.
	LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
	// Name : The name of this file.
	Name string `json:"name"`
	// OwnerDisplayNames : The display names of the users that own the file. If
	// the file is part of a team folder, the display names of the team admins
	// are also included. Absent if the owner display names cannot be fetched.
	OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
	// OwnerTeam : The team that owns the file. This field is not present if the
	// file is not owned by a team.
	OwnerTeam *users.Team `json:"owner_team,omitempty"`
	// ParentSharedFolderId : The ID of the parent shared folder. This field is
	// present only if the file is contained within a shared folder.
	ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
	// PathDisplay : The cased path to be used for display purposes only. In
	// rare instances the casing will not correctly match the user's filesystem,
	// but this behavior will match the path provided in the Core API v1. Absent
	// for unmounted files.
	PathDisplay string `json:"path_display,omitempty"`
	// PathLower : The lower-case full path of this file. Absent for unmounted
	// files.
	PathLower string `json:"path_lower,omitempty"`
	// Permissions : The sharing permissions that requesting user has on this
	// file. This corresponds to the entries given in
	// `GetFileMetadataBatchArg.actions` or `GetFileMetadataArg.actions`.
	Permissions []*FilePermission `json:"permissions,omitempty"`
	// Policy : Policies governing this shared file.
	Policy *FolderPolicy `json:"policy"`
	// PreviewUrl : URL for displaying a web preview of the shared file.
	PreviewUrl string `json:"preview_url"`
	// TimeInvited : Timestamp indicating when the current user was invited to
	// this shared file. If the user was not invited to the shared file, the
	// timestamp will indicate when the user was invited to the parent shared
	// folder. This value may be absent.
	TimeInvited *time.Time `json:"time_invited,omitempty"`
}

// NewSharedFileMetadata returns a new SharedFileMetadata instance
func NewSharedFileMetadata(Id string, Name string, Policy *FolderPolicy, PreviewUrl string) *SharedFileMetadata {
	s := new(SharedFileMetadata)
	s.Id = Id
	s.Name = Name
	s.Policy = Policy
	s.PreviewUrl = PreviewUrl
	return s
}

// SharedFolderAccessError : There is an error accessing the shared folder.
type SharedFolderAccessError struct {
	dropbox.Tagged
}

// Valid tag values for SharedFolderAccessError
const (
	SharedFolderAccessErrorInvalidId       = "invalid_id"
	SharedFolderAccessErrorNotAMember      = "not_a_member"
	SharedFolderAccessErrorEmailUnverified = "email_unverified"
	SharedFolderAccessErrorUnmounted       = "unmounted"
	SharedFolderAccessErrorOther           = "other"
)

// SharedFolderMemberError : has no documentation (yet)
type SharedFolderMemberError struct {
	dropbox.Tagged
	// NoExplicitAccess : The target member only has inherited access to the
	// shared folder.
	NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
}

// Valid tag values for SharedFolderMemberError
const (
	SharedFolderMemberErrorInvalidDropboxId = "invalid_dropbox_id"
	SharedFolderMemberErrorNotAMember       = "not_a_member"
	SharedFolderMemberErrorNoExplicitAccess = "no_explicit_access"
	SharedFolderMemberErrorOther            = "other"
)

// UnmarshalJSON deserializes into a SharedFolderMemberError instance
func (u *SharedFolderMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "no_explicit_access":
		if err = json.Unmarshal(body, &u.NoExplicitAccess); err != nil {
			return err
		}

	}
	return nil
}

// SharedFolderMembers : Shared folder user and group membership.
type SharedFolderMembers struct {
	// Users : The list of user members of the shared folder.
	Users []*UserMembershipInfo `json:"users"`
	// Groups : The list of group members of the shared folder.
	Groups []*GroupMembershipInfo `json:"groups"`
	// Invitees : The list of invitees to the shared folder.
	Invitees []*InviteeMembershipInfo `json:"invitees"`
	// Cursor : Present if there are additional shared folder members that have
	// not been returned yet. Pass the cursor into `listFolderMembersContinue`
	// to list additional members.
	Cursor string `json:"cursor,omitempty"`
}

// NewSharedFolderMembers returns a new SharedFolderMembers instance
func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers {
	s := new(SharedFolderMembers)
	s.Users = Users
	s.Groups = Groups
	s.Invitees = Invitees
	return s
}

// SharedFolderMetadataBase : Properties of the shared folder.
type SharedFolderMetadataBase struct {
	// AccessType : The current user's access level for this shared folder.
	AccessType *AccessLevel `json:"access_type"`
	// IsInsideTeamFolder : Whether this folder is inside of a team folder.
	IsInsideTeamFolder bool `json:"is_inside_team_folder"`
	// IsTeamFolder : Whether this folder is a `team folder`
	// <https://www.dropbox.com/en/help/986>.
	IsTeamFolder bool `json:"is_team_folder"`
	// OwnerDisplayNames : The display names of the users that own the folder.
	// If the folder is part of a team folder, the display names of the team
	// admins are also included. Absent if the owner display names cannot be
	// fetched.
	OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
	// OwnerTeam : The team that owns the folder. This field is not present if
	// the folder is not owned by a team.
	OwnerTeam *users.Team `json:"owner_team,omitempty"`
	// ParentSharedFolderId : The ID of the parent shared folder. This field is
	// present only if the folder is contained within another shared folder.
	ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
	// PathLower : The lower-cased full path of this shared folder. Absent for
	// unmounted folders.
	PathLower string `json:"path_lower,omitempty"`
	// ParentFolderName : Display name for the parent folder.
	ParentFolderName string `json:"parent_folder_name,omitempty"`
}

// NewSharedFolderMetadataBase returns a new SharedFolderMetadataBase instance
func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool) *SharedFolderMetadataBase {
	s := new(SharedFolderMetadataBase)
	s.AccessType = AccessType
	s.IsInsideTeamFolder = IsInsideTeamFolder
	s.IsTeamFolder = IsTeamFolder
	return s
}

// SharedFolderMetadata : The metadata which includes basic information about
// the shared folder.
type SharedFolderMetadata struct {
	SharedFolderMetadataBase
	// LinkMetadata : The metadata of the shared content link to this shared
	// folder. Absent if there is no link on the folder. This is for an
	// unreleased feature so it may not be returned yet.
	LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
	// Name : The name of the this shared folder.
	Name string `json:"name"`
	// Permissions : Actions the current user may perform on the folder and its
	// contents. The set of permissions corresponds to the FolderActions in the
	// request.
	Permissions []*FolderPermission `json:"permissions,omitempty"`
	// Policy : Policies governing this shared folder.
	Policy *FolderPolicy `json:"policy"`
	// PreviewUrl : URL for displaying a web preview of the shared folder.
	PreviewUrl string `json:"preview_url"`
	// SharedFolderId : The ID of the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// TimeInvited : Timestamp indicating when the current user was invited to
	// this shared folder.
	TimeInvited time.Time `json:"time_invited"`
	// AccessInheritance : Whether the folder inherits its members from its
	// parent.
	AccessInheritance *AccessInheritance `json:"access_inheritance"`
}

// NewSharedFolderMetadata returns a new SharedFolderMetadata instance
func NewSharedFolderMetadata(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool, Name string, Policy *FolderPolicy, PreviewUrl string, SharedFolderId string, TimeInvited time.Time) *SharedFolderMetadata {
	s := new(SharedFolderMetadata)
	s.AccessType = AccessType
	s.IsInsideTeamFolder = IsInsideTeamFolder
	s.IsTeamFolder = IsTeamFolder
	s.Name = Name
	s.Policy = Policy
	s.PreviewUrl = PreviewUrl
	s.SharedFolderId = SharedFolderId
	s.TimeInvited = TimeInvited
	s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
	return s
}

// SharedLinkAccessFailureReason : has no documentation (yet)
type SharedLinkAccessFailureReason struct {
	dropbox.Tagged
}

// Valid tag values for SharedLinkAccessFailureReason
const (
	SharedLinkAccessFailureReasonLoginRequired       = "login_required"
	SharedLinkAccessFailureReasonEmailVerifyRequired = "email_verify_required"
	SharedLinkAccessFailureReasonPasswordRequired    = "password_required"
	SharedLinkAccessFailureReasonTeamOnly            = "team_only"
	SharedLinkAccessFailureReasonOwnerOnly           = "owner_only"
	SharedLinkAccessFailureReasonOther               = "other"
)

// SharedLinkAlreadyExistsMetadata : has no documentation (yet)
type SharedLinkAlreadyExistsMetadata struct {
	dropbox.Tagged
	// Metadata : Metadata of the shared link that already exists.
	Metadata IsSharedLinkMetadata `json:"metadata,omitempty"`
}

// Valid tag values for SharedLinkAlreadyExistsMetadata
const (
	SharedLinkAlreadyExistsMetadataMetadata = "metadata"
	SharedLinkAlreadyExistsMetadataOther    = "other"
)

// UnmarshalJSON deserializes into a SharedLinkAlreadyExistsMetadata instance
func (u *SharedLinkAlreadyExistsMetadata) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// Metadata : Metadata of the shared link that already exists.
		Metadata json.RawMessage `json:"metadata,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "metadata":
		if u.Metadata, err = IsSharedLinkMetadataFromJSON(w.Metadata); err != nil {
			return err
		}

	}
	return nil
}

// SharedLinkPolicy : Who can view shared links in this folder.
type SharedLinkPolicy struct {
	dropbox.Tagged
}

// Valid tag values for SharedLinkPolicy
const (
	SharedLinkPolicyAnyone  = "anyone"
	SharedLinkPolicyTeam    = "team"
	SharedLinkPolicyMembers = "members"
	SharedLinkPolicyOther   = "other"
)

// SharedLinkSettings : has no documentation (yet)
type SharedLinkSettings struct {
	// RequirePassword : Boolean flag to enable or disable password protection.
	RequirePassword bool `json:"require_password,omitempty"`
	// LinkPassword : If `require_password` is true, this is needed to specify
	// the password to access the link.
	LinkPassword string `json:"link_password,omitempty"`
	// Expires : Expiration time of the shared link. By default the link won't
	// expire.
	Expires *time.Time `json:"expires,omitempty"`
	// Audience : The new audience who can benefit from the access level
	// specified by the link's access level specified in the `link_access_level`
	// field of `LinkPermissions`. This is used in conjunction with team
	// policies and shared folder policies to determine the final effective
	// audience type in the `effective_audience` field of `LinkPermissions.
	Audience *LinkAudience `json:"audience,omitempty"`
	// Access : Requested access level you want the audience to gain from this
	// link. Note, modifying access level for an existing link is not supported.
	Access *RequestedLinkAccessLevel `json:"access,omitempty"`
	// RequestedVisibility : Use `audience` instead.  The requested access for
	// this shared link.
	RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
	// AllowDownload : Boolean flag to allow or not download capabilities for
	// shared links.
	AllowDownload bool `json:"allow_download,omitempty"`
}

// NewSharedLinkSettings returns a new SharedLinkSettings instance
func NewSharedLinkSettings() *SharedLinkSettings {
	s := new(SharedLinkSettings)
	return s
}

// SharedLinkSettingsError : has no documentation (yet)
type SharedLinkSettingsError struct {
	dropbox.Tagged
}

// Valid tag values for SharedLinkSettingsError
const (
	SharedLinkSettingsErrorInvalidSettings = "invalid_settings"
	SharedLinkSettingsErrorNotAuthorized   = "not_authorized"
)

// SharingFileAccessError : User could not access this file.
type SharingFileAccessError struct {
	dropbox.Tagged
}

// Valid tag values for SharingFileAccessError
const (
	SharingFileAccessErrorNoPermission       = "no_permission"
	SharingFileAccessErrorInvalidFile        = "invalid_file"
	SharingFileAccessErrorIsFolder           = "is_folder"
	SharingFileAccessErrorInsidePublicFolder = "inside_public_folder"
	SharingFileAccessErrorInsideOsxPackage   = "inside_osx_package"
	SharingFileAccessErrorOther              = "other"
)

// SharingUserError : User account had a problem preventing this action.
type SharingUserError struct {
	dropbox.Tagged
}

// Valid tag values for SharingUserError
const (
	SharingUserErrorEmailUnverified = "email_unverified"
	SharingUserErrorOther           = "other"
)

// TeamMemberInfo : Information about a team member.
type TeamMemberInfo struct {
	// TeamInfo : Information about the member's team.
	TeamInfo *users.Team `json:"team_info"`
	// DisplayName : The display name of the user.
	DisplayName string `json:"display_name"`
	// MemberId : ID of user as a member of a team. This field will only be
	// present if the member is in the same team as current user.
	MemberId string `json:"member_id,omitempty"`
}

// NewTeamMemberInfo returns a new TeamMemberInfo instance
func NewTeamMemberInfo(TeamInfo *users.Team, DisplayName string) *TeamMemberInfo {
	s := new(TeamMemberInfo)
	s.TeamInfo = TeamInfo
	s.DisplayName = DisplayName
	return s
}

// TransferFolderArg : has no documentation (yet)
type TransferFolderArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// ToDropboxId : A account or team member ID to transfer ownership to.
	ToDropboxId string `json:"to_dropbox_id"`
}

// NewTransferFolderArg returns a new TransferFolderArg instance
func NewTransferFolderArg(SharedFolderId string, ToDropboxId string) *TransferFolderArg {
	s := new(TransferFolderArg)
	s.SharedFolderId = SharedFolderId
	s.ToDropboxId = ToDropboxId
	return s
}

// TransferFolderError : has no documentation (yet)
type TransferFolderError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for TransferFolderError
const (
	TransferFolderErrorAccessError             = "access_error"
	TransferFolderErrorInvalidDropboxId        = "invalid_dropbox_id"
	TransferFolderErrorNewOwnerNotAMember      = "new_owner_not_a_member"
	TransferFolderErrorNewOwnerUnmounted       = "new_owner_unmounted"
	TransferFolderErrorNewOwnerEmailUnverified = "new_owner_email_unverified"
	TransferFolderErrorTeamFolder              = "team_folder"
	TransferFolderErrorNoPermission            = "no_permission"
	TransferFolderErrorOther                   = "other"
)

// UnmarshalJSON deserializes into a TransferFolderError instance
func (u *TransferFolderError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// UnmountFolderArg : has no documentation (yet)
type UnmountFolderArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
}

// NewUnmountFolderArg returns a new UnmountFolderArg instance
func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg {
	s := new(UnmountFolderArg)
	s.SharedFolderId = SharedFolderId
	return s
}

// UnmountFolderError : has no documentation (yet)
type UnmountFolderError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for UnmountFolderError
const (
	UnmountFolderErrorAccessError    = "access_error"
	UnmountFolderErrorNoPermission   = "no_permission"
	UnmountFolderErrorNotUnmountable = "not_unmountable"
	UnmountFolderErrorOther          = "other"
)

// UnmarshalJSON deserializes into a UnmountFolderError instance
func (u *UnmountFolderError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// UnshareFileArg : Arguments for `unshareFile`.
type UnshareFileArg struct {
	// File : The file to unshare.
	File string `json:"file"`
}

// NewUnshareFileArg returns a new UnshareFileArg instance
func NewUnshareFileArg(File string) *UnshareFileArg {
	s := new(UnshareFileArg)
	s.File = File
	return s
}

// UnshareFileError : Error result for `unshareFile`.
type UnshareFileError struct {
	dropbox.Tagged
	// UserError : has no documentation (yet)
	UserError *SharingUserError `json:"user_error,omitempty"`
	// AccessError : has no documentation (yet)
	AccessError *SharingFileAccessError `json:"access_error,omitempty"`
}

// Valid tag values for UnshareFileError
const (
	UnshareFileErrorUserError   = "user_error"
	UnshareFileErrorAccessError = "access_error"
	UnshareFileErrorOther       = "other"
)

// UnmarshalJSON deserializes into a UnshareFileError instance
func (u *UnshareFileError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// UserError : has no documentation (yet)
		UserError *SharingUserError `json:"user_error,omitempty"`
		// AccessError : has no documentation (yet)
		AccessError *SharingFileAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "user_error":
		u.UserError = w.UserError

	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// UnshareFolderArg : has no documentation (yet)
type UnshareFolderArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// LeaveACopy : If true, members of this shared folder will get a copy of
	// this folder after it's unshared. Otherwise, it will be removed from their
	// Dropbox. The current user, who is an owner, will always retain their
	// copy.
	LeaveACopy bool `json:"leave_a_copy"`
}

// NewUnshareFolderArg returns a new UnshareFolderArg instance
func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg {
	s := new(UnshareFolderArg)
	s.SharedFolderId = SharedFolderId
	s.LeaveACopy = false
	return s
}

// UnshareFolderError : has no documentation (yet)
type UnshareFolderError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for UnshareFolderError
const (
	UnshareFolderErrorAccessError  = "access_error"
	UnshareFolderErrorTeamFolder   = "team_folder"
	UnshareFolderErrorNoPermission = "no_permission"
	UnshareFolderErrorTooManyFiles = "too_many_files"
	UnshareFolderErrorOther        = "other"
)

// UnmarshalJSON deserializes into a UnshareFolderError instance
func (u *UnshareFolderError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// UpdateFileMemberArgs : Arguments for `updateFileMember`.
type UpdateFileMemberArgs struct {
	// File : File for which we are changing a member's access.
	File string `json:"file"`
	// Member : The member whose access we are changing.
	Member *MemberSelector `json:"member"`
	// AccessLevel : The new access level for the member.
	AccessLevel *AccessLevel `json:"access_level"`
}

// NewUpdateFileMemberArgs returns a new UpdateFileMemberArgs instance
func NewUpdateFileMemberArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFileMemberArgs {
	s := new(UpdateFileMemberArgs)
	s.File = File
	s.Member = Member
	s.AccessLevel = AccessLevel
	return s
}

// UpdateFolderMemberArg : has no documentation (yet)
type UpdateFolderMemberArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Member : The member of the shared folder to update.  Only the
	// `MemberSelector.dropbox_id` may be set at this time.
	Member *MemberSelector `json:"member"`
	// AccessLevel : The new access level for `member`. `AccessLevel.owner` is
	// disallowed.
	AccessLevel *AccessLevel `json:"access_level"`
}

// NewUpdateFolderMemberArg returns a new UpdateFolderMemberArg instance
func NewUpdateFolderMemberArg(SharedFolderId string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFolderMemberArg {
	s := new(UpdateFolderMemberArg)
	s.SharedFolderId = SharedFolderId
	s.Member = Member
	s.AccessLevel = AccessLevel
	return s
}

// UpdateFolderMemberError : has no documentation (yet)
type UpdateFolderMemberError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	// MemberError : has no documentation (yet)
	MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
	// NoExplicitAccess : If updating the access type required the member to be
	// added to the shared folder and there was an error when adding the member.
	NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"`
}

// Valid tag values for UpdateFolderMemberError
const (
	UpdateFolderMemberErrorAccessError      = "access_error"
	UpdateFolderMemberErrorMemberError      = "member_error"
	UpdateFolderMemberErrorNoExplicitAccess = "no_explicit_access"
	UpdateFolderMemberErrorInsufficientPlan = "insufficient_plan"
	UpdateFolderMemberErrorNoPermission     = "no_permission"
	UpdateFolderMemberErrorOther            = "other"
)

// UnmarshalJSON deserializes into a UpdateFolderMemberError instance
func (u *UpdateFolderMemberError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
		// MemberError : has no documentation (yet)
		MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
		// NoExplicitAccess : If updating the access type required the member to
		// be added to the shared folder and there was an error when adding the
		// member.
		NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	case "member_error":
		u.MemberError = w.MemberError

	case "no_explicit_access":
		u.NoExplicitAccess = w.NoExplicitAccess

	}
	return nil
}

// UpdateFolderPolicyArg : If any of the policies are unset, then they retain
// their current setting.
type UpdateFolderPolicyArg struct {
	// SharedFolderId : The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// MemberPolicy : Who can be a member of this shared folder. Only applicable
	// if the current user is on a team.
	MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
	// AclUpdatePolicy : Who can add and remove members of this shared folder.
	AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
	// ViewerInfoPolicy : Who can enable/disable viewer info for this shared
	// folder.
	ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
	// SharedLinkPolicy : The policy to apply to shared links created for
	// content inside this shared folder. The current user must be on a team to
	// set this policy to `SharedLinkPolicy.members`.
	SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
	// LinkSettings : Settings on the link for this folder.
	LinkSettings *LinkSettings `json:"link_settings,omitempty"`
	// Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
	// that should appear in the  response's `SharedFolderMetadata.permissions`
	// field describing the actions the  authenticated user can perform on the
	// folder.
	Actions []*FolderAction `json:"actions,omitempty"`
}

// NewUpdateFolderPolicyArg returns a new UpdateFolderPolicyArg instance
func NewUpdateFolderPolicyArg(SharedFolderId string) *UpdateFolderPolicyArg {
	s := new(UpdateFolderPolicyArg)
	s.SharedFolderId = SharedFolderId
	return s
}

// UpdateFolderPolicyError : has no documentation (yet)
type UpdateFolderPolicyError struct {
	dropbox.Tagged
	// AccessError : has no documentation (yet)
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

// Valid tag values for UpdateFolderPolicyError
const (
	UpdateFolderPolicyErrorAccessError                     = "access_error"
	UpdateFolderPolicyErrorNotOnTeam                       = "not_on_team"
	UpdateFolderPolicyErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
	UpdateFolderPolicyErrorDisallowedSharedLinkPolicy      = "disallowed_shared_link_policy"
	UpdateFolderPolicyErrorNoPermission                    = "no_permission"
	UpdateFolderPolicyErrorTeamFolder                      = "team_folder"
	UpdateFolderPolicyErrorOther                           = "other"
)

// UnmarshalJSON deserializes into a UpdateFolderPolicyError instance
func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
	type wrap struct {
		dropbox.Tagged
		// AccessError : has no documentation (yet)
		AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
	}
	var w wrap
	var err error
	if err = json.Unmarshal(body, &w); err != nil {
		return err
	}
	u.Tag = w.Tag
	switch u.Tag {
	case "access_error":
		u.AccessError = w.AccessError

	}
	return nil
}

// UserMembershipInfo : The information about a user member of the shared
// content.
type UserMembershipInfo struct {
	MembershipInfo
	// User : The account information for the membership user.
	User *UserInfo `json:"user"`
}

// NewUserMembershipInfo returns a new UserMembershipInfo instance
func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
	s := new(UserMembershipInfo)
	s.AccessType = AccessType
	s.User = User
	s.IsInherited = false
	return s
}

// UserFileMembershipInfo : The information about a user member of the shared
// content with an appended last seen timestamp.
type UserFileMembershipInfo struct {
	UserMembershipInfo
	// TimeLastSeen : The UTC timestamp of when the user has last seen the
	// content. Only populated if the user has seen the content and the caller
	// has a plan that includes viewer history.
	TimeLastSeen *time.Time `json:"time_last_seen,omitempty"`
	// PlatformType : The platform on which the user has last seen the content,
	// or unknown.
	PlatformType *seen_state.PlatformType `json:"platform_type,omitempty"`
}

// NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance
func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo {
	s := new(UserFileMembershipInfo)
	s.AccessType = AccessType
	s.User = User
	s.IsInherited = false
	return s
}

// UserInfo : Basic information about a user. Use `usersAccount` and
// `usersAccountBatch` to obtain more detailed information.
type UserInfo struct {
	// AccountId : The account ID of the user.
	AccountId string `json:"account_id"`
	// Email : Email address of user.
	Email string `json:"email"`
	// DisplayName : The display name of the user.
	DisplayName string `json:"display_name"`
	// SameTeam : If the user is in the same team as current user.
	SameTeam bool `json:"same_team"`
	// TeamMemberId : The team member ID of the shared folder member. Only
	// present if `same_team` is true.
	TeamMemberId string `json:"team_member_id,omitempty"`
}

// NewUserInfo returns a new UserInfo instance
func NewUserInfo(AccountId string, Email string, DisplayName string, SameTeam bool) *UserInfo {
	s := new(UserInfo)
	s.AccountId = AccountId
	s.Email = Email
	s.DisplayName = DisplayName
	s.SameTeam = SameTeam
	return s
}

// ViewerInfoPolicy : has no documentation (yet)
type ViewerInfoPolicy struct {
	dropbox.Tagged
}

// Valid tag values for ViewerInfoPolicy
const (
	ViewerInfoPolicyEnabled  = "enabled"
	ViewerInfoPolicyDisabled = "disabled"
	ViewerInfoPolicyOther    = "other"
)

// Visibility : Who can access a shared link. The most open visibility is
// `public`. The default depends on many aspects, such as team and user
// preferences and shared folder settings.
type Visibility struct {
	dropbox.Tagged
}

// Valid tag values for Visibility
const (
	VisibilityPublic           = "public"
	VisibilityTeamOnly         = "team_only"
	VisibilityPassword         = "password"
	VisibilityTeamAndPassword  = "team_and_password"
	VisibilitySharedFolderOnly = "shared_folder_only"
	VisibilityOther            = "other"
)

// VisibilityPolicy : has no documentation (yet)
type VisibilityPolicy struct {
	// Policy : This is the value to submit when saving the visibility setting.
	Policy *RequestedVisibility `json:"policy"`
	// ResolvedPolicy : This is what the effective policy would be, if you
	// selected this option. The resolved policy is obtained after considering
	// external effects such as shared folder settings and team policy. This
	// value is guaranteed to be provided.
	ResolvedPolicy *AlphaResolvedVisibility `json:"resolved_policy"`
	// Allowed : Whether the user is permitted to set the visibility to this
	// policy.
	Allowed bool `json:"allowed"`
	// DisallowedReason : If `allowed` is false, this will provide the reason
	// that the user is not permitted to set the visibility to this policy.
	DisallowedReason *VisibilityPolicyDisallowedReason `json:"disallowed_reason,omitempty"`
}

// NewVisibilityPolicy returns a new VisibilityPolicy instance
func NewVisibilityPolicy(Policy *RequestedVisibility, ResolvedPolicy *AlphaResolvedVisibility, Allowed bool) *VisibilityPolicy {
	s := new(VisibilityPolicy)
	s.Policy = Policy
	s.ResolvedPolicy = ResolvedPolicy
	s.Allowed = Allowed
	return s
}