jupiter-api-rs 0.1.0

Jupiter API Client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
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
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
//! Generated types from OpenAPI specification
//!
//! This file contains all the generated types for the API.
//! Do not edit manually - regenerate using the appropriate script.
//! Generated by openapi-to-rust v0.12.2. Source OpenAPI document: openapi/jupiter.yaml
#![allow(clippy::large_enum_variant)]
#![allow(clippy::format_in_format_args)]
#![allow(clippy::let_unit_value)]
#![allow(unreachable_patterns)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct UltraHoldingsResponse {
    ///Total SOL in lamports
    pub amount: String,
    ///Other token holdings organized by mint address as keys
    pub tokens: UltraHoldingsResponseTokens,
    ///Total SOL in UI units after applying decimals
    #[serde(rename = "uiAmount")]
    pub ui_amount: f64,
    ///Total SOL as string in UI units after applying decimals
    #[serde(rename = "uiAmountString")]
    pub ui_amount_string: String,
}
///Other token holdings organized by mint address as keys
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraHoldingsResponseTokens {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<UltraTokenAccount>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct UltraTokenAccount {
    ///The token account address
    pub account: String,
    ///Token amount in atomic/raw units
    pub amount: String,
    ///Number of decimal places for the token
    pub decimals: f64,
    ///Whether this is an associated token account
    #[serde(rename = "isAssociatedTokenAccount")]
    pub is_associated_token_account: bool,
    ///Whether the token account is frozen
    #[serde(rename = "isFrozen")]
    pub is_frozen: bool,
    ///The token program ID
    #[serde(rename = "programId")]
    pub program_id: String,
    ///Token amount in UI units after applying decimals
    #[serde(rename = "uiAmount")]
    pub ui_amount: f64,
    ///Token amount as string in UI units after applying decimals
    #[serde(rename = "uiAmountString")]
    pub ui_amount_string: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TriggerV2ErrorResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub details: Option<TriggerV2ErrorResponseDetails>,
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TriggerV2ErrorResponseDetails {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV2VerificationExpressExecuteResponse {
    ///Error code (present on failure)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub code: Option<f64>,
    ///Error message (present on failure)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Whether a metadata update request was created
    #[serde(rename = "metadataCreated")]
    pub metadata_created: bool,
    ///Transaction signature on-chain (present on success)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    ///Whether the transaction was executed successfully
    pub status: TokensV2VerificationExpressExecuteResponseStatus,
    ///Time taken to execute in milliseconds
    #[serde(rename = "totalTime")]
    pub total_time: f64,
    ///Whether a verification request was created
    #[serde(rename = "verificationCreated")]
    pub verification_created: bool,
}
///Whether the transaction was executed successfully
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TokensV2VerificationExpressExecuteResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl TokensV2VerificationExpressExecuteResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for TokensV2VerificationExpressExecuteResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TokensV2VerificationExpressExecuteResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV2VerificationExpressExecuteBody {
    ///Reason for verification request
    pub description: String,
    ///Atomic JUP output from the craft quote (CraftTxnResponse.amount), echoed back so revenue tracks the actual JUP collected on swap paths.
    #[serde(rename = "jupOutputAmount", skip_serializing_if = "Option::is_none")]
    pub jup_output_amount: Option<String>,
    ///Atomic input amount paid. Required when paymentCurrency is not JUP.
    #[serde(rename = "paymentAmount", skip_serializing_if = "Option::is_none")]
    pub payment_amount: Option<String>,
    #[serde(rename = "paymentCurrency", skip_serializing_if = "Option::is_none")]
    pub payment_currency: Option<TokensV2VerificationPaymentCurrency>,
    ///requestId returned by craft-txn
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Solana wallet address of the sender
    #[serde(rename = "senderAddress")]
    pub sender_address: String,
    ///Twitter/X handle of the submitter (optional)
    #[serde(
        rename = "senderTwitterHandle",
        skip_serializing_if = "Option::is_none"
    )]
    pub sender_twitter_handle: Option<String>,
    ///Token mint address to verify
    #[serde(rename = "tokenId")]
    pub token_id: String,
    #[serde(rename = "tokenMetadata", skip_serializing_if = "Option::is_none")]
    pub token_metadata: Option<TokensV2VerificationTokenMetadataInput>,
    ///Base64-encoded signed transaction from the craft-txn step
    pub transaction: String,
    ///Twitter/X handle of the token project
    #[serde(rename = "twitterHandle")]
    pub twitter_handle: String,
}
impl TokensV2VerificationExpressExecuteBody {
    /// Construct this request with every required wire field.
    pub fn new(
        description: String,
        request_id: String,
        sender_address: String,
        token_id: String,
        transaction: String,
        twitter_handle: String,
    ) -> Self {
        Self {
            description,
            request_id,
            sender_address,
            token_id,
            transaction,
            twitter_handle,
            jup_output_amount: None,
            payment_amount: None,
            payment_currency: None,
            sender_twitter_handle: None,
            token_metadata: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        description: String,
        request_id: String,
        sender_address: String,
        token_id: String,
        transaction: String,
        twitter_handle: String,
    ) -> TokensV2VerificationExpressExecuteBodyBuilder {
        TokensV2VerificationExpressExecuteBodyBuilder::new(
            description,
            request_id,
            sender_address,
            token_id,
            transaction,
            twitter_handle,
        )
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct TokensV2VerificationExpressExecuteBodyBuilder {
    value: TokensV2VerificationExpressExecuteBody,
}
impl TokensV2VerificationExpressExecuteBodyBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        description: String,
        request_id: String,
        sender_address: String,
        token_id: String,
        transaction: String,
        twitter_handle: String,
    ) -> Self {
        Self {
            value: TokensV2VerificationExpressExecuteBody::new(
                description,
                request_id,
                sender_address,
                token_id,
                transaction,
                twitter_handle,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "jupOutputAmount", "` request field.")]
    #[must_use]
    pub fn jup_output_amount(mut self, jup_output_amount: String) -> Self {
        self.value.jup_output_amount = Some(jup_output_amount);
        self
    }
    #[doc = concat!("Set the optional `", "paymentAmount", "` request field.")]
    #[must_use]
    pub fn payment_amount(mut self, payment_amount: String) -> Self {
        self.value.payment_amount = Some(payment_amount);
        self
    }
    #[doc = concat!("Set the optional `", "paymentCurrency", "` request field.")]
    #[must_use]
    pub fn payment_currency(
        mut self,
        payment_currency: TokensV2VerificationPaymentCurrency,
    ) -> Self {
        self.value.payment_currency = Some(payment_currency);
        self
    }
    #[doc = concat!("Set the optional `", "senderTwitterHandle", "` request field.")]
    #[must_use]
    pub fn sender_twitter_handle(mut self, sender_twitter_handle: String) -> Self {
        self.value.sender_twitter_handle = Some(sender_twitter_handle);
        self
    }
    #[doc = concat!("Set the optional `", "tokenMetadata", "` request field.")]
    #[must_use]
    pub fn token_metadata(
        mut self,
        token_metadata: TokensV2VerificationTokenMetadataInput,
    ) -> Self {
        self.value.token_metadata = Some(token_metadata);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> TokensV2VerificationExpressExecuteBody {
        self.value
    }
}
///Optional token metadata to submit alongside verification
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV2VerificationTokenMetadataInput {
    ///Circulating supply value
    #[serde(rename = "circulatingSupply", skip_serializing_if = "Option::is_none")]
    pub circulating_supply: Option<String>,
    ///URL to a live circulating supply endpoint
    #[serde(
        rename = "circulatingSupplyUrl",
        skip_serializing_if = "Option::is_none"
    )]
    pub circulating_supply_url: Option<String>,
    ///CoinGecko coin ID for price data
    #[serde(rename = "coingeckoCoinId", skip_serializing_if = "Option::is_none")]
    pub coingecko_coin_id: Option<String>,
    ///Discord invite URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub discord: Option<String>,
    ///URL to token icon image
    #[serde(skip_serializing_if = "Option::is_none")]
    pub icon: Option<String>,
    ///Instagram profile URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub instagram: Option<String>,
    ///Token display name
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    ///Any other relevant URL
    #[serde(rename = "otherUrl", skip_serializing_if = "Option::is_none")]
    pub other_url: Option<String>,
    ///Token ticker symbol
    #[serde(skip_serializing_if = "Option::is_none")]
    pub symbol: Option<String>,
    ///Telegram group URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub telegram: Option<String>,
    ///TikTok profile URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tiktok: Option<String>,
    ///Short description of the token
    #[serde(rename = "tokenDescription", skip_serializing_if = "Option::is_none")]
    pub token_description: Option<String>,
    ///Token mint address
    #[serde(rename = "tokenId")]
    pub token_id: String,
    ///Twitter/X profile URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub twitter: Option<String>,
    ///Twitter/X community URL
    #[serde(rename = "twitterCommunity", skip_serializing_if = "Option::is_none")]
    pub twitter_community: Option<String>,
    ///Whether to use the provided circulating supply
    #[serde(
        rename = "useCirculatingSupply",
        skip_serializing_if = "Option::is_none"
    )]
    pub use_circulating_supply: Option<bool>,
    ///Whether to use the provided circulating supply URL
    #[serde(
        rename = "useCirculatingSupplyUrl",
        skip_serializing_if = "Option::is_none"
    )]
    pub use_circulating_supply_url: Option<bool>,
    ///Whether to use the provided CoinGecko ID
    #[serde(rename = "useCoingeckoCoinId", skip_serializing_if = "Option::is_none")]
    pub use_coingecko_coin_id: Option<bool>,
    ///Project website URL
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<String>,
}
/**Accepted payment currency, given as a token symbol (not a mint address): JUP, SOL, USDC, or JUPUSD.
All input currencies are converted to 1000 JUP. JUP transfers directly; SOL, USDC, and JUPUSD are
swapped to 1000 JUP via Ultra.
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TokensV2VerificationPaymentCurrency {
    #[default]
    #[serde(rename = "JUP")]
    Jup,
    #[serde(rename = "SOL")]
    Sol,
    #[serde(rename = "USDC")]
    Usdc,
    #[serde(rename = "JUPUSD")]
    Jupusd,
}
impl TokensV2VerificationPaymentCurrency {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Jup => "JUP",
            Self::Sol => "SOL",
            Self::Usdc => "USDC",
            Self::Jupusd => "JUPUSD",
        }
    }
}
impl ::std::fmt::Display for TokensV2VerificationPaymentCurrency {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TokensV2VerificationPaymentCurrency {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1SwapRequest {
    /**- Builds a legacy transaction rather than the default versioned transaction
    - Used together with `asLegacyTransaction` in `/quote`, otherwise the transaction might be too large
    */
    #[serde(
        rename = "asLegacyTransaction",
        skip_serializing_if = "Option::is_none"
    )]
    pub as_legacy_transaction: Option<bool>,
    /**- Pass in the number of slots we want the transaction to be valid for
    - Example: If you pass in 10 slots, the transaction will be valid for ~400ms * 10 = approximately 4 seconds before it expires
    */
    #[serde(
        rename = "blockhashSlotsToExpiry",
        skip_serializing_if = "Option::is_none"
    )]
    pub blockhash_slots_to_expiry: Option<i64>,
    /**- To use an exact compute unit price to calculate priority fee
    - `computeUnitLimit (1400000) * computeUnitPriceMicroLamports`
    - We recommend using `prioritizationFeeLamports` and `dynamicComputeUnitLimit` instead of passing in your own compute unit price
    */
    #[serde(
        rename = "computeUnitPriceMicroLamports",
        skip_serializing_if = "Option::is_none"
    )]
    pub compute_unit_price_micro_lamports: Option<u64>,
    /**- Public key of a token account that will be used to receive the token out of the swap
    - If not provided, the signer's token account will be used
    - If provided, we assume that the token account is already initialized
    - `destinationTokenAccount` and `nativeDestinationAccount` are mutually exclusive
    */
    #[serde(
        rename = "destinationTokenAccount",
        skip_serializing_if = "Option::is_none"
    )]
    pub destination_token_account: Option<String>,
    /**- When enabled, simulates the swap to provide an accurate compute unit limit in the transaction
    - This incurs one extra RPC call to simulate
    - Recommended for all normal flows — reduces priority fees needed and improves transaction landing
    */
    #[serde(
        rename = "dynamicComputeUnitLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub dynamic_compute_unit_limit: Option<bool>,
    /**- When enabled, it estimates slippage and apply it in the swap transaction directly, overwriting the `slippageBps` parameter in the quote response.
    - This is no longer maintained, we are focusing efforts on RTSE on Ultra Swap API
    */
    #[serde(rename = "dynamicSlippage", skip_serializing_if = "Option::is_none")]
    pub dynamic_slippage: Option<bool>,
    /**- An initialized token account that will be used to collect fees
    - The mint of the token account **can only be either the input or output mint of the swap**
    - Swap API no longer requires the use of the Referral Program
    - If `platformFeeBps` is passed in `/quote`, the `feeAccount` must be passed as well
    */
    #[serde(rename = "feeAccount", skip_serializing_if = "Option::is_none")]
    pub fee_account: Option<String>,
    /**- Public key of an account that will be used to receive the native SOL token out of the swap
    - If not provided, the swap will default unwrap the WSOL and transfer the native SOL to the swap authority account
    - If provided, we will unwrap the WSOL and transfer the native SOL to the account
    - Only works if the output mint is SOL, is using the V2 instructions and the account passed in is not owned by token program
    - When sending native SOL to a new account, you must swap at least enough to cover the rent required to create it.
    - `destinationTokenAccount` and `nativeDestinationAccount` are mutually exclusive
    */
    #[serde(
        rename = "nativeDestinationAccount",
        skip_serializing_if = "Option::is_none"
    )]
    pub native_destination_account: Option<String>,
    /**- Allow a custom payer to pay for the transaction fees and rent of token accounts
    - Note that users can close their ATAs elsewhere and have you reopen them again, your fees should account for this
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub payer: Option<String>,
    /**- To specify a level or amount of additional fees to prioritize the transaction
    - It can be used for EITHER priority fee OR Jito tip (not both at the same time)
    - If you want to include both, you will need to use `/swap-instructions` to add both at the same time
    - Defaults to `auto`, but preferred to use `priorityLevelWithMaxLamports` as it may be more accurate when accounting local fee market
    - Fixed lamports can be passed in as an integer in the `prioritizationFeeLamports` parameter
    */
    #[serde(
        rename = "prioritizationFeeLamports",
        skip_serializing_if = "Option::is_none"
    )]
    pub prioritization_fee_lamports: Option<SwapV1SwapRequestPrioritizationFeeLamports>,
    #[serde(rename = "quoteResponse")]
    pub quote_response: SwapV1QuoteResponse,
    /**- When enabled, it will not do any additional RPC calls to check on required accounts
    - The returned swap transaction will still attempt to create required accounts regardless if it exists or not
    */
    #[serde(
        rename = "skipUserAccountsRpcCalls",
        skip_serializing_if = "Option::is_none"
    )]
    pub skip_user_accounts_rpc_calls: Option<bool>,
    /**- Specify any public key that belongs to you to track the transactions
    - Useful for integrators to get all the swap transactions from this public key
    - Query the data using a block explorer like Solscan/SolanaFM or query like Dune/Flipside
    */
    #[serde(rename = "trackingAccount", skip_serializing_if = "Option::is_none")]
    pub tracking_account: Option<String>,
    /**- The default is determined dynamically by the routing engine, allowing us to optimize for compute units, etc
    - This enables the usage of shared program accounts, this is essential as complex routing will require multiple intermediate token accounts which the user might not have
    - If true, you do not need to handle the creation of intermediate token accounts for the user
    - Do note, shared accounts route will fail on some new AMMs (low liquidity token)
    */
    #[serde(rename = "useSharedAccounts", skip_serializing_if = "Option::is_none")]
    pub use_shared_accounts: Option<bool>,
    #[serde(rename = "userPublicKey")]
    pub user_public_key: String,
    /**- To automatically wrap/unwrap SOL in the transaction, as WSOL is an SPL token while native SOL is not
    - When true and input mint is SOL, it will wrap the SOL amount to WSOL and swap
    - When true and output mint is SOL, it will unwrap the WSOL back to SOL
    - When true, the wSOL token account is always closed after the transaction, regardless of whether SOL is the input or output mint
    - When false and input mint is SOL, it will use existing WSOL amount to swap
    - When false and output mint is SOL, it will not unwrap the WSOL to SOL
    - To set this parameter to false, you need to have the WSOL token account initialized
    */
    #[serde(rename = "wrapAndUnwrapSol", skip_serializing_if = "Option::is_none")]
    pub wrap_and_unwrap_sol: Option<bool>,
}
impl SwapV1SwapRequest {
    /// Construct this request with every required wire field.
    pub fn new(quote_response: SwapV1QuoteResponse, user_public_key: String) -> Self {
        Self {
            quote_response,
            user_public_key,
            as_legacy_transaction: None,
            blockhash_slots_to_expiry: None,
            compute_unit_price_micro_lamports: None,
            destination_token_account: None,
            dynamic_compute_unit_limit: None,
            dynamic_slippage: None,
            fee_account: None,
            native_destination_account: None,
            payer: None,
            prioritization_fee_lamports: None,
            skip_user_accounts_rpc_calls: None,
            tracking_account: None,
            use_shared_accounts: None,
            wrap_and_unwrap_sol: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        quote_response: SwapV1QuoteResponse,
        user_public_key: String,
    ) -> SwapV1SwapRequestBuilder {
        SwapV1SwapRequestBuilder::new(quote_response, user_public_key)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct SwapV1SwapRequestBuilder {
    value: SwapV1SwapRequest,
}
impl SwapV1SwapRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(quote_response: SwapV1QuoteResponse, user_public_key: String) -> Self {
        Self {
            value: SwapV1SwapRequest::new(quote_response, user_public_key),
        }
    }
    #[doc = concat!("Set the optional `", "asLegacyTransaction", "` request field.")]
    #[must_use]
    pub fn as_legacy_transaction(mut self, as_legacy_transaction: bool) -> Self {
        self.value.as_legacy_transaction = Some(as_legacy_transaction);
        self
    }
    #[doc = concat!("Set the optional `", "blockhashSlotsToExpiry", "` request field.")]
    #[must_use]
    pub fn blockhash_slots_to_expiry(mut self, blockhash_slots_to_expiry: i64) -> Self {
        self.value.blockhash_slots_to_expiry = Some(blockhash_slots_to_expiry);
        self
    }
    #[doc = concat!(
        "Set the optional `", "computeUnitPriceMicroLamports", "` request field."
    )]
    #[must_use]
    pub fn compute_unit_price_micro_lamports(
        mut self,
        compute_unit_price_micro_lamports: u64,
    ) -> Self {
        self.value.compute_unit_price_micro_lamports = Some(compute_unit_price_micro_lamports);
        self
    }
    #[doc = concat!("Set the optional `", "destinationTokenAccount", "` request field.")]
    #[must_use]
    pub fn destination_token_account(mut self, destination_token_account: String) -> Self {
        self.value.destination_token_account = Some(destination_token_account);
        self
    }
    #[doc = concat!("Set the optional `", "dynamicComputeUnitLimit", "` request field.")]
    #[must_use]
    pub fn dynamic_compute_unit_limit(mut self, dynamic_compute_unit_limit: bool) -> Self {
        self.value.dynamic_compute_unit_limit = Some(dynamic_compute_unit_limit);
        self
    }
    #[doc = concat!("Set the optional `", "dynamicSlippage", "` request field.")]
    #[must_use]
    pub fn dynamic_slippage(mut self, dynamic_slippage: bool) -> Self {
        self.value.dynamic_slippage = Some(dynamic_slippage);
        self
    }
    #[doc = concat!("Set the optional `", "feeAccount", "` request field.")]
    #[must_use]
    pub fn fee_account(mut self, fee_account: String) -> Self {
        self.value.fee_account = Some(fee_account);
        self
    }
    #[doc = concat!(
        "Set the optional `", "nativeDestinationAccount", "` request field."
    )]
    #[must_use]
    pub fn native_destination_account(mut self, native_destination_account: String) -> Self {
        self.value.native_destination_account = Some(native_destination_account);
        self
    }
    #[doc = concat!("Set the optional `", "payer", "` request field.")]
    #[must_use]
    pub fn payer(mut self, payer: String) -> Self {
        self.value.payer = Some(payer);
        self
    }
    #[doc = concat!(
        "Set the optional `", "prioritizationFeeLamports", "` request field."
    )]
    #[must_use]
    pub fn prioritization_fee_lamports(
        mut self,
        prioritization_fee_lamports: SwapV1SwapRequestPrioritizationFeeLamports,
    ) -> Self {
        self.value.prioritization_fee_lamports = Some(prioritization_fee_lamports);
        self
    }
    #[doc = concat!(
        "Set the optional `", "skipUserAccountsRpcCalls", "` request field."
    )]
    #[must_use]
    pub fn skip_user_accounts_rpc_calls(mut self, skip_user_accounts_rpc_calls: bool) -> Self {
        self.value.skip_user_accounts_rpc_calls = Some(skip_user_accounts_rpc_calls);
        self
    }
    #[doc = concat!("Set the optional `", "trackingAccount", "` request field.")]
    #[must_use]
    pub fn tracking_account(mut self, tracking_account: String) -> Self {
        self.value.tracking_account = Some(tracking_account);
        self
    }
    #[doc = concat!("Set the optional `", "useSharedAccounts", "` request field.")]
    #[must_use]
    pub fn use_shared_accounts(mut self, use_shared_accounts: bool) -> Self {
        self.value.use_shared_accounts = Some(use_shared_accounts);
        self
    }
    #[doc = concat!("Set the optional `", "wrapAndUnwrapSol", "` request field.")]
    #[must_use]
    pub fn wrap_and_unwrap_sol(mut self, wrap_and_unwrap_sol: bool) -> Self {
        self.value.wrap_and_unwrap_sol = Some(wrap_and_unwrap_sol);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> SwapV1SwapRequest {
        self.value
    }
}
/**- To specify a level or amount of additional fees to prioritize the transaction
- It can be used for EITHER priority fee OR Jito tip (not both at the same time)
- If you want to include both, you will need to use `/swap-instructions` to add both at the same time
- Defaults to `auto`, but preferred to use `priorityLevelWithMaxLamports` as it may be more accurate when accounting local fee market
- Fixed lamports can be passed in as an integer in the `prioritizationFeeLamports` parameter
*/
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum SwapV1SwapRequestPrioritizationFeeLamports {
    SwapV1PriorityLevelWithMaxLamports(SwapV1PriorityLevelWithMaxLamports),
    SwapV1JitoTipLamports(SwapV1JitoTipLamports),
    SwapV1JitoTipLamportsWithPayer(SwapV1JitoTipLamportsWithPayer),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1JitoTipLamports {
    /**- Exact amount of tip to use in a tip instruction
    - Refer to Jito docs on how to estimate the tip amount based on percentiles
    - It has to be used together with a connection to a Jito RPC
    - See their docs at https://docs.jito.wtf/
    */
    #[serde(rename = "jitoTipLamports")]
    pub jito_tip_lamports: u64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1SwapInstructionsResponse {
    /**- The lookup table addresses if you are using versioned transaction.
     */
    #[serde(rename = "addressLookupTableAddresses")]
    pub address_lookup_table_addresses: Vec<String>,
    #[serde(rename = "cleanupInstruction", skip_serializing_if = "Option::is_none")]
    pub cleanup_instruction: Option<SwapV1Instruction>,
    /**- To setup the compute budget for the transaction.
     */
    #[serde(rename = "computeBudgetInstructions")]
    pub compute_budget_instructions: Vec<SwapV1Instruction>,
    /**- If you set jito tips using the `prioritizationFeeLamports` parameter, you will see a custom tip instruction to Jito here.
     */
    #[serde(rename = "otherInstructions")]
    pub other_instructions: Vec<SwapV1Instruction>,
    /**- To setup required token accounts for the users.
     */
    #[serde(rename = "setupInstructions")]
    pub setup_instructions: Vec<SwapV1Instruction>,
    #[serde(rename = "swapInstruction")]
    pub swap_instruction: SwapV1Instruction,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1QuoteResponse {
    #[serde(rename = "contextSlot", skip_serializing_if = "Option::is_none")]
    pub context_slot: Option<u64>,
    #[serde(rename = "inAmount")]
    pub in_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    /**- Markets that would have quoted for this pair
    - Useful for debugging and verifying route decisions
    - Each key is an AMM account address, each value is the quoted output amount
    */
    #[serde(
        rename = "mostReliableAmmsQuoteReport",
        skip_serializing_if = "Option::is_none"
    )]
    pub most_reliable_amms_quote_report: Option<SwapV1QuoteResponseMostReliableAmmsQuoteReport>,
    /**- Minimum acceptable output amount — `outAmount` after applying `slippageBps` tolerance
    - Not used by `/swap` endpoint to build transaction
    */
    #[serde(rename = "otherAmountThreshold")]
    pub other_amount_threshold: String,
    /**- Best output amount after deducting AMM fees and platform fees
    - Does not account for slippage
    */
    #[serde(rename = "outAmount")]
    pub out_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "platformFee", skip_serializing_if = "Option::is_none")]
    pub platform_fee: Option<SwapV1PlatformFee>,
    #[serde(rename = "priceImpactPct")]
    pub price_impact_pct: String,
    #[serde(rename = "routePlan")]
    pub route_plan: Vec<SwapV1RoutePlanStep>,
    ///Constraint: minimum=0
    #[serde(rename = "slippageBps")]
    pub slippage_bps: i64,
    #[serde(rename = "swapMode")]
    pub swap_mode: SwapV1SwapMode,
    #[serde(rename = "timeTaken", skip_serializing_if = "Option::is_none")]
    pub time_taken: Option<f64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum SwapV1SwapMode {
    #[default]
    #[serde(rename = "ExactIn")]
    ExactIn,
    #[serde(rename = "ExactOut")]
    ExactOut,
}
impl SwapV1SwapMode {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::ExactIn => "ExactIn",
            Self::ExactOut => "ExactOut",
        }
    }
}
impl ::std::fmt::Display for SwapV1SwapMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for SwapV1SwapMode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1RoutePlanStep {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub bps: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub percent: Option<i64>,
    #[serde(rename = "swapInfo")]
    pub swap_info: SwapV1SwapInfo,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1SwapInfo {
    #[serde(rename = "ammKey")]
    pub amm_key: String,
    #[serde(rename = "feeAmount", skip_serializing_if = "Option::is_none")]
    pub fee_amount: Option<String>,
    #[serde(rename = "feeMint", skip_serializing_if = "Option::is_none")]
    pub fee_mint: Option<String>,
    #[serde(rename = "inAmount")]
    pub in_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[serde(rename = "outAmount")]
    pub out_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
}
/**- Markets that would have quoted for this pair
- Useful for debugging and verifying route decisions
- Each key is an AMM account address, each value is the quoted output amount
*/
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV1QuoteResponseMostReliableAmmsQuoteReport {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub info: Option<SwapV1QuoteResponseInfo>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV1QuoteResponseInfo {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV1PlatformFee {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    #[serde(rename = "feeBps", skip_serializing_if = "Option::is_none")]
    pub fee_bps: Option<i64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1PriorityLevelWithMaxLamports {
    #[serde(rename = "priorityLevelWithMaxLamports")]
    pub priority_level_with_max_lamports:
        SwapV1PriorityLevelWithMaxLamportsPriorityLevelWithMaxLamports,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1PriorityLevelWithMaxLamportsPriorityLevelWithMaxLamports {
    /**- A boolean to choose between using a global or local fee market to estimate. If `global` is set to `false`, the estimation focuses on fees relevant to the **writable accounts** involved in the instruction.
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub global: Option<bool>,
    /**- Maximum lamports to cap the priority fee estimation, to prevent overpaying
     */
    #[serde(rename = "maxLamports")]
    pub max_lamports: u64,
    #[serde(rename = "priorityLevel")]
    pub priority_level: SwapV1PriorityLevelWithMaxLamportsPriorityLevel,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum SwapV1PriorityLevelWithMaxLamportsPriorityLevel {
    #[default]
    #[serde(rename = "medium")]
    Medium,
    #[serde(rename = "high")]
    High,
    #[serde(rename = "veryHigh")]
    VeryHigh,
}
impl SwapV1PriorityLevelWithMaxLamportsPriorityLevel {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Medium => "medium",
            Self::High => "high",
            Self::VeryHigh => "veryHigh",
        }
    }
}
impl ::std::fmt::Display for SwapV1PriorityLevelWithMaxLamportsPriorityLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for SwapV1PriorityLevelWithMaxLamportsPriorityLevel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1JitoTipLamportsWithPayer {
    #[serde(rename = "jitoTipLamportsWithPayer")]
    pub jito_tip_lamports_with_payer: SwapV1JitoTipLamportsWithPayerJitoTipLamportsWithPayer,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1JitoTipLamportsWithPayerJitoTipLamportsWithPayer {
    ///Exact amount of lamports to use for the tip
    pub lamports: u64,
    ///Public key of an account that will be used to pay for the tip
    pub payer: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1Instruction {
    pub accounts: Vec<SwapV1AccountMeta>,
    pub data: String,
    #[serde(rename = "programId")]
    pub program_id: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1AccountMeta {
    #[serde(rename = "isSigner")]
    pub is_signer: bool,
    #[serde(rename = "isWritable")]
    pub is_writable: bool,
    pub pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1IndexedRouteMapResponse {
    ///All the possible route and their corresponding output mints
    #[serde(rename = "indexedRouteMap")]
    pub indexed_route_map: SwapV1IndexedRouteMapResponseIndexedRouteMap,
    ///All the mints that are indexed to match in indexedRouteMap
    #[serde(rename = "mintKeys")]
    pub mint_keys: Vec<String>,
}
///All the possible route and their corresponding output mints
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV1IndexedRouteMapResponseIndexedRouteMap {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<f64>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateDBCTransactionRequestBody {
    /**- Enable anti-sniping protection
    - Apply an additional swap fee immediately after launch to discourage bots
    - Starts at 99% and decreases 1% linearly over a randomized period
    */
    #[serde(rename = "antiSniping")]
    pub anti_sniping: bool,
    #[serde(rename = "buildCurveByMarketCapParam")]
    pub build_curve_by_market_cap_param:
        StudioCreateDBCTransactionRequestBodyBuildCurveByMarketCapParam,
    /**- Creator wallet public key
     */
    pub creator: String,
    /**- Fee configuration parameters
    - If not provided, the default fee will be 100 basis points (1%)
    */
    pub fee: StudioCreateDBCTransactionRequestBodyFee,
    /**- Whether LP tokens should be locked
    - If enabled, 50% of graduated LP unlocks after 1 year
    - Useful for creators to strategize in the long term
    */
    #[serde(rename = "isLpLocked", skip_serializing_if = "Option::is_none")]
    pub is_lp_locked: Option<bool>,
    /**- Token image content type
     */
    #[serde(rename = "tokenImageContentType")]
    pub token_image_content_type: StudioCreateDBCTransactionRequestBodyTokenImageContentType,
    ///Constraint: minLength=1
    #[serde(rename = "tokenName")]
    pub token_name: String,
    ///Constraint: minLength=1
    #[serde(rename = "tokenSymbol")]
    pub token_symbol: String,
}
impl StudioCreateDBCTransactionRequestBody {
    /// Construct this request with every required wire field.
    pub fn new(
        anti_sniping: bool,
        build_curve_by_market_cap_param: StudioCreateDBCTransactionRequestBodyBuildCurveByMarketCapParam,
        creator: String,
        fee: StudioCreateDBCTransactionRequestBodyFee,
        token_image_content_type: StudioCreateDBCTransactionRequestBodyTokenImageContentType,
        token_name: String,
        token_symbol: String,
    ) -> Self {
        Self {
            anti_sniping,
            build_curve_by_market_cap_param,
            creator,
            fee,
            token_image_content_type,
            token_name,
            token_symbol,
            is_lp_locked: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        anti_sniping: bool,
        build_curve_by_market_cap_param: StudioCreateDBCTransactionRequestBodyBuildCurveByMarketCapParam,
        creator: String,
        fee: StudioCreateDBCTransactionRequestBodyFee,
        token_image_content_type: StudioCreateDBCTransactionRequestBodyTokenImageContentType,
        token_name: String,
        token_symbol: String,
    ) -> StudioCreateDBCTransactionRequestBodyBuilder {
        StudioCreateDBCTransactionRequestBodyBuilder::new(
            anti_sniping,
            build_curve_by_market_cap_param,
            creator,
            fee,
            token_image_content_type,
            token_name,
            token_symbol,
        )
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct StudioCreateDBCTransactionRequestBodyBuilder {
    value: StudioCreateDBCTransactionRequestBody,
}
impl StudioCreateDBCTransactionRequestBodyBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        anti_sniping: bool,
        build_curve_by_market_cap_param: StudioCreateDBCTransactionRequestBodyBuildCurveByMarketCapParam,
        creator: String,
        fee: StudioCreateDBCTransactionRequestBodyFee,
        token_image_content_type: StudioCreateDBCTransactionRequestBodyTokenImageContentType,
        token_name: String,
        token_symbol: String,
    ) -> Self {
        Self {
            value: StudioCreateDBCTransactionRequestBody::new(
                anti_sniping,
                build_curve_by_market_cap_param,
                creator,
                fee,
                token_image_content_type,
                token_name,
                token_symbol,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "isLpLocked", "` request field.")]
    #[must_use]
    pub fn is_lp_locked(mut self, is_lp_locked: bool) -> Self {
        self.value.is_lp_locked = Some(is_lp_locked);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> StudioCreateDBCTransactionRequestBody {
        self.value
    }
}
/**- Token image content type
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum StudioCreateDBCTransactionRequestBodyTokenImageContentType {
    #[default]
    #[serde(rename = "image/jpeg")]
    ImageJpeg,
    #[serde(rename = "image/png")]
    ImagePng,
    #[serde(rename = "image/gif")]
    ImageGif,
    #[serde(rename = "image/webp")]
    ImageWebp,
}
impl StudioCreateDBCTransactionRequestBodyTokenImageContentType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::ImageJpeg => "image/jpeg",
            Self::ImagePng => "image/png",
            Self::ImageGif => "image/gif",
            Self::ImageWebp => "image/webp",
        }
    }
}
impl ::std::fmt::Display for StudioCreateDBCTransactionRequestBodyTokenImageContentType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for StudioCreateDBCTransactionRequestBodyTokenImageContentType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
/**- Fee configuration parameters
- If not provided, the default fee will be 100 basis points (1%)
*/
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateDBCTransactionRequestBodyFee {
    ///Base fee mode for fee scheduler
    #[serde(rename = "baseFeeMode", skip_serializing_if = "Option::is_none")]
    pub base_fee_mode: Option<StudioCreateDBCTransactionRequestBodyBaseFeeMode>,
    ///Ending fee in basis points (100 or 200)
    #[serde(rename = "feeBps", default)]
    pub fee_bps: f64,
    ///Total duration for fee schedule
    #[serde(rename = "totalDuration", skip_serializing_if = "Option::is_none")]
    pub total_duration: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateDBCTransactionRequestBodyBuildCurveByMarketCapParam {
    /**- Initial market cap in quote token units
    - 16000 passed in = 16000 USDC/SOL/JUP initial market cap
    */
    #[serde(rename = "initialMarketCap")]
    pub initial_market_cap: f64,
    #[serde(rename = "lockedVestingParam")]
    pub locked_vesting_param: StudioCreateDBCTransactionRequestBodyLockedVestingParam,
    /**- Migration market cap in quote token units
    - 69000 passed in = 69000 USDC/SOL/JUP migration market cap
    */
    #[serde(rename = "migrationMarketCap")]
    pub migration_market_cap: f64,
    /**- Quote mint address
    - Either USDC, SOL, or JUP
    */
    #[serde(rename = "quoteMint")]
    pub quote_mint: String,
    /**- Token quote decimal places
     */
    #[serde(rename = "tokenQuoteDecimal")]
    pub token_quote_decimal: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateDBCTransactionRequestBodyLockedVestingParam {
    /**- Cliff duration from migration time in seconds
     */
    #[serde(rename = "cliffDurationFromMigrationTime")]
    pub cliff_duration_from_migration_time: f64,
    /**- Amount of tokens unlocked at cliff
     */
    #[serde(rename = "cliffUnlockAmount")]
    pub cliff_unlock_amount: f64,
    /**- Number of vesting periods in days (183/365) or months (6/12)
     */
    #[serde(rename = "numberOfVestingPeriod")]
    pub number_of_vesting_period: f64,
    /**- Total locked vesting amount of tokens (0% to 80% of total supply)
     */
    #[serde(rename = "totalLockedVestingAmount")]
    pub total_locked_vesting_amount: f64,
    /**- Total vesting duration in seconds
     */
    #[serde(rename = "totalVestingDuration")]
    pub total_vesting_duration: f64,
}
///Base fee mode for fee scheduler
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum StudioCreateDBCTransactionRequestBodyBaseFeeMode {
    #[default]
    #[serde(rename = "linear")]
    Linear,
    #[serde(rename = "exponential")]
    Exponential,
}
impl StudioCreateDBCTransactionRequestBodyBaseFeeMode {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Linear => "linear",
            Self::Exponential => "exponential",
        }
    }
}
impl ::std::fmt::Display for StudioCreateDBCTransactionRequestBodyBaseFeeMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for StudioCreateDBCTransactionRequestBodyBaseFeeMode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SendInviteDataResponse {
    #[serde(rename = "hasMoreData")]
    pub has_more_data: bool,
    pub invites: Vec<SendInviteDataResponseInvitesItem>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SendInviteDataResponseInvitesItem {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub action: Option<String>,
    pub amount: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub confirmed: Option<i64>,
    pub creation_time: String,
    pub creation_tx: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub deletion_time: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub deletion_tx: Option<String>,
    pub expiry: String,
    pub invite_pda: String,
    pub invite_signer: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub receiver: Option<String>,
    pub sender: String,
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringWithdrawPriceRecurring {
    ///If no `amount` is provided, it will withdraw the entire amount
    ///Constraint: minimum=0
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    #[serde(rename = "inputOrOutput")]
    pub input_or_output: RecurringWithdrawal,
    ///Base-58 account which is the Recurring Order account
    pub order: String,
    pub user: String,
}
impl RecurringWithdrawPriceRecurring {
    /// Construct this request with every required wire field.
    pub fn new(input_or_output: RecurringWithdrawal, order: String, user: String) -> Self {
        Self {
            input_or_output,
            order,
            user,
            amount: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        input_or_output: RecurringWithdrawal,
        order: String,
        user: String,
    ) -> RecurringWithdrawPriceRecurringBuilder {
        RecurringWithdrawPriceRecurringBuilder::new(input_or_output, order, user)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct RecurringWithdrawPriceRecurringBuilder {
    value: RecurringWithdrawPriceRecurring,
}
impl RecurringWithdrawPriceRecurringBuilder {
    /// Start a builder with every required wire field.
    pub fn new(input_or_output: RecurringWithdrawal, order: String, user: String) -> Self {
        Self {
            value: RecurringWithdrawPriceRecurring::new(input_or_output, order, user),
        }
    }
    #[doc = concat!("Set the optional `", "amount", "` request field.")]
    #[must_use]
    pub fn amount(mut self, amount: String) -> Self {
        self.value.amount = Some(amount);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> RecurringWithdrawPriceRecurring {
        self.value
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringWithdrawal {
    #[default]
    #[serde(rename = "In")]
    In,
    #[serde(rename = "Out")]
    Out,
}
impl RecurringWithdrawal {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::In => "In",
            Self::Out => "Out",
        }
    }
}
impl ::std::fmt::Display for RecurringWithdrawal {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringWithdrawal {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringRecurringTypeVariant2 {
    pub price: RecurringOpenIxArgsWithoutIdx,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringRecurringTypeVariant {
    pub time: RecurringTimeRecurringCreationParams,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringGetRecurringOrderResponseVariant3 {
    pub all: Vec<RecurringAllRecurringResponse>,
    #[serde(rename = "orderStatus")]
    pub order_status: RecurringOrderState,
    ///Constraint: minimum=1
    pub page: i64,
    ///Constraint: minimum=1
    #[serde(rename = "totalPages")]
    pub total_pages: i64,
    pub user: String,
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringGetRecurringOrderResponseVariant2 {
    #[serde(rename = "orderStatus")]
    pub order_status: RecurringOrderState,
    ///Constraint: minimum=1
    pub page: i64,
    pub price: Vec<RecurringPriceRecurringResponse>,
    ///Constraint: minimum=1
    #[serde(rename = "totalPages")]
    pub total_pages: i64,
    pub user: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringGetRecurringOrderResponseVariant {
    #[serde(rename = "orderStatus")]
    pub order_status: RecurringOrderState,
    ///Constraint: minimum=1
    pub page: i64,
    pub time: Vec<RecurringTimeRecurringResponse>,
    ///Constraint: minimum=1
    #[serde(rename = "totalPages")]
    pub total_pages: i64,
    pub user: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum RecurringGetRecurringOrderResponse {
    RecurringGetRecurringOrderResponseVariant(RecurringGetRecurringOrderResponseVariant),
    RecurringGetRecurringOrderResponseVariant2(RecurringGetRecurringOrderResponseVariant2),
    RecurringGetRecurringOrderResponseVariant3(RecurringGetRecurringOrderResponseVariant3),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringGetRecurringOrderParams {
    #[serde(rename = "includeFailedTx")]
    pub include_failed_tx: bool,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint: Option<String>,
    #[serde(rename = "orderStatus")]
    pub order_status: RecurringOrderState,
    ///Constraint: minimum=1
    #[serde(skip_serializing_if = "Option::is_none")]
    pub page: Option<i64>,
    #[serde(rename = "recurringType")]
    pub recurring_type: RecurringRecurringOrderType,
    pub user: String,
}
/**Type of recurring order.
**DEPRECATED**: The 'price' value is deprecated.
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringRecurringOrderType {
    #[default]
    #[serde(rename = "time")]
    Time,
    #[serde(rename = "price")]
    Price,
    #[serde(rename = "all")]
    All,
}
impl RecurringRecurringOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Time => "time",
            Self::Price => "price",
            Self::All => "all",
        }
    }
}
impl ::std::fmt::Display for RecurringRecurringOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringRecurringOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringOrderState {
    #[default]
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "history")]
    History,
}
impl RecurringOrderState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Active => "active",
            Self::History => "history",
        }
    }
}
impl ::std::fmt::Display for RecurringOrderState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringOrderState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringExecuteRecurringResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Base-58 account which is the Recurring Order account
    #[serde(skip_serializing_if = "Option::is_none")]
    pub order: Option<String>,
    pub signature: String,
    pub status: RecurringExecuteRecurringResponseStatus,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringExecuteRecurringResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl RecurringExecuteRecurringResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for RecurringExecuteRecurringResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringExecuteRecurringResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringCreateRecurring {
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    pub params: RecurringRecurringType,
    pub user: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum RecurringRecurringType {
    RecurringRecurringTypeVariant(RecurringRecurringTypeVariant),
    RecurringRecurringTypeVariant2(RecurringRecurringTypeVariant2),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringTimeRecurringCreationParams {
    ///Constraint: minimum=0
    #[serde(rename = "inAmount")]
    pub in_amount: i64,
    ///In unix seconds
    pub interval: i64,
    #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")]
    pub max_price: Option<f64>,
    #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")]
    pub min_price: Option<f64>,
    ///Constraint: minimum=0
    #[serde(rename = "numberOfOrders")]
    pub number_of_orders: i64,
    ///In unix timestamp
    #[serde(rename = "startAt", skip_serializing_if = "Option::is_none")]
    pub start_at: Option<i64>,
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringOpenIxArgsWithoutIdx {
    ///Constraint: minimum=0
    #[serde(rename = "depositAmount")]
    pub deposit_amount: i64,
    ///Constraint: minimum=0
    #[serde(rename = "incrementUsdcValue")]
    pub increment_usdc_value: i64,
    ///In unix seconds
    pub interval: i64,
    ///In unix timestamp
    #[serde(rename = "startAt", skip_serializing_if = "Option::is_none")]
    pub start_at: Option<i64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringCloseRecurring {
    ///Base-58 account which is the Recurring Order account
    pub order: String,
    #[serde(rename = "recurringType")]
    pub recurring_type: RecurringCloseRecurringType,
    pub user: String,
}
/**- Type of recurring order to close.
- **DEPRECATED**: The 'price' value is deprecated.
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringCloseRecurringType {
    #[default]
    #[serde(rename = "time")]
    Time,
    #[serde(rename = "price")]
    Price,
}
impl RecurringCloseRecurringType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Time => "time",
            Self::Price => "price",
        }
    }
}
impl ::std::fmt::Display for RecurringCloseRecurringType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringCloseRecurringType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringAllRecurringResponseVariant2 {
    #[serde(rename = "closeTx")]
    pub close_tx: String,
    #[serde(rename = "closedBy")]
    pub closed_by: String,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "estimatedUsdcValueSpent")]
    pub estimated_usdc_value_spent: String,
    #[serde(rename = "inDeposited")]
    pub in_deposited: String,
    #[serde(rename = "inLeft")]
    pub in_left: String,
    ///Amount used to fulfill orders
    #[serde(rename = "inUsed")]
    pub in_used: String,
    #[serde(rename = "inWithdrawn")]
    pub in_withdrawn: String,
    #[serde(rename = "incrementalUsdValue")]
    pub incremental_usd_value: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "openTx")]
    pub open_tx: String,
    #[serde(rename = "orderInterval")]
    pub order_interval: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    ///Amount received in escrow without auto-withdraw enabled
    #[serde(rename = "outReceived")]
    pub out_received: String,
    /**Amount withdrawn from escrow account with/without auto-withdraw
    enabled
    */
    #[serde(rename = "outWithdrawn")]
    pub out_withdrawn: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "rawEstimatedUsdcValueSpent")]
    pub raw_estimated_usdc_value_spent: String,
    #[serde(rename = "rawInDeposited")]
    pub raw_in_deposited: String,
    #[serde(rename = "rawInLeft")]
    pub raw_in_left: String,
    ///Amount used to fulfill orders
    #[serde(rename = "rawInUsed")]
    pub raw_in_used: String,
    #[serde(rename = "rawInWithdrawn")]
    pub raw_in_withdrawn: String,
    #[serde(rename = "rawIncrementalUsdValue")]
    pub raw_incremental_usd_value: String,
    ///Amount received in escrow without auto-withdraw enabled
    #[serde(rename = "rawOutReceived")]
    pub raw_out_received: String,
    /**Amount withdrawn from escrow account with/without auto-withdraw
    enabled
    */
    #[serde(rename = "rawOutWithdrawn")]
    pub raw_out_withdrawn: String,
    #[serde(rename = "rawSupposedUsdValue")]
    pub raw_supposed_usd_value: String,
    ///DEPRECATED: Price-based recurring orders are deprecated
    #[serde(rename = "recurringType")]
    pub recurring_type: RecurringAllRecurringResponseVariant2RecurringType,
    #[serde(rename = "startAt")]
    pub start_at: chrono::DateTime<chrono::Utc>,
    pub status: String,
    #[serde(rename = "supposedUsdValue")]
    pub supposed_usd_value: String,
    pub trades: Vec<RecurringOrderHistoryResponse>,
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringAllRecurringResponseVariant {
    #[serde(rename = "closeTx")]
    pub close_tx: String,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "cycleFrequency")]
    pub cycle_frequency: String,
    #[serde(rename = "inAmountPerCycle")]
    pub in_amount_per_cycle: String,
    #[serde(rename = "inDeposited")]
    pub in_deposited: String,
    #[serde(rename = "inUsed")]
    pub in_used: String,
    #[serde(rename = "inWithdrawn")]
    pub in_withdrawn: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "maxOutAmount")]
    pub max_out_amount: String,
    #[serde(rename = "minOutAmount")]
    pub min_out_amount: String,
    #[serde(rename = "openTx")]
    pub open_tx: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    #[serde(rename = "outReceived")]
    pub out_received: String,
    #[serde(rename = "outWithdrawn")]
    pub out_withdrawn: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "rawInAmountPerCycle")]
    pub raw_in_amount_per_cycle: String,
    #[serde(rename = "rawInDeposited")]
    pub raw_in_deposited: String,
    #[serde(rename = "rawInUsed")]
    pub raw_in_used: String,
    #[serde(rename = "rawInWithdrawn")]
    pub raw_in_withdrawn: String,
    #[serde(rename = "rawMaxOutAmount")]
    pub raw_max_out_amount: String,
    #[serde(rename = "rawMinOutAmount")]
    pub raw_min_out_amount: String,
    #[serde(rename = "rawOutReceived")]
    pub raw_out_received: String,
    #[serde(rename = "rawOutWithdrawn")]
    pub raw_out_withdrawn: String,
    #[serde(rename = "recurringType")]
    pub recurring_type: RecurringAllRecurringResponseVariantRecurringType,
    pub trades: Vec<RecurringOrderHistoryResponse>,
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "userClosed")]
    pub user_closed: bool,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum RecurringAllRecurringResponse {
    RecurringAllRecurringResponseVariant(RecurringAllRecurringResponseVariant),
    RecurringAllRecurringResponseVariant2(RecurringAllRecurringResponseVariant2),
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringTimeRecurringResponseRecurringType {
    #[default]
    #[serde(rename = "price")]
    Price,
}
impl RecurringTimeRecurringResponseRecurringType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Price => "price",
        }
    }
}
impl ::std::fmt::Display for RecurringTimeRecurringResponseRecurringType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringTimeRecurringResponseRecurringType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringTimeRecurringResponse {
    #[serde(rename = "closeTx")]
    pub close_tx: String,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "cycleFrequency")]
    pub cycle_frequency: String,
    #[serde(rename = "inAmountPerCycle")]
    pub in_amount_per_cycle: String,
    #[serde(rename = "inDeposited")]
    pub in_deposited: String,
    #[serde(rename = "inUsed")]
    pub in_used: String,
    #[serde(rename = "inWithdrawn")]
    pub in_withdrawn: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "maxOutAmount")]
    pub max_out_amount: String,
    #[serde(rename = "minOutAmount")]
    pub min_out_amount: String,
    #[serde(rename = "openTx")]
    pub open_tx: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    #[serde(rename = "outReceived")]
    pub out_received: String,
    #[serde(rename = "outWithdrawn")]
    pub out_withdrawn: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "rawInAmountPerCycle")]
    pub raw_in_amount_per_cycle: String,
    #[serde(rename = "rawInDeposited")]
    pub raw_in_deposited: String,
    #[serde(rename = "rawInUsed")]
    pub raw_in_used: String,
    #[serde(rename = "rawInWithdrawn")]
    pub raw_in_withdrawn: String,
    #[serde(rename = "rawMaxOutAmount")]
    pub raw_max_out_amount: String,
    #[serde(rename = "rawMinOutAmount")]
    pub raw_min_out_amount: String,
    #[serde(rename = "rawOutReceived")]
    pub raw_out_received: String,
    #[serde(rename = "rawOutWithdrawn")]
    pub raw_out_withdrawn: String,
    pub trades: Vec<RecurringOrderHistoryResponse>,
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "userClosed")]
    pub user_closed: bool,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringPriceRecurringResponse {
    #[serde(rename = "closeTx")]
    pub close_tx: String,
    #[serde(rename = "closedBy")]
    pub closed_by: String,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "estimatedUsdcValueSpent")]
    pub estimated_usdc_value_spent: String,
    #[serde(rename = "inDeposited")]
    pub in_deposited: String,
    #[serde(rename = "inLeft")]
    pub in_left: String,
    ///Amount used to fulfill orders
    #[serde(rename = "inUsed")]
    pub in_used: String,
    #[serde(rename = "inWithdrawn")]
    pub in_withdrawn: String,
    #[serde(rename = "incrementalUsdValue")]
    pub incremental_usd_value: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "openTx")]
    pub open_tx: String,
    #[serde(rename = "orderInterval")]
    pub order_interval: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    ///Amount received in escrow without auto-withdraw enabled
    #[serde(rename = "outReceived")]
    pub out_received: String,
    /**Amount withdrawn from escrow account with/without auto-withdraw
    enabled
    */
    #[serde(rename = "outWithdrawn")]
    pub out_withdrawn: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "rawEstimatedUsdcValueSpent")]
    pub raw_estimated_usdc_value_spent: String,
    #[serde(rename = "rawInDeposited")]
    pub raw_in_deposited: String,
    #[serde(rename = "rawInLeft")]
    pub raw_in_left: String,
    ///Amount used to fulfill orders
    #[serde(rename = "rawInUsed")]
    pub raw_in_used: String,
    #[serde(rename = "rawInWithdrawn")]
    pub raw_in_withdrawn: String,
    #[serde(rename = "rawIncrementalUsdValue")]
    pub raw_incremental_usd_value: String,
    ///Amount received in escrow without auto-withdraw enabled
    #[serde(rename = "rawOutReceived")]
    pub raw_out_received: String,
    /**Amount withdrawn from escrow account with/without auto-withdraw
    enabled
    */
    #[serde(rename = "rawOutWithdrawn")]
    pub raw_out_withdrawn: String,
    #[serde(rename = "rawSupposedUsdValue")]
    pub raw_supposed_usd_value: String,
    #[serde(rename = "startAt")]
    pub start_at: chrono::DateTime<chrono::Utc>,
    pub status: String,
    #[serde(rename = "supposedUsdValue")]
    pub supposed_usd_value: String,
    pub trades: Vec<RecurringOrderHistoryResponse>,
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringOrderHistoryResponse {
    pub action: String,
    #[serde(rename = "confirmedAt")]
    pub confirmed_at: chrono::DateTime<chrono::Utc>,
    #[serde(rename = "feeAmount")]
    pub fee_amount: String,
    #[serde(rename = "feeMint")]
    pub fee_mint: String,
    #[serde(rename = "inputAmount")]
    pub input_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    pub keeper: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    #[serde(rename = "outputAmount")]
    pub output_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    /**Extra metadata for sub-products which will never be queried

    with filters.


    See structs `DbOrderHistoryValueAverageMeta` and
    `DbOrderHistoryPerpetualMeta`

    to craft the JSONB object.
    */
    #[serde(rename = "productMeta", skip_serializing_if = "Option::is_none")]
    pub product_meta: Option<serde_json::Value>,
    #[serde(rename = "rawFeeAmount")]
    pub raw_fee_amount: String,
    #[serde(rename = "rawInputAmount")]
    pub raw_input_amount: String,
    #[serde(rename = "rawOutputAmount")]
    pub raw_output_amount: String,
    #[serde(rename = "txId")]
    pub tx_id: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringAllRecurringResponseVariantRecurringType {
    #[default]
    #[serde(rename = "time")]
    Time,
}
impl RecurringAllRecurringResponseVariantRecurringType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Time => "time",
        }
    }
}
impl ::std::fmt::Display for RecurringAllRecurringResponseVariantRecurringType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringAllRecurringResponseVariantRecurringType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringAllRecurringResponseVariant2RecurringType {
    #[default]
    #[serde(rename = "price")]
    Price,
}
impl RecurringAllRecurringResponseVariant2RecurringType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Price => "price",
        }
    }
}
impl ::std::fmt::Display for RecurringAllRecurringResponseVariant2RecurringType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringAllRecurringResponseVariant2RecurringType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum RecurringAllRecurringResponseRecurringType {
    #[default]
    #[serde(rename = "time")]
    Time,
}
impl RecurringAllRecurringResponseRecurringType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Time => "time",
        }
    }
}
impl ::std::fmt::Display for RecurringAllRecurringResponseRecurringType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for RecurringAllRecurringResponseRecurringType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2PriceResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<PriceV2PriceResponseData>,
    #[serde(rename = "timeTaken", skip_serializing_if = "Option::is_none")]
    pub time_taken: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2PriceResponseData {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, PriceV2TokenPriceInfo>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2TokenPriceInfo {
    #[serde(rename = "extraInfo", skip_serializing_if = "Option::is_none")]
    pub extra_info: Option<PriceV2ExtraInfo>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub price: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2ExtraInfo {
    #[serde(rename = "confidenceLevel", skip_serializing_if = "Option::is_none")]
    pub confidence_level: Option<PriceV2ExtraInfoConfidenceLevel>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub depth: Option<PriceV2Depth>,
    #[serde(rename = "lastSwappedPrice", skip_serializing_if = "Option::is_none")]
    pub last_swapped_price: Option<PriceV2LastSwappedPrice>,
    #[serde(rename = "quotedPrice", skip_serializing_if = "Option::is_none")]
    pub quoted_price: Option<PriceV2QuotedPrice>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2QuotedPrice {
    #[serde(rename = "buyAt", skip_serializing_if = "Option::is_none")]
    pub buy_at: Option<i64>,
    #[serde(rename = "buyPrice", skip_serializing_if = "Option::is_none")]
    pub buy_price: Option<String>,
    #[serde(rename = "sellAt", skip_serializing_if = "Option::is_none")]
    pub sell_at: Option<i64>,
    #[serde(rename = "sellPrice", skip_serializing_if = "Option::is_none")]
    pub sell_price: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2LastSwappedPrice {
    #[serde(rename = "lastJupiterBuyAt", skip_serializing_if = "Option::is_none")]
    pub last_jupiter_buy_at: Option<i64>,
    #[serde(
        rename = "lastJupiterBuyPrice",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_jupiter_buy_price: Option<String>,
    #[serde(rename = "lastJupiterSellAt", skip_serializing_if = "Option::is_none")]
    pub last_jupiter_sell_at: Option<i64>,
    #[serde(
        rename = "lastJupiterSellPrice",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_jupiter_sell_price: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PriceV2ExtraInfoConfidenceLevel {
    #[default]
    #[serde(rename = "high")]
    High,
    #[serde(rename = "medium")]
    Medium,
    #[serde(rename = "low")]
    Low,
}
impl PriceV2ExtraInfoConfidenceLevel {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::High => "high",
            Self::Medium => "medium",
            Self::Low => "low",
        }
    }
}
impl ::std::fmt::Display for PriceV2ExtraInfoConfidenceLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PriceV2ExtraInfoConfidenceLevel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2Depth {
    #[serde(
        rename = "buyPriceImpactRatio",
        skip_serializing_if = "Option::is_none"
    )]
    pub buy_price_impact_ratio: Option<PriceV2PriceImpactRatio>,
    #[serde(
        rename = "sellPriceImpactRatio",
        skip_serializing_if = "Option::is_none"
    )]
    pub sell_price_impact_ratio: Option<PriceV2PriceImpactRatio>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2PriceImpactRatio {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub depth: Option<PriceV2PriceImpactRatioDepth>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<i64>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PriceV2PriceImpactRatioDepth {
    #[serde(rename = "10", skip_serializing_if = "Option::is_none")]
    pub field_10: Option<f64>,
    #[serde(rename = "100", skip_serializing_if = "Option::is_none")]
    pub field_100: Option<f64>,
    #[serde(rename = "1000", skip_serializing_if = "Option::is_none")]
    pub field_1000: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionExecuteResponse {
    ///Error message if the transaction failed, or `null` on success.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Echoed from the request when provided.
    #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
    ///Transaction signature (base58) when execution succeeds.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    ///Transaction execution result.
    pub status: PredictionExecuteResponseStatus,
}
///Transaction execution result.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionExecuteResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl PredictionExecuteResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PredictionExecuteResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionExecuteResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionExecuteRequest {
    ///Optional. The `execution.context` object from the order build, passed unchanged. Validated against the signed transaction when present. For a Forecast swap it carries `jupiterSwapRequestId` and `ownerPubkey`.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub context: Option<PredictionExecuteRequestContext>,
    ///Optional client correlation ID, echoed back in the response.
    #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
    ///Base64-encoded signed transaction from the order build.
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
impl PredictionExecuteRequest {
    /// Construct this request with every required wire field.
    pub fn new(signed_transaction: String) -> Self {
        Self {
            signed_transaction,
            context: None,
            request_id: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(signed_transaction: String) -> PredictionExecuteRequestBuilder {
        PredictionExecuteRequestBuilder::new(signed_transaction)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PredictionExecuteRequestBuilder {
    value: PredictionExecuteRequest,
}
impl PredictionExecuteRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(signed_transaction: String) -> Self {
        Self {
            value: PredictionExecuteRequest::new(signed_transaction),
        }
    }
    #[doc = concat!("Set the optional `", "context", "` request field.")]
    #[must_use]
    pub fn context(mut self, context: PredictionExecuteRequestContext) -> Self {
        self.value.context = Some(context);
        self
    }
    #[doc = concat!("Set the optional `", "requestId", "` request field.")]
    #[must_use]
    pub fn request_id(mut self, request_id: String) -> Self {
        self.value.request_id = Some(request_id);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PredictionExecuteRequest {
        self.value
    }
}
///Optional. The `execution.context` object from the order build, passed unchanged. Validated against the signed transaction when present. For a Forecast swap it carries `jupiterSwapRequestId` and `ownerPubkey`.
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionExecuteRequestContext {
    /// Additional properties not explicitly defined in the schema
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionErrorResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub doc_url: Option<String>,
    pub message: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub param: Option<String>,
    pub request_id: String,
    pub r#type: PredictionErrorResponseType,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionErrorResponseType {
    #[default]
    #[serde(rename = "invalid_request_error")]
    InvalidRequestError,
    #[serde(rename = "authentication_error")]
    AuthenticationError,
    #[serde(rename = "permission_error")]
    PermissionError,
    #[serde(rename = "idempotency_error")]
    IdempotencyError,
    #[serde(rename = "rate_limit_error")]
    RateLimitError,
    #[serde(rename = "api_error")]
    ApiError,
}
impl PredictionErrorResponseType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::InvalidRequestError => "invalid_request_error",
            Self::AuthenticationError => "authentication_error",
            Self::PermissionError => "permission_error",
            Self::IdempotencyError => "idempotency_error",
            Self::RateLimitError => "rate_limit_error",
            Self::ApiError => "api_error",
        }
    }
}
impl ::std::fmt::Display for PredictionErrorResponseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionErrorResponseType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionCreateOrderRequest {
    ///Legacy whole-contract sell quantity (only when `isBuy` is `false`). Cannot express fractions; prefer contractsMicro or contractsDecimal. Provide only one of contracts, contractsMicro, or contractsDecimal.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contracts: Option<PredictionCreateOrderRequestContracts>,
    ///Exact sell quantity as a decimal (e.g. 5.777773). Provide only one of contracts, contractsMicro, or contractsDecimal.
    #[serde(rename = "contractsDecimal", skip_serializing_if = "Option::is_none")]
    pub contracts_decimal: Option<PredictionCreateOrderRequestContractsDecimal>,
    ///Exact sell quantity in micro-contract units (1000000 = 1 contract). Provide only one of contracts, contractsMicro, or contractsDecimal.
    #[serde(rename = "contractsMicro", skip_serializing_if = "Option::is_none")]
    pub contracts_micro: Option<PredictionCreateOrderRequestContractsMicro>,
    ///Amount must conform to the token decimals used by the token mint in `depositMint`
    #[serde(rename = "depositAmount", skip_serializing_if = "Option::is_none")]
    pub deposit_amount: Option<PredictionCreateOrderRequestDepositAmount>,
    ///Mint address for the deposit token
    #[serde(rename = "depositMint", skip_serializing_if = "Option::is_none")]
    pub deposit_mint: Option<String>,
    #[serde(rename = "isBuy")]
    pub is_buy: bool,
    #[serde(rename = "isYes", skip_serializing_if = "Option::is_none")]
    pub is_yes: Option<bool>,
    ///Hashed or canonical market ID for buys
    ///Constraint: minLength=1
    #[serde(rename = "marketId", skip_serializing_if = "Option::is_none")]
    pub market_id: Option<String>,
    ///Order owner public key
    #[serde(rename = "ownerPubkey", skip_serializing_if = "Option::is_none")]
    pub owner_pubkey: Option<String>,
    ///Required for sells
    ///Constraint: minLength=32
    #[serde(rename = "positionPubkey", skip_serializing_if = "Option::is_none")]
    pub position_pubkey: Option<String>,
}
impl PredictionCreateOrderRequest {
    /// Construct this request with every required wire field.
    pub fn new(is_buy: bool) -> Self {
        Self {
            is_buy,
            contracts: None,
            contracts_decimal: None,
            contracts_micro: None,
            deposit_amount: None,
            deposit_mint: None,
            is_yes: None,
            market_id: None,
            owner_pubkey: None,
            position_pubkey: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(is_buy: bool) -> PredictionCreateOrderRequestBuilder {
        PredictionCreateOrderRequestBuilder::new(is_buy)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PredictionCreateOrderRequestBuilder {
    value: PredictionCreateOrderRequest,
}
impl PredictionCreateOrderRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(is_buy: bool) -> Self {
        Self {
            value: PredictionCreateOrderRequest::new(is_buy),
        }
    }
    #[doc = concat!("Set the optional `", "contracts", "` request field.")]
    #[must_use]
    pub fn contracts(mut self, contracts: PredictionCreateOrderRequestContracts) -> Self {
        self.value.contracts = Some(contracts);
        self
    }
    #[doc = concat!("Set the optional `", "contractsDecimal", "` request field.")]
    #[must_use]
    pub fn contracts_decimal(
        mut self,
        contracts_decimal: PredictionCreateOrderRequestContractsDecimal,
    ) -> Self {
        self.value.contracts_decimal = Some(contracts_decimal);
        self
    }
    #[doc = concat!("Set the optional `", "contractsMicro", "` request field.")]
    #[must_use]
    pub fn contracts_micro(
        mut self,
        contracts_micro: PredictionCreateOrderRequestContractsMicro,
    ) -> Self {
        self.value.contracts_micro = Some(contracts_micro);
        self
    }
    #[doc = concat!("Set the optional `", "depositAmount", "` request field.")]
    #[must_use]
    pub fn deposit_amount(
        mut self,
        deposit_amount: PredictionCreateOrderRequestDepositAmount,
    ) -> Self {
        self.value.deposit_amount = Some(deposit_amount);
        self
    }
    #[doc = concat!("Set the optional `", "depositMint", "` request field.")]
    #[must_use]
    pub fn deposit_mint(mut self, deposit_mint: String) -> Self {
        self.value.deposit_mint = Some(deposit_mint);
        self
    }
    #[doc = concat!("Set the optional `", "isYes", "` request field.")]
    #[must_use]
    pub fn is_yes(mut self, is_yes: bool) -> Self {
        self.value.is_yes = Some(is_yes);
        self
    }
    #[doc = concat!("Set the optional `", "marketId", "` request field.")]
    #[must_use]
    pub fn market_id(mut self, market_id: String) -> Self {
        self.value.market_id = Some(market_id);
        self
    }
    #[doc = concat!("Set the optional `", "ownerPubkey", "` request field.")]
    #[must_use]
    pub fn owner_pubkey(mut self, owner_pubkey: String) -> Self {
        self.value.owner_pubkey = Some(owner_pubkey);
        self
    }
    #[doc = concat!("Set the optional `", "positionPubkey", "` request field.")]
    #[must_use]
    pub fn position_pubkey(mut self, position_pubkey: String) -> Self {
        self.value.position_pubkey = Some(position_pubkey);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PredictionCreateOrderRequest {
        self.value
    }
}
///Amount must conform to the token decimals used by the token mint in `depositMint`
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PredictionCreateOrderRequestDepositAmount {
    String(String),
    Number(f64),
}
///Exact sell quantity in micro-contract units (1000000 = 1 contract). Provide only one of contracts, contractsMicro, or contractsDecimal.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PredictionCreateOrderRequestContractsMicro {
    String(String),
    Number(f64),
}
///Exact sell quantity as a decimal (e.g. 5.777773). Provide only one of contracts, contractsMicro, or contractsDecimal.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PredictionCreateOrderRequestContractsDecimal {
    String(String),
    Number(f64),
}
///Legacy whole-contract sell quantity (only when `isBuy` is `false`). Cannot express fractions; prefer contractsMicro or contractsDecimal. Provide only one of contracts, contractsMicro, or contractsDecimal.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PredictionCreateOrderRequestContracts {
    String(String),
    Number(f64),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostUltraV1ExecuteResponse {
    pub code: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(rename = "inputAmountResult", skip_serializing_if = "Option::is_none")]
    pub input_amount_result: Option<String>,
    #[serde(rename = "outputAmountResult", skip_serializing_if = "Option::is_none")]
    pub output_amount_result: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slot: Option<String>,
    pub status: PostUltraV1ExecuteResponseStatus,
    #[serde(rename = "swapEvents", skip_serializing_if = "Option::is_none")]
    pub swap_events: Option<Vec<PostUltraV1ExecuteResponseSwapEventsItem>>,
    #[serde(rename = "totalInputAmount", skip_serializing_if = "Option::is_none")]
    pub total_input_amount: Option<String>,
    #[serde(rename = "totalOutputAmount", skip_serializing_if = "Option::is_none")]
    pub total_output_amount: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostUltraV1ExecuteResponseSwapEventsItem {
    #[serde(rename = "inputAmount")]
    pub input_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "outputAmount")]
    pub output_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostUltraV1ExecuteResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl PostUltraV1ExecuteResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostUltraV1ExecuteResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostUltraV1ExecuteResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersPriceRequest {
    ///From /deposit/craft response
    #[serde(rename = "depositRequestId")]
    pub deposit_request_id: String,
    ///Base64-encoded signed deposit transaction
    #[serde(rename = "depositSignedTx")]
    pub deposit_signed_tx: String,
    ///Expiration timestamp (milliseconds)
    #[serde(rename = "expiresAt")]
    pub expires_at: f64,
    ///Amount in smallest unit
    #[serde(rename = "inputAmount")]
    pub input_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "orderType")]
    pub order_type: PostTriggerV2OrdersPriceRequestOrderType,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    ///Stop-loss price (OCO/OTOCO)
    #[serde(rename = "slPriceUsd", skip_serializing_if = "Option::is_none")]
    pub sl_price_usd: Option<f64>,
    ///Stop-loss slippage (OCO/OTOCO)
    #[serde(rename = "slSlippageBps", skip_serializing_if = "Option::is_none")]
    pub sl_slippage_bps: Option<f64>,
    ///Slippage tolerance (0-10000 bps)
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<f64>,
    ///Take-profit price (OCO/OTOCO)
    #[serde(rename = "tpPriceUsd", skip_serializing_if = "Option::is_none")]
    pub tp_price_usd: Option<f64>,
    ///Take-profit slippage (OCO/OTOCO)
    #[serde(rename = "tpSlippageBps", skip_serializing_if = "Option::is_none")]
    pub tp_slippage_bps: Option<f64>,
    ///Trailing stop loss trail distance in basis points (50-9000). Single orders only; set instead of triggerPriceUsd. Direction from triggerCondition: below = sell-below (triggerMint === inputMint), above = buy-above (triggerMint === outputMint).
    ///Constraint: minimum=50, maximum=9000
    #[serde(rename = "trailingBps", skip_serializing_if = "Option::is_none")]
    pub trailing_bps: Option<f64>,
    ///Single/OTOCO only
    #[serde(rename = "triggerCondition", skip_serializing_if = "Option::is_none")]
    pub trigger_condition: Option<PostTriggerV2OrdersPriceRequestTriggerCondition>,
    ///Token mint to monitor for price
    #[serde(rename = "triggerMint")]
    pub trigger_mint: String,
    ///Single/OTOCO trigger price. For single orders, required unless trailingBps is set.
    #[serde(rename = "triggerPriceUsd", skip_serializing_if = "Option::is_none")]
    pub trigger_price_usd: Option<f64>,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
impl PostTriggerV2OrdersPriceRequest {
    /// Construct this request with every required wire field.
    pub fn new(
        deposit_request_id: String,
        deposit_signed_tx: String,
        expires_at: f64,
        input_amount: String,
        input_mint: String,
        order_type: PostTriggerV2OrdersPriceRequestOrderType,
        output_mint: String,
        trigger_mint: String,
        user_pubkey: String,
    ) -> Self {
        Self {
            deposit_request_id,
            deposit_signed_tx,
            expires_at,
            input_amount,
            input_mint,
            order_type,
            output_mint,
            trigger_mint,
            user_pubkey,
            sl_price_usd: None,
            sl_slippage_bps: None,
            slippage_bps: None,
            tp_price_usd: None,
            tp_slippage_bps: None,
            trailing_bps: None,
            trigger_condition: None,
            trigger_price_usd: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        deposit_request_id: String,
        deposit_signed_tx: String,
        expires_at: f64,
        input_amount: String,
        input_mint: String,
        order_type: PostTriggerV2OrdersPriceRequestOrderType,
        output_mint: String,
        trigger_mint: String,
        user_pubkey: String,
    ) -> PostTriggerV2OrdersPriceRequestBuilder {
        PostTriggerV2OrdersPriceRequestBuilder::new(
            deposit_request_id,
            deposit_signed_tx,
            expires_at,
            input_amount,
            input_mint,
            order_type,
            output_mint,
            trigger_mint,
            user_pubkey,
        )
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV2OrdersPriceRequestBuilder {
    value: PostTriggerV2OrdersPriceRequest,
}
impl PostTriggerV2OrdersPriceRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        deposit_request_id: String,
        deposit_signed_tx: String,
        expires_at: f64,
        input_amount: String,
        input_mint: String,
        order_type: PostTriggerV2OrdersPriceRequestOrderType,
        output_mint: String,
        trigger_mint: String,
        user_pubkey: String,
    ) -> Self {
        Self {
            value: PostTriggerV2OrdersPriceRequest::new(
                deposit_request_id,
                deposit_signed_tx,
                expires_at,
                input_amount,
                input_mint,
                order_type,
                output_mint,
                trigger_mint,
                user_pubkey,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "slPriceUsd", "` request field.")]
    #[must_use]
    pub fn sl_price_usd(mut self, sl_price_usd: f64) -> Self {
        self.value.sl_price_usd = Some(sl_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "slSlippageBps", "` request field.")]
    #[must_use]
    pub fn sl_slippage_bps(mut self, sl_slippage_bps: f64) -> Self {
        self.value.sl_slippage_bps = Some(sl_slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "slippageBps", "` request field.")]
    #[must_use]
    pub fn slippage_bps(mut self, slippage_bps: f64) -> Self {
        self.value.slippage_bps = Some(slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "tpPriceUsd", "` request field.")]
    #[must_use]
    pub fn tp_price_usd(mut self, tp_price_usd: f64) -> Self {
        self.value.tp_price_usd = Some(tp_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "tpSlippageBps", "` request field.")]
    #[must_use]
    pub fn tp_slippage_bps(mut self, tp_slippage_bps: f64) -> Self {
        self.value.tp_slippage_bps = Some(tp_slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "trailingBps", "` request field.")]
    #[must_use]
    pub fn trailing_bps(mut self, trailing_bps: f64) -> Self {
        self.value.trailing_bps = Some(trailing_bps);
        self
    }
    #[doc = concat!("Set the optional `", "triggerCondition", "` request field.")]
    #[must_use]
    pub fn trigger_condition(
        mut self,
        trigger_condition: PostTriggerV2OrdersPriceRequestTriggerCondition,
    ) -> Self {
        self.value.trigger_condition = Some(trigger_condition);
        self
    }
    #[doc = concat!("Set the optional `", "triggerPriceUsd", "` request field.")]
    #[must_use]
    pub fn trigger_price_usd(mut self, trigger_price_usd: f64) -> Self {
        self.value.trigger_price_usd = Some(trigger_price_usd);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV2OrdersPriceRequest {
        self.value
    }
}
///Single/OTOCO only
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2OrdersPriceRequestTriggerCondition {
    #[default]
    #[serde(rename = "above")]
    Above,
    #[serde(rename = "below")]
    Below,
}
impl PostTriggerV2OrdersPriceRequestTriggerCondition {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Above => "above",
            Self::Below => "below",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2OrdersPriceRequestTriggerCondition {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2OrdersPriceRequestTriggerCondition {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2OrdersPriceRequestOrderType {
    #[default]
    #[serde(rename = "single")]
    Single,
    #[serde(rename = "oco")]
    Oco,
    #[serde(rename = "otoco")]
    Otoco,
}
impl PostTriggerV2OrdersPriceRequestOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Single => "single",
            Self::Oco => "oco",
            Self::Otoco => "otoco",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2OrdersPriceRequestOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2OrdersPriceRequestOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersDcaRequest {
    ///ISO-8601 time to start the first round. Defaults to now, max 30 days in the future.
    #[serde(rename = "beginFillAt", skip_serializing_if = "Option::is_none")]
    pub begin_fill_at: Option<String>,
    ///requestId from the deposit craft response
    #[serde(rename = "depositRequestId")]
    pub deposit_request_id: String,
    ///Base64-encoded signed deposit transaction
    #[serde(rename = "depositSignedTx")]
    pub deposit_signed_tx: String,
    ///Total amount to DCA in smallest units. Dust from uneven division is added to the last round.
    #[serde(rename = "inputAmount")]
    pub input_amount: String,
    ///Mint of the token to sell
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    ///Seconds between rounds (60 to 31,536,000, i.e. 1 minute to 1 year)
    ///Constraint: minimum=60, maximum=31536000
    #[serde(rename = "intervalSeconds")]
    pub interval_seconds: f64,
    ///Earn While You Wait. When true, idle funds earn Jupiter Lend yield between rounds. Requires orderType time_based, a supported stablecoin input, and a deposit crafted with jlMint. Default false.
    #[serde(rename = "jlEnabled", skip_serializing_if = "Option::is_none")]
    pub jl_enabled: Option<bool>,
    ///Jupiter Lend earn token for the input stablecoin (from GET /lend/v1/earn/tokens, the address whose assetAddress is the inputMint). Required when jlEnabled is true.
    #[serde(rename = "jlMint", skip_serializing_if = "Option::is_none")]
    pub jl_mint: Option<String>,
    ///Upper USD price bound. Price-conditional only.
    #[serde(rename = "maxPriceUsd", skip_serializing_if = "Option::is_none")]
    pub max_price_usd: Option<f64>,
    ///Lower USD price bound. Price-conditional only.
    #[serde(rename = "minPriceUsd", skip_serializing_if = "Option::is_none")]
    pub min_price_usd: Option<f64>,
    ///Number of rounds to split the deposit into (minimum 2). No fixed upper limit, but each round must be worth at least 10 USD, so the practical maximum is floor(total deposit USD / 10).
    ///Constraint: minimum=2
    #[serde(rename = "orderCount")]
    pub order_count: f64,
    ///time_based runs every interval; price_conditional only fills while the trigger mint price is within the band.
    #[serde(rename = "orderType", skip_serializing_if = "Option::is_none")]
    pub order_type: Option<PostTriggerV2OrdersDcaRequestOrderType>,
    ///Mint of the token to buy
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    ///Mint whose USD price is checked against the band. Required for price_conditional. Must be a mint with a supported USD price (in practice the volatile leg / outputMint); a stablecoin such as USDC returns "Trigger mint is not supported". Ignored for time_based.
    #[serde(rename = "triggerMint", skip_serializing_if = "Option::is_none")]
    pub trigger_mint: Option<String>,
    ///Your wallet public key (must match the JWT)
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
impl PostTriggerV2OrdersDcaRequest {
    /// Construct this request with every required wire field.
    pub fn new(
        deposit_request_id: String,
        deposit_signed_tx: String,
        input_amount: String,
        input_mint: String,
        interval_seconds: f64,
        order_count: f64,
        output_mint: String,
        user_pubkey: String,
    ) -> Self {
        Self {
            deposit_request_id,
            deposit_signed_tx,
            input_amount,
            input_mint,
            interval_seconds,
            order_count,
            output_mint,
            user_pubkey,
            begin_fill_at: None,
            jl_enabled: None,
            jl_mint: None,
            max_price_usd: None,
            min_price_usd: None,
            order_type: None,
            trigger_mint: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        deposit_request_id: String,
        deposit_signed_tx: String,
        input_amount: String,
        input_mint: String,
        interval_seconds: f64,
        order_count: f64,
        output_mint: String,
        user_pubkey: String,
    ) -> PostTriggerV2OrdersDcaRequestBuilder {
        PostTriggerV2OrdersDcaRequestBuilder::new(
            deposit_request_id,
            deposit_signed_tx,
            input_amount,
            input_mint,
            interval_seconds,
            order_count,
            output_mint,
            user_pubkey,
        )
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV2OrdersDcaRequestBuilder {
    value: PostTriggerV2OrdersDcaRequest,
}
impl PostTriggerV2OrdersDcaRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        deposit_request_id: String,
        deposit_signed_tx: String,
        input_amount: String,
        input_mint: String,
        interval_seconds: f64,
        order_count: f64,
        output_mint: String,
        user_pubkey: String,
    ) -> Self {
        Self {
            value: PostTriggerV2OrdersDcaRequest::new(
                deposit_request_id,
                deposit_signed_tx,
                input_amount,
                input_mint,
                interval_seconds,
                order_count,
                output_mint,
                user_pubkey,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "beginFillAt", "` request field.")]
    #[must_use]
    pub fn begin_fill_at(mut self, begin_fill_at: String) -> Self {
        self.value.begin_fill_at = Some(begin_fill_at);
        self
    }
    #[doc = concat!("Set the optional `", "jlEnabled", "` request field.")]
    #[must_use]
    pub fn jl_enabled(mut self, jl_enabled: bool) -> Self {
        self.value.jl_enabled = Some(jl_enabled);
        self
    }
    #[doc = concat!("Set the optional `", "jlMint", "` request field.")]
    #[must_use]
    pub fn jl_mint(mut self, jl_mint: String) -> Self {
        self.value.jl_mint = Some(jl_mint);
        self
    }
    #[doc = concat!("Set the optional `", "maxPriceUsd", "` request field.")]
    #[must_use]
    pub fn max_price_usd(mut self, max_price_usd: f64) -> Self {
        self.value.max_price_usd = Some(max_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "minPriceUsd", "` request field.")]
    #[must_use]
    pub fn min_price_usd(mut self, min_price_usd: f64) -> Self {
        self.value.min_price_usd = Some(min_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "orderType", "` request field.")]
    #[must_use]
    pub fn order_type(mut self, order_type: PostTriggerV2OrdersDcaRequestOrderType) -> Self {
        self.value.order_type = Some(order_type);
        self
    }
    #[doc = concat!("Set the optional `", "triggerMint", "` request field.")]
    #[must_use]
    pub fn trigger_mint(mut self, trigger_mint: String) -> Self {
        self.value.trigger_mint = Some(trigger_mint);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV2OrdersDcaRequest {
        self.value
    }
}
///time_based runs every interval; price_conditional only fills while the trigger mint price is within the band.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2OrdersDcaRequestOrderType {
    #[default]
    #[serde(rename = "time_based")]
    TimeBased,
    #[serde(rename = "price_conditional")]
    PriceConditional,
}
impl PostTriggerV2OrdersDcaRequestOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::TimeBased => "time_based",
            Self::PriceConditional => "price_conditional",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2OrdersDcaRequestOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2OrdersDcaRequestOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2DepositCraftRequest {
    ///Amount in smallest unit (e.g. lamports for SOL)
    pub amount: String,
    ///Mint address of the token to deposit
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    ///For Earn While You Wait DCA orders only. The Jupiter Lend earn token for the input stablecoin (from GET /lend/v1/earn/tokens). Crafts a deposit into Jupiter Lend; the response returns jlTokenAccount instead of inputTokenAccount.
    #[serde(rename = "jlMint", skip_serializing_if = "Option::is_none")]
    pub jl_mint: Option<String>,
    ///Required when orderType is price (single for standalone orders, oco for OCO orders, otoco for OTOCO orders). Must be omitted when orderType is dca.
    #[serde(rename = "orderSubType", skip_serializing_if = "Option::is_none")]
    pub order_sub_type: Option<PostTriggerV2DepositCraftRequestOrderSubType>,
    ///Order type for the deposit. Use price for price trigger orders, or dca for dollar-cost averaging orders.
    #[serde(rename = "orderType")]
    pub order_type: PostTriggerV2DepositCraftRequestOrderType,
    ///Mint address of the desired output token
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    ///Your wallet public key
    #[serde(rename = "userAddress")]
    pub user_address: String,
}
impl PostTriggerV2DepositCraftRequest {
    /// Construct this request with every required wire field.
    pub fn new(
        amount: String,
        input_mint: String,
        order_type: PostTriggerV2DepositCraftRequestOrderType,
        output_mint: String,
        user_address: String,
    ) -> Self {
        Self {
            amount,
            input_mint,
            order_type,
            output_mint,
            user_address,
            jl_mint: None,
            order_sub_type: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        amount: String,
        input_mint: String,
        order_type: PostTriggerV2DepositCraftRequestOrderType,
        output_mint: String,
        user_address: String,
    ) -> PostTriggerV2DepositCraftRequestBuilder {
        PostTriggerV2DepositCraftRequestBuilder::new(
            amount,
            input_mint,
            order_type,
            output_mint,
            user_address,
        )
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV2DepositCraftRequestBuilder {
    value: PostTriggerV2DepositCraftRequest,
}
impl PostTriggerV2DepositCraftRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        amount: String,
        input_mint: String,
        order_type: PostTriggerV2DepositCraftRequestOrderType,
        output_mint: String,
        user_address: String,
    ) -> Self {
        Self {
            value: PostTriggerV2DepositCraftRequest::new(
                amount,
                input_mint,
                order_type,
                output_mint,
                user_address,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "jlMint", "` request field.")]
    #[must_use]
    pub fn jl_mint(mut self, jl_mint: String) -> Self {
        self.value.jl_mint = Some(jl_mint);
        self
    }
    #[doc = concat!("Set the optional `", "orderSubType", "` request field.")]
    #[must_use]
    pub fn order_sub_type(
        mut self,
        order_sub_type: PostTriggerV2DepositCraftRequestOrderSubType,
    ) -> Self {
        self.value.order_sub_type = Some(order_sub_type);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV2DepositCraftRequest {
        self.value
    }
}
///Order type for the deposit. Use price for price trigger orders, or dca for dollar-cost averaging orders.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2DepositCraftRequestOrderType {
    #[default]
    #[serde(rename = "price")]
    Price,
    #[serde(rename = "dca")]
    Dca,
}
impl PostTriggerV2DepositCraftRequestOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Price => "price",
            Self::Dca => "dca",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2DepositCraftRequestOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2DepositCraftRequestOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Required when orderType is price (single for standalone orders, oco for OCO orders, otoco for OTOCO orders). Must be omitted when orderType is dca.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2DepositCraftRequestOrderSubType {
    #[default]
    #[serde(rename = "single")]
    Single,
    #[serde(rename = "oco")]
    Oco,
    #[serde(rename = "otoco")]
    Otoco,
}
impl PostTriggerV2DepositCraftRequestOrderSubType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Single => "single",
            Self::Oco => "oco",
            Self::Otoco => "otoco",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2DepositCraftRequestOrderSubType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2DepositCraftRequestOrderSubType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthVerifyRequestVariant2 {
    ///Base64-encoded signed transaction
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
    pub r#type: PostTriggerV2AuthVerifyRequestVariant2Type,
    #[serde(rename = "walletPubkey")]
    pub wallet_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthVerifyRequestVariant {
    ///Base58-encoded signature
    pub signature: String,
    pub r#type: PostTriggerV2AuthVerifyRequestVariantType,
    #[serde(rename = "walletPubkey")]
    pub wallet_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PostTriggerV2AuthVerifyRequest {
    PostTriggerV2AuthVerifyRequestVariant(PostTriggerV2AuthVerifyRequestVariant),
    PostTriggerV2AuthVerifyRequestVariant2(PostTriggerV2AuthVerifyRequestVariant2),
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthVerifyRequestVariantType {
    #[default]
    #[serde(rename = "message")]
    Message,
}
impl PostTriggerV2AuthVerifyRequestVariantType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Message => "message",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthVerifyRequestVariantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthVerifyRequestVariantType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthVerifyRequestVariant2Type {
    #[default]
    #[serde(rename = "transaction")]
    Transaction,
}
impl PostTriggerV2AuthVerifyRequestVariant2Type {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Transaction => "transaction",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthVerifyRequestVariant2Type {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthVerifyRequestVariant2Type {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthVerifyRequestTypeTransaction {
    #[default]
    #[serde(rename = "transaction")]
    Transaction,
}
impl PostTriggerV2AuthVerifyRequestTypeTransaction {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Transaction => "transaction",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthVerifyRequestTypeTransaction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthVerifyRequestTypeTransaction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthVerifyRequestType {
    #[default]
    #[serde(rename = "message")]
    Message,
}
impl PostTriggerV2AuthVerifyRequestType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Message => "message",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthVerifyRequestType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthVerifyRequestType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthChallengeResponseVariant2 {
    ///Base64-encoded transaction with memo instruction
    pub transaction: String,
    pub r#type: PostTriggerV2AuthChallengeResponseVariant2Type,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthChallengeResponseVariant {
    ///Message to sign
    pub challenge: String,
    pub r#type: PostTriggerV2AuthChallengeResponseVariantType,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PostTriggerV2AuthChallengeResponse {
    PostTriggerV2AuthChallengeResponseVariant(PostTriggerV2AuthChallengeResponseVariant),
    PostTriggerV2AuthChallengeResponseVariant2(PostTriggerV2AuthChallengeResponseVariant2),
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthChallengeResponseVariantType {
    #[default]
    #[serde(rename = "message")]
    Message,
}
impl PostTriggerV2AuthChallengeResponseVariantType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Message => "message",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthChallengeResponseVariantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthChallengeResponseVariantType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthChallengeResponseVariant2Type {
    #[default]
    #[serde(rename = "transaction")]
    Transaction,
}
impl PostTriggerV2AuthChallengeResponseVariant2Type {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Transaction => "transaction",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthChallengeResponseVariant2Type {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthChallengeResponseVariant2Type {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthChallengeResponseTypeTransaction {
    #[default]
    #[serde(rename = "transaction")]
    Transaction,
}
impl PostTriggerV2AuthChallengeResponseTypeTransaction {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Transaction => "transaction",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthChallengeResponseTypeTransaction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthChallengeResponseTypeTransaction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthChallengeResponseType {
    #[default]
    #[serde(rename = "message")]
    Message,
}
impl PostTriggerV2AuthChallengeResponseType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Message => "message",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthChallengeResponseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthChallengeResponseType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthChallengeRequest {
    ///Challenge type. Use `transaction` for hardware wallets.
    pub r#type: PostTriggerV2AuthChallengeRequestType,
    ///Your Solana wallet public key
    #[serde(rename = "walletPubkey")]
    pub wallet_pubkey: String,
}
///Challenge type. Use `transaction` for hardware wallets.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV2AuthChallengeRequestType {
    #[default]
    #[serde(rename = "message")]
    Message,
    #[serde(rename = "transaction")]
    Transaction,
}
impl PostTriggerV2AuthChallengeRequestType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Message => "message",
            Self::Transaction => "transaction",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV2AuthChallengeRequestType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV2AuthChallengeRequestType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1ExecuteResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1ExecuteResponse500Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1ExecuteResponse500Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1ExecuteResponse500Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1ExecuteResponse500Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1ExecuteResponse500Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1ExecuteResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1ExecuteResponse400Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1ExecuteResponse400Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1ExecuteResponse400Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1ExecuteResponse400Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1ExecuteResponse400Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1ExecuteResponse {
    pub code: f64,
    ///Signature of the successful transaction
    pub signature: String,
    pub status: PostTriggerV1ExecuteResponseStatus,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1ExecuteResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1ExecuteResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1ExecuteResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1ExecuteResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CreateOrderResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CreateOrderResponse500Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CreateOrderResponse500Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CreateOrderResponse500Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CreateOrderResponse500Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CreateOrderResponse500Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CreateOrderResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CreateOrderResponse400Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CreateOrderResponse400Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CreateOrderResponse400Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CreateOrderResponse400Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CreateOrderResponse400Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CreateOrderRequest {
    /**In microlamports, defaults to 95th percentile of priority fees
     */
    #[serde(rename = "computeUnitPrice", skip_serializing_if = "Option::is_none")]
    pub compute_unit_price: Option<String>,
    /**- A token account (via the Referral Program) that will receive the fees
    - Refer to [Referral Program Github](https://github.com/TeamRaccoons/referral/tree/main) for more information
    */
    #[serde(rename = "feeAccount", skip_serializing_if = "Option::is_none")]
    pub fee_account: Option<String>,
    #[serde(rename = "inputMint", default)]
    pub input_mint: String,
    #[serde(default)]
    pub maker: String,
    #[serde(rename = "outputMint", default)]
    pub output_mint: String,
    pub params: PostTriggerV1CreateOrderRequestParams,
    #[serde(default)]
    pub payer: String,
    ///If either input or output mint is native SOL
    #[serde(rename = "wrapAndUnwrapSol", skip_serializing_if = "Option::is_none")]
    pub wrap_and_unwrap_sol: Option<bool>,
}
impl PostTriggerV1CreateOrderRequest {
    /// Construct this request with every required wire field.
    pub fn new(
        input_mint: String,
        maker: String,
        output_mint: String,
        params: PostTriggerV1CreateOrderRequestParams,
        payer: String,
    ) -> Self {
        Self {
            input_mint,
            maker,
            output_mint,
            params,
            payer,
            compute_unit_price: None,
            fee_account: None,
            wrap_and_unwrap_sol: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        input_mint: String,
        maker: String,
        output_mint: String,
        params: PostTriggerV1CreateOrderRequestParams,
        payer: String,
    ) -> PostTriggerV1CreateOrderRequestBuilder {
        PostTriggerV1CreateOrderRequestBuilder::new(input_mint, maker, output_mint, params, payer)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV1CreateOrderRequestBuilder {
    value: PostTriggerV1CreateOrderRequest,
}
impl PostTriggerV1CreateOrderRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        input_mint: String,
        maker: String,
        output_mint: String,
        params: PostTriggerV1CreateOrderRequestParams,
        payer: String,
    ) -> Self {
        Self {
            value: PostTriggerV1CreateOrderRequest::new(
                input_mint,
                maker,
                output_mint,
                params,
                payer,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "computeUnitPrice", "` request field.")]
    #[must_use]
    pub fn compute_unit_price(mut self, compute_unit_price: String) -> Self {
        self.value.compute_unit_price = Some(compute_unit_price);
        self
    }
    #[doc = concat!("Set the optional `", "feeAccount", "` request field.")]
    #[must_use]
    pub fn fee_account(mut self, fee_account: String) -> Self {
        self.value.fee_account = Some(fee_account);
        self
    }
    #[doc = concat!("Set the optional `", "wrapAndUnwrapSol", "` request field.")]
    #[must_use]
    pub fn wrap_and_unwrap_sol(mut self, wrap_and_unwrap_sol: bool) -> Self {
        self.value.wrap_and_unwrap_sol = Some(wrap_and_unwrap_sol);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV1CreateOrderRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CreateOrderRequestParams {
    #[serde(rename = "expiredAt", skip_serializing_if = "Option::is_none")]
    pub expired_at: Option<String>,
    /**Requires the `feeAccount` parameter, the amount of fees in bps that will be sent to the fee account
     */
    #[serde(rename = "feeBps", skip_serializing_if = "Option::is_none")]
    pub fee_bps: Option<String>,
    ///Amount of input mint to swap
    #[serde(rename = "makingAmount", default)]
    pub making_amount: String,
    /**Amount of slippage the order can be executed with
     */
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<String>,
    ///Amount of output mint to receive
    #[serde(rename = "takingAmount", default)]
    pub taking_amount: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrdersResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CancelOrdersResponse500Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CancelOrdersResponse500Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CancelOrdersResponse500Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CancelOrdersResponse500Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CancelOrdersResponse500Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrdersResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CancelOrdersResponse400Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CancelOrdersResponse400Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CancelOrdersResponse400Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CancelOrdersResponse400Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CancelOrdersResponse400Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrderResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CancelOrderResponse500Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CancelOrderResponse500Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CancelOrderResponse500Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CancelOrderResponse500Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CancelOrderResponse500Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrderResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    pub code: f64,
    pub error: String,
    ///Signature of the transaction, if generated
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostTriggerV1CancelOrderResponse400Status>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostTriggerV1CancelOrderResponse400Status {
    #[default]
    #[serde(rename = "Failed")]
    Failed,
}
impl PostTriggerV1CancelOrderResponse400Status {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostTriggerV1CancelOrderResponse400Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostTriggerV1CancelOrderResponse400Status {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcPoolSubmitResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<PostStudioV1DbcPoolSubmitResponseData>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcPoolSubmitResponseData {
    #[serde(rename = "configKey", skip_serializing_if = "Option::is_none")]
    pub config_key: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<PostStudioV1DbcFeeResponse400Errors>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeResponse400Errors {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<String>>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeCreateTxResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<PostStudioV1DbcFeeCreateTxResponse400Errors>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeCreateTxResponse400Errors {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<String>>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostExecuteResponse {
    /**- Error code. 0 = success.
    - Ultra: -1 (missing cached order), -2 (invalid signed tx), -3 (invalid message bytes).
    - Aggregator: -1000 (failed to land), -1001 (unknown), -1002 (invalid tx), -1003 (not fully signed), -1004 (invalid block height).
    - RFQ: -2000 (failed to land), -2001 (unknown), -2002 (invalid payload), -2003 (quote expired), -2004 (swap rejected).
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub code: Option<f64>,
    ///Error message (present if Failed)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Input amount that went into the swap route, after any fee collected in the input mint
    #[serde(rename = "inputAmountResult", skip_serializing_if = "Option::is_none")]
    pub input_amount_result: Option<String>,
    ///Output amount produced by the swap route, before any fee collected in the output mint
    #[serde(rename = "outputAmountResult", skip_serializing_if = "Option::is_none")]
    pub output_amount_result: Option<String>,
    ///Transaction signature
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
    ///Confirmed slot
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slot: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<PostExecuteResponseStatus>,
    #[serde(rename = "swapEvents", skip_serializing_if = "Option::is_none")]
    pub swap_events: Option<Vec<SwapV2SwapEvent>>,
    ///Total input token amount deducted from the user's wallet, including the fee if feeMint is the input mint
    #[serde(rename = "totalInputAmount", skip_serializing_if = "Option::is_none")]
    pub total_input_amount: Option<String>,
    ///Final output token amount reflected in the user's wallet, after any fee collected in the output mint
    #[serde(rename = "totalOutputAmount", skip_serializing_if = "Option::is_none")]
    pub total_output_amount: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV2SwapEvent {
    #[serde(rename = "inputAmount", skip_serializing_if = "Option::is_none")]
    pub input_amount: Option<String>,
    #[serde(rename = "inputMint", skip_serializing_if = "Option::is_none")]
    pub input_mint: Option<String>,
    #[serde(rename = "outputAmount", skip_serializing_if = "Option::is_none")]
    pub output_amount: Option<String>,
    #[serde(rename = "outputMint", skip_serializing_if = "Option::is_none")]
    pub output_mint: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PostExecuteResponseStatus {
    #[default]
    #[serde(rename = "Success")]
    Success,
    #[serde(rename = "Failed")]
    Failed,
}
impl PostExecuteResponseStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "Success",
            Self::Failed => "Failed",
        }
    }
}
impl ::std::fmt::Display for PostExecuteResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PostExecuteResponseStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PatchTriggerV2OrdersPriceOrderIdRequest {
    #[serde(rename = "orderType")]
    pub order_type: PatchTriggerV2OrdersPriceOrderIdRequestOrderType,
    #[serde(rename = "slPriceUsd", skip_serializing_if = "Option::is_none")]
    pub sl_price_usd: Option<f64>,
    #[serde(rename = "slSlippageBps", skip_serializing_if = "Option::is_none")]
    pub sl_slippage_bps: Option<f64>,
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<f64>,
    #[serde(rename = "tpPriceUsd", skip_serializing_if = "Option::is_none")]
    pub tp_price_usd: Option<f64>,
    #[serde(rename = "tpSlippageBps", skip_serializing_if = "Option::is_none")]
    pub tp_slippage_bps: Option<f64>,
    ///New trailing stop loss trail distance in basis points (50-9000), for an order that is already trailing.
    ///Constraint: minimum=50, maximum=9000
    #[serde(rename = "trailingBps", skip_serializing_if = "Option::is_none")]
    pub trailing_bps: Option<f64>,
    ///New trigger price. Cannot be set on a trailing stop loss order.
    #[serde(rename = "triggerPriceUsd", skip_serializing_if = "Option::is_none")]
    pub trigger_price_usd: Option<f64>,
}
impl PatchTriggerV2OrdersPriceOrderIdRequest {
    /// Construct this request with every required wire field.
    pub fn new(order_type: PatchTriggerV2OrdersPriceOrderIdRequestOrderType) -> Self {
        Self {
            order_type,
            sl_price_usd: None,
            sl_slippage_bps: None,
            slippage_bps: None,
            tp_price_usd: None,
            tp_slippage_bps: None,
            trailing_bps: None,
            trigger_price_usd: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        order_type: PatchTriggerV2OrdersPriceOrderIdRequestOrderType,
    ) -> PatchTriggerV2OrdersPriceOrderIdRequestBuilder {
        PatchTriggerV2OrdersPriceOrderIdRequestBuilder::new(order_type)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PatchTriggerV2OrdersPriceOrderIdRequestBuilder {
    value: PatchTriggerV2OrdersPriceOrderIdRequest,
}
impl PatchTriggerV2OrdersPriceOrderIdRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(order_type: PatchTriggerV2OrdersPriceOrderIdRequestOrderType) -> Self {
        Self {
            value: PatchTriggerV2OrdersPriceOrderIdRequest::new(order_type),
        }
    }
    #[doc = concat!("Set the optional `", "slPriceUsd", "` request field.")]
    #[must_use]
    pub fn sl_price_usd(mut self, sl_price_usd: f64) -> Self {
        self.value.sl_price_usd = Some(sl_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "slSlippageBps", "` request field.")]
    #[must_use]
    pub fn sl_slippage_bps(mut self, sl_slippage_bps: f64) -> Self {
        self.value.sl_slippage_bps = Some(sl_slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "slippageBps", "` request field.")]
    #[must_use]
    pub fn slippage_bps(mut self, slippage_bps: f64) -> Self {
        self.value.slippage_bps = Some(slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "tpPriceUsd", "` request field.")]
    #[must_use]
    pub fn tp_price_usd(mut self, tp_price_usd: f64) -> Self {
        self.value.tp_price_usd = Some(tp_price_usd);
        self
    }
    #[doc = concat!("Set the optional `", "tpSlippageBps", "` request field.")]
    #[must_use]
    pub fn tp_slippage_bps(mut self, tp_slippage_bps: f64) -> Self {
        self.value.tp_slippage_bps = Some(tp_slippage_bps);
        self
    }
    #[doc = concat!("Set the optional `", "trailingBps", "` request field.")]
    #[must_use]
    pub fn trailing_bps(mut self, trailing_bps: f64) -> Self {
        self.value.trailing_bps = Some(trailing_bps);
        self
    }
    #[doc = concat!("Set the optional `", "triggerPriceUsd", "` request field.")]
    #[must_use]
    pub fn trigger_price_usd(mut self, trigger_price_usd: f64) -> Self {
        self.value.trigger_price_usd = Some(trigger_price_usd);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PatchTriggerV2OrdersPriceOrderIdRequest {
        self.value
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PatchTriggerV2OrdersPriceOrderIdRequestOrderType {
    #[default]
    #[serde(rename = "single")]
    Single,
    #[serde(rename = "oco")]
    Oco,
    #[serde(rename = "otoco")]
    Otoco,
}
impl PatchTriggerV2OrdersPriceOrderIdRequestOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Single => "single",
            Self::Oco => "oco",
            Self::Otoco => "otoco",
        }
    }
}
impl ::std::fmt::Display for PatchTriggerV2OrdersPriceOrderIdRequestOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PatchTriggerV2OrdersPriceOrderIdRequestOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
pub type ListBorrowVaultsResponse = Vec<LendBorrowBorrowVault>;
pub type ListBorrowPositionsResponse = Vec<LendBorrowBorrowPosition>;
pub type LendUserPositionsResponse = Vec<LendUserPosition>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendUserPosition {
    pub allowance: String,
    /**- Address of user's wallet
     */
    #[serde(rename = "ownerAddress")]
    pub owner_address: String,
    /**- Balance of user's jlTokens
     */
    pub shares: String,
    pub token: LendTokenInfo,
    /**- Balance of user's USDC in protocol (including intereste accured)
     */
    #[serde(rename = "underlyingAssets")]
    pub underlying_assets: String,
    /**- Balance of user's USDC in wallet
     */
    #[serde(rename = "underlyingBalance")]
    pub underlying_balance: String,
}
pub type LendTokensResponse = Vec<LendTokenInfo>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendTokenInfo {
    /**- Lending token address like `9BEcn9aPEmhSPbPQeFGjidRiEKki46fVQDyPpSQXPA2D`
     */
    pub address: String,
    pub asset: LendAssetInfo,
    /**- Lending token underlying asset address like `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`
     */
    #[serde(rename = "assetAddress")]
    pub asset_address: String,
    /**- Value of one 1 jlToken token to underlying mint, like 1 jlUSDC = X USDC
    - Used for conversion
    */
    #[serde(rename = "convertToAssets")]
    pub convert_to_assets: String,
    /**- Value of one 1 underlying token to jlToken, like 1 USDC = X jlUSDC
    - Used for conversion
    */
    #[serde(rename = "convertToShares")]
    pub convert_to_shares: String,
    pub decimals: i64,
    /**- Lending ID, starts from `1`
     */
    pub id: i64,
    #[serde(rename = "liquiditySupplyData")]
    pub liquidity_supply_data: LendLiquiditySupplyData,
    /**- Lending token name like Jupiter Lend USDC
     */
    pub name: String,
    #[serde(rename = "rebalanceDifference")]
    pub rebalance_difference: String,
    /**- Rewards rate , in 1e4 decimals
     */
    #[serde(rename = "rewardsRate")]
    pub rewards_rate: String,
    /**- Supply rate, in 1e4 decimals
     */
    #[serde(rename = "supplyRate")]
    pub supply_rate: String,
    /**- Lending token symbol like jlUSDC
     */
    pub symbol: String,
    /**- Total available underlying mint from jlTokens (with accured interest)
     */
    #[serde(rename = "totalAssets")]
    pub total_assets: String,
    /**- Total sum of rewards + supply rate
     */
    #[serde(rename = "totalRate")]
    pub total_rate: String,
    /**- Total supply of jlTokens for this mint
     */
    #[serde(rename = "totalSupply")]
    pub total_supply: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendLiquiditySupplyData {
    #[serde(rename = "baseWithdrawalLimit")]
    pub base_withdrawal_limit: String,
    #[serde(rename = "expandDuration")]
    pub expand_duration: String,
    #[serde(rename = "expandPercent")]
    pub expand_percent: String,
    /**- When was the reserve last updated
     */
    #[serde(rename = "lastUpdateTimestamp")]
    pub last_update_timestamp: String,
    /**- The underlying asset is earning interest at liquidity layer
     */
    #[serde(rename = "modeWithInterest")]
    pub mode_with_interest: bool,
    /**- Total supply of underlying asset on liquidity layer
    - In decimals, like 3168044480191 / 1e6 for USDC
    */
    pub supply: String,
    /**- Total amount withdrawable at this current point, it expands every second.
     */
    pub withdrawable: String,
    #[serde(rename = "withdrawableUntilLimit")]
    pub withdrawable_until_limit: String,
    /**- Available withdrawal limit for this asset
     */
    #[serde(rename = "withdrawalLimit")]
    pub withdrawal_limit: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendAssetInfo {
    /**- Lending token underlying asset address like `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`
     */
    pub address: String,
    /**- Lending token underlying asset chain id like `solana`
     */
    pub chain_id: String,
    pub coingecko_id: String,
    pub decimals: i64,
    pub logo_url: url::Url,
    pub name: String,
    pub price: String,
    pub symbol: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendInstructionResponse {
    pub accounts: Vec<LendAccountMeta>,
    pub data: String,
    #[serde(rename = "programId")]
    pub program_id: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendAccountMeta {
    #[serde(rename = "isSigner")]
    pub is_signer: bool,
    #[serde(rename = "isWritable")]
    pub is_writable: bool,
    pub pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowOperateInstructionsResponse {
    #[serde(rename = "addressLookupTableAddresses")]
    pub address_lookup_table_addresses: Vec<String>,
    pub instructions: Vec<LendBorrowSolanaInstruction>,
    #[serde(rename = "nftId")]
    pub nft_id: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowSolanaInstruction {
    pub accounts: Vec<LendBorrowSolanaAccountMeta>,
    ///Base64-encoded instruction data.
    pub data: String,
    #[serde(rename = "programId")]
    pub program_id: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowSolanaAccountMeta {
    #[serde(rename = "isSigner")]
    pub is_signer: bool,
    #[serde(rename = "isWritable")]
    pub is_writable: bool,
    pub pubkey: String,
}
///Serialized position data from `getVaultPositionsByUser()` in `app/core/borrowing.ts`.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowBorrowPosition {
    ///Position NFT mint address.
    pub address: String,
    #[serde(rename = "beforeBorrow")]
    pub before_borrow: String,
    #[serde(rename = "beforeSupply")]
    pub before_supply: String,
    pub borrow: String,
    #[serde(rename = "borrowLiquidation")]
    pub borrow_liquidation: String,
    ///Key/value position config from the database, keyed in camelCase.
    pub config: LendBorrowBorrowPositionConfig,
    #[serde(rename = "dustBorrow")]
    pub dust_borrow: String,
    ///NFT / position id.
    pub id: i64,
    #[serde(rename = "isLiquidated")]
    pub is_liquidated: bool,
    #[serde(rename = "isSupplyPosition")]
    pub is_supply_position: bool,
    #[serde(rename = "ownerAddress")]
    pub owner_address: String,
    pub supply: String,
    #[serde(rename = "supplyLiquidation")]
    pub supply_liquidation: String,
    pub tick: i64,
    #[serde(rename = "tickId")]
    pub tick_id: i64,
    pub vault: LendBorrowBorrowVault,
    #[serde(rename = "vaultId")]
    pub vault_id: i64,
}
///Serialized vault data from `serializedVault()` in `app/core/borrowing.ts`.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowBorrowVault {
    #[serde(rename = "absorbedBorrow", skip_serializing_if = "Option::is_none")]
    pub absorbed_borrow: Option<String>,
    #[serde(rename = "absorbedSupply", skip_serializing_if = "Option::is_none")]
    pub absorbed_supply: Option<String>,
    pub address: String,
    #[serde(rename = "borrowFee", skip_serializing_if = "Option::is_none")]
    pub borrow_fee: Option<String>,
    #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")]
    pub borrow_limit: Option<String>,
    #[serde(
        rename = "borrowLimitUtilization",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrow_limit_utilization: Option<String>,
    #[serde(rename = "borrowRate", skip_serializing_if = "Option::is_none")]
    pub borrow_rate: Option<String>,
    #[serde(
        rename = "borrowRateLiquidity",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrow_rate_liquidity: Option<String>,
    #[serde(
        rename = "borrowRateMagnifier",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrow_rate_magnifier: Option<String>,
    #[serde(rename = "borrowToken")]
    pub borrow_token: LendBorrowToken,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub borrowable: Option<String>,
    #[serde(
        rename = "borrowableUntilLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrowable_until_limit: Option<String>,
    #[serde(rename = "collateralFactor", skip_serializing_if = "Option::is_none")]
    pub collateral_factor: Option<String>,
    pub id: i64,
    #[serde(
        rename = "liquidationMaxLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub liquidation_max_limit: Option<String>,
    #[serde(rename = "liquidationPenalty", skip_serializing_if = "Option::is_none")]
    pub liquidation_penalty: Option<String>,
    #[serde(
        rename = "liquidationThreshold",
        skip_serializing_if = "Option::is_none"
    )]
    pub liquidation_threshold: Option<String>,
    #[serde(
        rename = "liquidityBorrowData",
        skip_serializing_if = "Option::is_none"
    )]
    pub liquidity_borrow_data: Option<LendBorrowLiquidityBorrowData>,
    #[serde(
        rename = "liquiditySupplyData",
        skip_serializing_if = "Option::is_none"
    )]
    pub liquidity_supply_data: Option<LendBorrowLiquiditySupplyData>,
    pub metadata: LendBorrowVaultMetadata,
    #[serde(rename = "minimumBorrowing", skip_serializing_if = "Option::is_none")]
    pub minimum_borrowing: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub oracle: Option<String>,
    #[serde(rename = "oraclePrice", skip_serializing_if = "Option::is_none")]
    pub oracle_price: Option<String>,
    #[serde(
        rename = "oraclePriceLiquidate",
        skip_serializing_if = "Option::is_none"
    )]
    pub oracle_price_liquidate: Option<String>,
    #[serde(rename = "oraclePriceOperate", skip_serializing_if = "Option::is_none")]
    pub oracle_price_operate: Option<String>,
    #[serde(rename = "oracleSources", skip_serializing_if = "Option::is_none")]
    pub oracle_sources: Option<Vec<LendBorrowOracleSource>>,
    #[serde(rename = "oracleTimestamp", skip_serializing_if = "Option::is_none")]
    pub oracle_timestamp: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rewards: Option<Vec<LendBorrowMarketReward>>,
    #[serde(rename = "supplyRate", skip_serializing_if = "Option::is_none")]
    pub supply_rate: Option<String>,
    #[serde(
        rename = "supplyRateLiquidity",
        skip_serializing_if = "Option::is_none"
    )]
    pub supply_rate_liquidity: Option<String>,
    #[serde(
        rename = "supplyRateMagnifier",
        skip_serializing_if = "Option::is_none"
    )]
    pub supply_rate_magnifier: Option<String>,
    #[serde(rename = "supplyToken")]
    pub supply_token: LendBorrowToken,
    #[serde(rename = "topTick", skip_serializing_if = "Option::is_none")]
    pub top_tick: Option<i64>,
    #[serde(rename = "totalBorrow", skip_serializing_if = "Option::is_none")]
    pub total_borrow: Option<String>,
    #[serde(
        rename = "totalBorrowLiquidity",
        skip_serializing_if = "Option::is_none"
    )]
    pub total_borrow_liquidity: Option<String>,
    #[serde(rename = "totalPositions", skip_serializing_if = "Option::is_none")]
    pub total_positions: Option<i64>,
    #[serde(rename = "totalSupply", skip_serializing_if = "Option::is_none")]
    pub total_supply: Option<String>,
    #[serde(
        rename = "totalSupplyLiquidity",
        skip_serializing_if = "Option::is_none"
    )]
    pub total_supply_liquidity: Option<String>,
    #[serde(rename = "withdrawLimit", skip_serializing_if = "Option::is_none")]
    pub withdraw_limit: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub withdrawable: Option<String>,
    #[serde(
        rename = "withdrawableUntilLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub withdrawable_until_limit: Option<String>,
    #[serde(rename = "withdrawalGap", skip_serializing_if = "Option::is_none")]
    pub withdrawal_gap: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowVaultMetadata {
    #[serde(rename = "maxLeverage")]
    pub max_leverage: bool,
    pub multiply: LendBorrowVaultMetadataMultiply,
    #[serde(rename = "nativeStake")]
    pub native_stake: bool,
    pub pegged: bool,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowVaultMetadataMultiply {
    pub enabled: bool,
    #[serde(rename = "reduceFactor")]
    pub reduce_factor: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowOracleSource {
    pub divisor: String,
    pub invert: bool,
    pub multiplier: String,
    pub source: String,
    #[serde(rename = "sourceType")]
    pub source_type: LendBorrowOracleSourceSourceType,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowOracleSourceSourceType {
    /// Additional properties not explicitly defined in the schema
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowMarketReward {
    pub apr: String,
    pub metadata: LendBorrowMarketRewardMetadata,
    #[serde(rename = "rewardToken")]
    pub reward_token: LendBorrowToken,
    pub side: LendBorrowMarketRewardSide,
    pub r#type: LendBorrowMarketRewardType,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowToken {
    ///SPL token mint address.
    pub address: String,
    #[serde(rename = "chainId")]
    pub chain_id: String,
    #[serde(rename = "coingeckoId", skip_serializing_if = "Option::is_none")]
    pub coingecko_id: Option<String>,
    pub decimals: i64,
    #[serde(rename = "logoUrl", skip_serializing_if = "Option::is_none")]
    pub logo_url: Option<url::Url>,
    pub name: String,
    ///Present on native-stake collateral tokens when applicable.
    #[serde(
        rename = "nativeStakeVoteAccount",
        skip_serializing_if = "Option::is_none"
    )]
    pub native_stake_vote_account: Option<String>,
    ///Token price as a decimal string.
    pub price: String,
    ///Token-2022 scaled-UI-amount config. Present on scaled-UI tokens (e.g. tokenised stocks).
    #[serde(rename = "scaledUiConfig", skip_serializing_if = "Option::is_none")]
    pub scaled_ui_config: Option<LendBorrowTokenScaledUiConfig>,
    ///Present on vault supply/borrow tokens when applicable.
    #[serde(rename = "stakingApr", skip_serializing_if = "Option::is_none")]
    pub staking_apr: Option<f64>,
    pub symbol: String,
    #[serde(rename = "uiSymbol")]
    pub ui_symbol: String,
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<chrono::DateTime<chrono::Utc>>,
}
///Token-2022 scaled-UI-amount config. Present on scaled-UI tokens (e.g. tokenised stocks).
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowTokenScaledUiConfig {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub authority: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub multiplier: Option<f64>,
    #[serde(rename = "newMultiplier", skip_serializing_if = "Option::is_none")]
    pub new_multiplier: Option<f64>,
    #[serde(
        rename = "newMultiplierEffectiveTimestamp",
        skip_serializing_if = "Option::is_none"
    )]
    pub new_multiplier_effective_timestamp: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum LendBorrowMarketRewardType {
    #[default]
    #[serde(rename = "merkle")]
    Merkle,
}
impl LendBorrowMarketRewardType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Merkle => "merkle",
        }
    }
}
impl ::std::fmt::Display for LendBorrowMarketRewardType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for LendBorrowMarketRewardType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum LendBorrowMarketRewardSide {
    #[default]
    #[serde(rename = "supply")]
    Supply,
    #[serde(rename = "borrow")]
    Borrow,
}
impl LendBorrowMarketRewardSide {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Supply => "supply",
            Self::Borrow => "borrow",
        }
    }
}
impl ::std::fmt::Display for LendBorrowMarketRewardSide {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for LendBorrowMarketRewardSide {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowMarketRewardMetadata {
    /// Additional properties not explicitly defined in the schema
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowLiquiditySupplyData {
    #[serde(
        rename = "baseWithdrawalLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub base_withdrawal_limit: Option<String>,
    #[serde(rename = "expandDuration", skip_serializing_if = "Option::is_none")]
    pub expand_duration: Option<LendBorrowLiquiditySupplyDataExpandDuration>,
    #[serde(rename = "expandPercent", skip_serializing_if = "Option::is_none")]
    pub expand_percent: Option<i64>,
    #[serde(
        rename = "lastUpdateTimestamp",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_update_timestamp: Option<String>,
    #[serde(rename = "modeWithInterest", skip_serializing_if = "Option::is_none")]
    pub mode_with_interest: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub supply: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub withdrawable: Option<String>,
    #[serde(
        rename = "withdrawableUntilLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub withdrawable_until_limit: Option<String>,
    #[serde(rename = "withdrawalLimit", skip_serializing_if = "Option::is_none")]
    pub withdrawal_limit: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum LendBorrowLiquiditySupplyDataExpandDuration {
    String(String),
    Integer(i64),
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowLiquidityBorrowData {
    #[serde(rename = "baseBorrowLimit", skip_serializing_if = "Option::is_none")]
    pub base_borrow_limit: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub borrow: Option<String>,
    #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")]
    pub borrow_limit: Option<String>,
    #[serde(
        rename = "borrowLimitUtilization",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrow_limit_utilization: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub borrowable: Option<String>,
    #[serde(
        rename = "borrowableUntilLimit",
        skip_serializing_if = "Option::is_none"
    )]
    pub borrowable_until_limit: Option<String>,
    #[serde(rename = "expandDuration", skip_serializing_if = "Option::is_none")]
    pub expand_duration: Option<i64>,
    #[serde(rename = "expandPercent", skip_serializing_if = "Option::is_none")]
    pub expand_percent: Option<i64>,
    #[serde(
        rename = "lastUpdateTimestamp",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_update_timestamp: Option<LendBorrowLiquidityBorrowDataLastUpdateTimestamp>,
    #[serde(rename = "maxBorrowLimit", skip_serializing_if = "Option::is_none")]
    pub max_borrow_limit: Option<String>,
    #[serde(rename = "modeWithInterest", skip_serializing_if = "Option::is_none")]
    pub mode_with_interest: Option<bool>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum LendBorrowLiquidityBorrowDataLastUpdateTimestamp {
    String(String),
    Integer(i64),
}
///Key/value position config from the database, keyed in camelCase.
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct LendBorrowBorrowPositionConfig {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1ShieldResponse {
    pub warnings: GetUltraV1ShieldResponseWarnings,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetUltraV1ShieldResponseWarnings {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<ArrayItemItem>>,
}
pub type GetUltraV1SearchResponse = Vec<UltraMintInformation>;
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraMintInformation {
    ///APY data, only present for assets listed on Jupiter Lend's Earn
    #[serde(skip_serializing_if = "Option::is_none")]
    pub apy: Option<UltraMintInformationApy>,
    /**Audit information. All sub-fields are conditional and vary per token.
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub audit: Option<UltraMintInformationAudit>,
    #[serde(rename = "circSupply", skip_serializing_if = "Option::is_none")]
    pub circ_supply: Option<f64>,
    ///Token creation timestamp
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<chrono::DateTime<chrono::Utc>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub decimals: Option<f64>,
    ///The token's developer wallet address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dev: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub discord: Option<String>,
    ///Fully diluted valuation in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fdv: Option<f64>,
    ///Trading fees in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fees: Option<f64>,
    #[serde(rename = "firstPool", skip_serializing_if = "Option::is_none")]
    pub first_pool: Option<UltraMintInformationFirstPool>,
    ///Freeze authority address (present when freeze authority is not disabled)
    #[serde(rename = "freezeAuthority", skip_serializing_if = "Option::is_none")]
    pub freeze_authority: Option<String>,
    #[serde(rename = "graduatedAt", skip_serializing_if = "Option::is_none")]
    pub graduated_at: Option<String>,
    #[serde(rename = "graduatedPool", skip_serializing_if = "Option::is_none")]
    pub graduated_pool: Option<String>,
    #[serde(rename = "holderCount", skip_serializing_if = "Option::is_none")]
    pub holder_count: Option<f64>,
    ///URL to the token's logo image
    #[serde(skip_serializing_if = "Option::is_none")]
    pub icon: Option<String>,
    ///The token's mint address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub instagram: Option<String>,
    #[serde(rename = "isVerified", skip_serializing_if = "Option::is_none")]
    pub is_verified: Option<bool>,
    ///Token issuer name (e.g., "Circle" for USDC)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub issuer: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub launchpad: Option<String>,
    ///Total liquidity in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub liquidity: Option<f64>,
    ///Market cap in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mcap: Option<f64>,
    ///Mint authority address (present when mint authority is not disabled)
    #[serde(rename = "mintAuthority", skip_serializing_if = "Option::is_none")]
    pub mint_authority: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    ///Organic trading activity score (0-100)
    #[serde(rename = "organicScore", skip_serializing_if = "Option::is_none")]
    pub organic_score: Option<f64>,
    #[serde(rename = "organicScoreLabel", skip_serializing_if = "Option::is_none")]
    pub organic_score_label: Option<UltraMintInformationOrganicScoreLabel>,
    #[serde(rename = "otherUrl", skip_serializing_if = "Option::is_none")]
    pub other_url: Option<String>,
    #[serde(rename = "partnerConfig", skip_serializing_if = "Option::is_none")]
    pub partner_config: Option<String>,
    ///Solana block number for the price data point
    #[serde(rename = "priceBlockId", skip_serializing_if = "Option::is_none")]
    pub price_block_id: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats1h: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats24h: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats30d: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats5m: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats6h: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats7d: Option<UltraSwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub symbol: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub telegram: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tiktok: Option<String>,
    ///The token program address (SPL Token or Token-2022)
    #[serde(rename = "tokenProgram", skip_serializing_if = "Option::is_none")]
    pub token_program: Option<String>,
    #[serde(rename = "totalSupply", skip_serializing_if = "Option::is_none")]
    pub total_supply: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub twitter: Option<String>,
    ///Last data update timestamp
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<chrono::DateTime<chrono::Utc>>,
    #[serde(rename = "usdPrice", skip_serializing_if = "Option::is_none")]
    pub usd_price: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraSwapStats {
    #[serde(rename = "buyOrganicVolume", skip_serializing_if = "Option::is_none")]
    pub buy_organic_volume: Option<f64>,
    #[serde(rename = "buyVolume", skip_serializing_if = "Option::is_none")]
    pub buy_volume: Option<f64>,
    #[serde(rename = "holderChange", skip_serializing_if = "Option::is_none")]
    pub holder_change: Option<f64>,
    #[serde(rename = "liquidityChange", skip_serializing_if = "Option::is_none")]
    pub liquidity_change: Option<f64>,
    #[serde(rename = "numBuys", skip_serializing_if = "Option::is_none")]
    pub num_buys: Option<f64>,
    #[serde(rename = "numNetBuyers", skip_serializing_if = "Option::is_none")]
    pub num_net_buyers: Option<f64>,
    #[serde(rename = "numOrganicBuyers", skip_serializing_if = "Option::is_none")]
    pub num_organic_buyers: Option<f64>,
    #[serde(rename = "numSells", skip_serializing_if = "Option::is_none")]
    pub num_sells: Option<f64>,
    #[serde(rename = "numTraders", skip_serializing_if = "Option::is_none")]
    pub num_traders: Option<f64>,
    #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")]
    pub price_change: Option<f64>,
    #[serde(rename = "sellOrganicVolume", skip_serializing_if = "Option::is_none")]
    pub sell_organic_volume: Option<f64>,
    #[serde(rename = "sellVolume", skip_serializing_if = "Option::is_none")]
    pub sell_volume: Option<f64>,
    #[serde(rename = "volumeChange", skip_serializing_if = "Option::is_none")]
    pub volume_change: Option<f64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum UltraMintInformationOrganicScoreLabel {
    #[default]
    #[serde(rename = "high")]
    High,
    #[serde(rename = "medium")]
    Medium,
    #[serde(rename = "low")]
    Low,
}
impl UltraMintInformationOrganicScoreLabel {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::High => "high",
            Self::Medium => "medium",
            Self::Low => "low",
        }
    }
}
impl ::std::fmt::Display for UltraMintInformationOrganicScoreLabel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for UltraMintInformationOrganicScoreLabel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraMintInformationFirstPool {
    ///Pool creation timestamp
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    ///Pool address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
}
/**Audit information. All sub-fields are conditional and vary per token.
*/
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraMintInformationAudit {
    ///Percentage of supply held by the developer
    #[serde(
        rename = "devBalancePercentage",
        skip_serializing_if = "Option::is_none"
    )]
    pub dev_balance_percentage: Option<f64>,
    ///Number of developer mint events
    #[serde(rename = "devMints", skip_serializing_if = "Option::is_none")]
    pub dev_mints: Option<f64>,
    #[serde(
        rename = "freezeAuthorityDisabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub freeze_authority_disabled: Option<bool>,
    /**Flagged as suspicious. This field is only present when the token
    has been flagged — check for the field's presence, not its value.
    Not all risky tokens will have this flag.
    */
    #[serde(rename = "isSus", skip_serializing_if = "Option::is_none")]
    pub is_sus: Option<bool>,
    #[serde(
        rename = "mintAuthorityDisabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub mint_authority_disabled: Option<bool>,
    ///Percentage of supply held by top holders
    #[serde(
        rename = "topHoldersPercentage",
        skip_serializing_if = "Option::is_none"
    )]
    pub top_holders_percentage: Option<f64>,
}
///APY data, only present for assets listed on Jupiter Lend's Earn
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct UltraMintInformationApy {
    ///Annual percentage yield from Jupiter Earn
    #[serde(rename = "jupEarn", skip_serializing_if = "Option::is_none")]
    pub jup_earn: Option<f64>,
}
pub type GetUltraV1OrderRoutersResponse = Vec<GetUltraV1OrderRoutersResponseItem>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderRoutersResponseItem {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub icon: Option<String>,
    pub id: String,
    pub name: GetUltraV1OrderRoutersResponseName,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1OrderRoutersResponseName {
    #[default]
    #[serde(rename = "Metis")]
    Metis,
    #[serde(rename = "JupiterZ")]
    JupiterZ,
    #[serde(rename = "DFlow")]
    Dflow,
    #[serde(rename = "OKX DEX Router")]
    OkxDexRouter,
}
impl GetUltraV1OrderRoutersResponseName {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Metis => "Metis",
            Self::JupiterZ => "JupiterZ",
            Self::Dflow => "DFlow",
            Self::OkxDexRouter => "OKX DEX Router",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1OrderRoutersResponseName {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1OrderRoutersResponseName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponse {
    /**- This field will be present if `taker` is defined and `transaction` is an empty string
    - It is unique for each error scenarios
    */
    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
    pub error_code: Option<f64>,
    /**- This field will be present if `taker` is defined and `transaction` is an empty string
    - This field can still return despite having a valid order/quote
    - This is meant for display purposes only and it is discouraged to match these error messages as they could be parameterized
    */
    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<GetUltraV1OrderResponseErrorMessage>,
    #[serde(rename = "expireAt", skip_serializing_if = "Option::is_none")]
    pub expire_at: Option<String>,
    /**- The fee includes either Ultra default fee or your integrator fee, depending on if referral and/or payer params are passed in
    - If `referralAccount`, `referralFee` (and `payer` if passed in) are passed in, the fee will be the integrator fee only
    - If no additional referral params are passed in, the fee will be the Ultra default fee only and can include additional fees for gasless support mechanism
    */
    #[serde(rename = "feeBps")]
    pub fee_bps: f64,
    #[serde(rename = "feeMint", skip_serializing_if = "Option::is_none")]
    pub fee_mint: Option<String>,
    pub gasless: bool,
    #[serde(rename = "inAmount")]
    pub in_amount: String,
    #[serde(rename = "inUsdValue", skip_serializing_if = "Option::is_none")]
    pub in_usd_value: Option<f64>,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub maker: Option<String>,
    pub mode: String,
    #[serde(rename = "otherAmountThreshold")]
    pub other_amount_threshold: String,
    #[serde(rename = "outAmount")]
    pub out_amount: String,
    #[serde(rename = "outUsdValue", skip_serializing_if = "Option::is_none")]
    pub out_usd_value: Option<f64>,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    /**- This field shows the platform fee only, does not include fee for gas
    - Platform fee can either be the Ultra default fee or your integrator fee
    */
    #[serde(rename = "platformFee")]
    pub platform_fee: GetUltraV1OrderResponsePlatformFee,
    #[serde(rename = "priceImpact", skip_serializing_if = "Option::is_none")]
    pub price_impact: Option<f64>,
    /**- Please use `priceImpact` field instead, this is still available only for backwards compatibility
     */
    #[serde(rename = "priceImpactPct")]
    pub price_impact_pct: String,
    /**- The number of lamports the `taker`, `maker` (JupiterZ's MM) or `payer` has to pay for higher priority landing, if a valid transaction is returned
    - Includes priority fees and tips for services such as Jito, etc, if any
    */
    #[serde(rename = "prioritizationFeeLamports")]
    pub prioritization_fee_lamports: f64,
    /**- The public key of the account that will cover the prioritization fee, it can be either `taker`, `maker` (JupiterZ's MM) or `payer` if passed in
     */
    #[serde(
        rename = "prioritizationFeePayer",
        skip_serializing_if = "Option::is_none"
    )]
    pub prioritization_fee_payer: Option<String>,
    #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")]
    pub quote_id: Option<String>,
    #[serde(rename = "referralAccount", skip_serializing_if = "Option::is_none")]
    pub referral_account: Option<String>,
    /**- The number of lamports the `taker` or `payer` has to pay for account rent, if a valid transaction is returned
    - Note that this value is just an estimate
    - For JupiterZ quotes, Jupiter's gas wallet pays the rent to create the taker's output token account if not yet initialised
    */
    #[serde(rename = "rentFeeLamports")]
    pub rent_fee_lamports: f64,
    /**- The public key of the account that will cover the rent fee, it can be either `taker`, `payer` if passed in, or Jupiter's gas wallet for JupiterZ quotes when the taker's output token account is not yet initialised
     */
    #[serde(rename = "rentFeePayer", skip_serializing_if = "Option::is_none")]
    pub rent_fee_payer: Option<String>,
    /**- Required to make a request to `/execute`
     */
    #[serde(rename = "requestId")]
    pub request_id: String,
    #[serde(rename = "routePlan")]
    pub route_plan: Vec<GetUltraV1OrderResponseRoutePlanItem>,
    pub router: GetUltraV1OrderResponseRouter,
    /**- The number of lamports the `taker`, `maker` (JupiterZ's MM) or `payer` has to pay for the base network fee, if a valid transaction is returned.
     */
    #[serde(rename = "signatureFeeLamports")]
    pub signature_fee_lamports: f64,
    /**- The public key of the account that will cover the signature fee, it can be either `taker`, `maker` (JupiterZ's MM) or `payer` if passed in
     */
    #[serde(rename = "signatureFeePayer", skip_serializing_if = "Option::is_none")]
    pub signature_fee_payer: Option<String>,
    #[serde(rename = "slippageBps")]
    pub slippage_bps: f64,
    #[serde(rename = "swapMode")]
    pub swap_mode: String,
    /**- Deprecated, in favour of router
     */
    #[serde(rename = "swapType")]
    pub swap_type: String,
    #[serde(rename = "swapUsdValue", skip_serializing_if = "Option::is_none")]
    pub swap_usd_value: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub taker: Option<String>,
    #[serde(rename = "totalTime")]
    pub total_time: f64,
    /**- Unsigned base-64 encoded transaction to be signed and used in `/execute`
    - If `taker` is null, this field will be null.
    - If the `transaction` field is empty, it is returned with `errorCode` and `errorMessage` such as Insufficient Funds
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub transaction: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1OrderResponseRouter {
    #[default]
    #[serde(rename = "metis")]
    Metis,
    #[serde(rename = "jupiterz")]
    Jupiterz,
    #[serde(rename = "dflow")]
    Dflow,
    #[serde(rename = "okx")]
    Okx,
}
impl GetUltraV1OrderResponseRouter {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Metis => "metis",
            Self::Jupiterz => "jupiterz",
            Self::Dflow => "dflow",
            Self::Okx => "okx",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1OrderResponseRouter {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1OrderResponseRouter {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponseRoutePlanItem {
    pub bps: f64,
    pub percent: f64,
    #[serde(rename = "swapInfo")]
    pub swap_info: GetUltraV1OrderResponseSwapInfo,
    #[serde(rename = "usdValue", skip_serializing_if = "Option::is_none")]
    pub usd_value: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponseSwapInfo {
    #[serde(rename = "ammKey")]
    pub amm_key: String,
    #[serde(rename = "inAmount")]
    pub in_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    pub label: String,
    #[serde(rename = "outAmount")]
    pub out_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
}
/**- This field shows the platform fee only, does not include fee for gas
- Platform fee can either be the Ultra default fee or your integrator fee
*/
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponsePlatformFee {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    #[serde(rename = "feeBps")]
    pub fee_bps: f64,
}
/**- This field will be present if `taker` is defined and `transaction` is an empty string
- This field can still return despite having a valid order/quote
- This is meant for display purposes only and it is discouraged to match these error messages as they could be parameterized
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1OrderResponseErrorMessage {
    #[default]
    #[serde(rename = "Insufficient funds")]
    InsufficientFunds,
    #[serde(rename = "Top up `${solAmount}` SOL for gas")]
    TopUpSolAmountSolForGas,
    #[serde(rename = "Minimum `${swapAmount}` for gasless")]
    MinimumSwapAmountForGasless,
}
impl GetUltraV1OrderResponseErrorMessage {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::InsufficientFunds => "Insufficient funds",
            Self::TopUpSolAmountSolForGas => "Top up `${solAmount}` SOL for gas",
            Self::MinimumSwapAmountForGasless => "Minimum `${swapAmount}` for gasless",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1OrderResponseErrorMessage {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1OrderResponseErrorMessage {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetUltraV1BalancesAddressResponse {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties:
        std::collections::BTreeMap<String, GetUltraV1BalancesAddressResponseObject>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1BalancesAddressResponseObject {
    pub amount: String,
    #[serde(rename = "isFrozen")]
    pub is_frozen: bool,
    pub slot: f64,
    #[serde(rename = "uiAmount")]
    pub ui_amount: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV2OrdersHistoryResponse {
    pub orders: Vec<TriggerV2OrderHistoryItem>,
    pub pagination: GetTriggerV2OrdersHistoryResponsePagination,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetTriggerV2OrdersHistoryResponsePagination {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub limit: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub offset: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub total: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TriggerV2OrderHistoryItem {
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub events: Option<Vec<TriggerV2OrderHistoryItemEventsItem>>,
    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<f64>,
    #[serde(rename = "fillPercent", skip_serializing_if = "Option::is_none")]
    pub fill_percent: Option<f64>,
    ///Highest observed trigger-mint price (sell-below trailing).
    #[serde(rename = "highWatermark", skip_serializing_if = "Option::is_none")]
    pub high_watermark: Option<f64>,
    pub id: String,
    #[serde(rename = "initialInputAmount", skip_serializing_if = "Option::is_none")]
    pub initial_input_amount: Option<String>,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "inputUsed", skip_serializing_if = "Option::is_none")]
    pub input_used: Option<String>,
    ///Lowest observed trigger-mint price (buy-above trailing).
    #[serde(rename = "lowWatermark", skip_serializing_if = "Option::is_none")]
    pub low_watermark: Option<f64>,
    #[serde(rename = "orderState")]
    pub order_state: TriggerV2OrderHistoryItemOrderState,
    #[serde(rename = "orderType")]
    pub order_type: TriggerV2OrderHistoryItemOrderType,
    #[serde(rename = "outputAmount", skip_serializing_if = "Option::is_none")]
    pub output_amount: Option<String>,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "privyWalletPubkey", skip_serializing_if = "Option::is_none")]
    pub privy_wallet_pubkey: Option<String>,
    #[serde(rename = "rawState", skip_serializing_if = "Option::is_none")]
    pub raw_state: Option<String>,
    #[serde(
        rename = "remainingInputAmount",
        skip_serializing_if = "Option::is_none"
    )]
    pub remaining_input_amount: Option<String>,
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<f64>,
    ///Trailing stop loss trail distance in basis points. Null for non-trailing orders.
    #[serde(rename = "trailingBps", skip_serializing_if = "Option::is_none")]
    pub trailing_bps: Option<f64>,
    #[serde(rename = "triggerCondition", skip_serializing_if = "Option::is_none")]
    pub trigger_condition: Option<TriggerV2OrderHistoryItemTriggerCondition>,
    #[serde(rename = "triggerMint", skip_serializing_if = "Option::is_none")]
    pub trigger_mint: Option<String>,
    #[serde(rename = "triggerPriceUsd", skip_serializing_if = "Option::is_none")]
    pub trigger_price_usd: Option<f64>,
    #[serde(rename = "triggeredAt", skip_serializing_if = "Option::is_none")]
    pub triggered_at: Option<f64>,
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<f64>,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2OrderHistoryItemTriggerCondition {
    #[default]
    #[serde(rename = "above")]
    Above,
    #[serde(rename = "below")]
    Below,
}
impl TriggerV2OrderHistoryItemTriggerCondition {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Above => "above",
            Self::Below => "below",
        }
    }
}
impl ::std::fmt::Display for TriggerV2OrderHistoryItemTriggerCondition {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2OrderHistoryItemTriggerCondition {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2OrderHistoryItemOrderType {
    #[default]
    #[serde(rename = "single")]
    Single,
    #[serde(rename = "oco")]
    Oco,
    #[serde(rename = "otoco")]
    Otoco,
}
impl TriggerV2OrderHistoryItemOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Single => "single",
            Self::Oco => "oco",
            Self::Otoco => "otoco",
        }
    }
}
impl ::std::fmt::Display for TriggerV2OrderHistoryItemOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2OrderHistoryItemOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2OrderHistoryItemOrderState {
    #[default]
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "executing")]
    Executing,
    #[serde(rename = "filled")]
    Filled,
    #[serde(rename = "pending_withdraw")]
    PendingWithdraw,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "expired")]
    Expired,
    #[serde(rename = "failed")]
    Failed,
}
impl TriggerV2OrderHistoryItemOrderState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "pending",
            Self::Open => "open",
            Self::Executing => "executing",
            Self::Filled => "filled",
            Self::PendingWithdraw => "pending_withdraw",
            Self::Cancelled => "cancelled",
            Self::Expired => "expired",
            Self::Failed => "failed",
        }
    }
}
impl ::std::fmt::Display for TriggerV2OrderHistoryItemOrderState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2OrderHistoryItemOrderState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TriggerV2OrderHistoryItemEventsItem {
    ///Token amount in smallest unit (present on deposit/withdrawal events)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    ///Token mint address (present on deposit/withdrawal events)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint: Option<String>,
    ///Order context identifier (present on fill events)
    #[serde(rename = "orderContext", skip_serializing_if = "Option::is_none")]
    pub order_context: Option<String>,
    ///Output token amount in smallest unit (present on fill events)
    #[serde(rename = "outputAmount", skip_serializing_if = "Option::is_none")]
    pub output_amount: Option<String>,
    ///Output token mint address (present on fill events)
    #[serde(rename = "outputMint", skip_serializing_if = "Option::is_none")]
    pub output_mint: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state: Option<TriggerV2OrderHistoryItemState>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<f64>,
    #[serde(rename = "txSignature", skip_serializing_if = "Option::is_none")]
    pub tx_signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#type: Option<TriggerV2OrderHistoryItemType>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2OrderHistoryItemType {
    #[default]
    #[serde(rename = "deposit")]
    Deposit,
    #[serde(rename = "fill")]
    Fill,
    #[serde(rename = "withdrawal")]
    Withdrawal,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "expired")]
    Expired,
}
impl TriggerV2OrderHistoryItemType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Deposit => "deposit",
            Self::Fill => "fill",
            Self::Withdrawal => "withdrawal",
            Self::Cancelled => "cancelled",
            Self::Expired => "expired",
        }
    }
}
impl ::std::fmt::Display for TriggerV2OrderHistoryItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2OrderHistoryItemType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2OrderHistoryItemState {
    #[default]
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "pending")]
    Pending,
}
impl TriggerV2OrderHistoryItemState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "success",
            Self::Failed => "failed",
            Self::Pending => "pending",
        }
    }
}
impl ::std::fmt::Display for TriggerV2OrderHistoryItemState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2OrderHistoryItemState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV2OrdersHistoryDcaResponse {
    pub orders: Vec<TriggerV2DcaHistoryItem>,
    pub pagination: GetTriggerV2OrdersHistoryDcaResponsePagination,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetTriggerV2OrdersHistoryDcaResponsePagination {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub limit: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub offset: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub total: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TriggerV2DcaHistoryItem {
    ///Amount swapped each round (the last round may include dust)
    #[serde(rename = "amountPerRound", skip_serializing_if = "Option::is_none")]
    pub amount_per_round: Option<String>,
    ///ISO-8601 time the first round is scheduled
    #[serde(rename = "beginFillAt", skip_serializing_if = "Option::is_none")]
    pub begin_fill_at: Option<String>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "displayState")]
    pub display_state: TriggerV2DcaHistoryItemDisplayState,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub events: Option<Vec<TriggerV2DcaHistoryItemEventsItem>>,
    ///Progress from 0 to 1
    #[serde(rename = "fillPercent", skip_serializing_if = "Option::is_none")]
    pub fill_percent: Option<f64>,
    ///DCA order UUID
    pub id: String,
    ///Total deposit amount in smallest units
    #[serde(rename = "inputAmountInitial", skip_serializing_if = "Option::is_none")]
    pub input_amount_initial: Option<String>,
    ///Amount still held in the vault
    #[serde(
        rename = "inputAmountRemaining",
        skip_serializing_if = "Option::is_none"
    )]
    pub input_amount_remaining: Option<String>,
    ///Total input consumed by successful rounds
    #[serde(rename = "inputAmountUsed", skip_serializing_if = "Option::is_none")]
    pub input_amount_used: Option<String>,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "intervalSeconds", skip_serializing_if = "Option::is_none")]
    pub interval_seconds: Option<f64>,
    ///Whether Earn While You Wait is on for this order (idle funds earn Jupiter Lend yield between rounds).
    #[serde(rename = "jlEnabled", skip_serializing_if = "Option::is_none")]
    pub jl_enabled: Option<bool>,
    ///Yield earned so far in USD for an Earn While You Wait order, from the ~15 min price cache. null when not JL-enabled or a required price is uncached.
    #[serde(rename = "jlYieldUsd", skip_serializing_if = "Option::is_none")]
    pub jl_yield_usd: Option<f64>,
    #[serde(rename = "lastFillAt", skip_serializing_if = "Option::is_none")]
    pub last_fill_at: Option<String>,
    #[serde(rename = "maxPriceUsd", skip_serializing_if = "Option::is_none")]
    pub max_price_usd: Option<f64>,
    #[serde(rename = "minPriceUsd", skip_serializing_if = "Option::is_none")]
    pub min_price_usd: Option<f64>,
    ///ISO-8601 time of the next scheduled round
    #[serde(rename = "nextFillAt", skip_serializing_if = "Option::is_none")]
    pub next_fill_at: Option<String>,
    #[serde(rename = "numberOfRounds", skip_serializing_if = "Option::is_none")]
    pub number_of_rounds: Option<f64>,
    #[serde(rename = "orderType")]
    pub order_type: TriggerV2DcaHistoryItemOrderType,
    ///Total output received across all successful rounds
    #[serde(rename = "outputAmountTotal", skip_serializing_if = "Option::is_none")]
    pub output_amount_total: Option<String>,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
    ///Retry window per round in seconds, clamp(intervalSeconds/2, 30, 7200)
    #[serde(rename = "retryWindowSeconds", skip_serializing_if = "Option::is_none")]
    pub retry_window_seconds: Option<f64>,
    #[serde(rename = "roundsFilled", skip_serializing_if = "Option::is_none")]
    pub rounds_filled: Option<f64>,
    pub state: TriggerV2DcaHistoryItemStateDepositing,
    #[serde(rename = "triggerMint", skip_serializing_if = "Option::is_none")]
    pub trigger_mint: Option<String>,
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
    #[serde(rename = "vaultPubkey")]
    pub vault_pubkey: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2DcaHistoryItemStateDepositing {
    #[default]
    #[serde(rename = "depositing")]
    Depositing,
    #[serde(rename = "deposit_failed")]
    DepositFailed,
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "executing")]
    Executing,
    #[serde(rename = "withdrawing")]
    Withdrawing,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "cancelled")]
    Cancelled,
}
impl TriggerV2DcaHistoryItemStateDepositing {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Depositing => "depositing",
            Self::DepositFailed => "deposit_failed",
            Self::Active => "active",
            Self::Executing => "executing",
            Self::Withdrawing => "withdrawing",
            Self::Completed => "completed",
            Self::Cancelled => "cancelled",
        }
    }
}
impl ::std::fmt::Display for TriggerV2DcaHistoryItemStateDepositing {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2DcaHistoryItemStateDepositing {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2DcaHistoryItemOrderType {
    #[default]
    #[serde(rename = "time_based")]
    TimeBased,
    #[serde(rename = "price_conditional")]
    PriceConditional,
}
impl TriggerV2DcaHistoryItemOrderType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::TimeBased => "time_based",
            Self::PriceConditional => "price_conditional",
        }
    }
}
impl ::std::fmt::Display for TriggerV2DcaHistoryItemOrderType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2DcaHistoryItemOrderType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TriggerV2DcaHistoryItemEventsItem {
    #[serde(rename = "attemptCount", skip_serializing_if = "Option::is_none")]
    pub attempt_count: Option<f64>,
    #[serde(rename = "inputAmount", skip_serializing_if = "Option::is_none")]
    pub input_amount: Option<String>,
    #[serde(rename = "outputAmount", skip_serializing_if = "Option::is_none")]
    pub output_amount: Option<String>,
    #[serde(rename = "roundNumber", skip_serializing_if = "Option::is_none")]
    pub round_number: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state: Option<TriggerV2DcaHistoryItemState>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
    #[serde(rename = "txSignature", skip_serializing_if = "Option::is_none")]
    pub tx_signature: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#type: Option<TriggerV2DcaHistoryItemType>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2DcaHistoryItemType {
    #[default]
    #[serde(rename = "deposit")]
    Deposit,
    #[serde(rename = "fill")]
    Fill,
    #[serde(rename = "withdrawal")]
    Withdrawal,
    #[serde(rename = "cancelled")]
    Cancelled,
}
impl TriggerV2DcaHistoryItemType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Deposit => "deposit",
            Self::Fill => "fill",
            Self::Withdrawal => "withdrawal",
            Self::Cancelled => "cancelled",
        }
    }
}
impl ::std::fmt::Display for TriggerV2DcaHistoryItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2DcaHistoryItemType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2DcaHistoryItemState {
    #[default]
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "rescheduled")]
    Rescheduled,
    #[serde(rename = "pending")]
    Pending,
}
impl TriggerV2DcaHistoryItemState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Success => "success",
            Self::Failed => "failed",
            Self::Rescheduled => "rescheduled",
            Self::Pending => "pending",
        }
    }
}
impl ::std::fmt::Display for TriggerV2DcaHistoryItemState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2DcaHistoryItemState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TriggerV2DcaHistoryItemDisplayState {
    #[default]
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "executing")]
    Executing,
    #[serde(rename = "pending_withdraw")]
    PendingWithdraw,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "failed")]
    Failed,
}
impl TriggerV2DcaHistoryItemDisplayState {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "pending",
            Self::Active => "active",
            Self::Executing => "executing",
            Self::PendingWithdraw => "pending_withdraw",
            Self::Completed => "completed",
            Self::Cancelled => "cancelled",
            Self::Failed => "failed",
        }
    }
}
impl ::std::fmt::Display for TriggerV2DcaHistoryItemDisplayState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TriggerV2DcaHistoryItemDisplayState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV1GetTriggerOrdersResponse {
    ///The status of the requested orders
    #[serde(rename = "orderStatus")]
    pub order_status: GetTriggerV1GetTriggerOrdersResponseOrderStatus,
    pub orders: Vec<GetTriggerV1GetTriggerOrdersResponseOrdersItem>,
    pub page: f64,
    ///Total number of pages
    #[serde(rename = "totalPages")]
    pub total_pages: f64,
    ///The requested user's wallet public key
    pub user: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV1GetTriggerOrdersResponseOrdersItem {
    #[serde(rename = "closeTx")]
    pub close_tx: String,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "expiredAt", skip_serializing_if = "Option::is_none")]
    pub expired_at: Option<String>,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    #[serde(rename = "makingAmount")]
    pub making_amount: String,
    #[serde(rename = "openTx")]
    pub open_tx: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "programVersion")]
    pub program_version: String,
    #[serde(rename = "rawMakingAmount")]
    pub raw_making_amount: String,
    #[serde(rename = "rawRemainingMakingAmount")]
    pub raw_remaining_making_amount: String,
    #[serde(rename = "rawRemainingTakingAmount")]
    pub raw_remaining_taking_amount: String,
    #[serde(rename = "rawTakingAmount")]
    pub raw_taking_amount: String,
    #[serde(rename = "remainingMakingAmount")]
    pub remaining_making_amount: String,
    #[serde(rename = "remainingTakingAmount")]
    pub remaining_taking_amount: String,
    #[serde(rename = "slippageBps")]
    pub slippage_bps: String,
    /**An open order with trades indicates that it has been
    partially filled
    */
    pub status: String,
    #[serde(rename = "takingAmount")]
    pub taking_amount: String,
    pub trades: Vec<GetTriggerV1GetTriggerOrdersResponseTradesItem>,
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV1GetTriggerOrdersResponseTradesItem {
    pub action: String,
    #[serde(rename = "confirmedAt")]
    pub confirmed_at: String,
    #[serde(rename = "feeAmount")]
    pub fee_amount: String,
    #[serde(rename = "feeMint")]
    pub fee_mint: String,
    #[serde(rename = "inputAmount")]
    pub input_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    pub keeper: String,
    #[serde(rename = "orderKey")]
    pub order_key: String,
    #[serde(rename = "outputAmount")]
    pub output_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
    #[serde(rename = "productMeta", skip_serializing_if = "Option::is_none")]
    pub product_meta: Option<serde_json::Value>,
    #[serde(rename = "rawFeeAmount")]
    pub raw_fee_amount: String,
    #[serde(rename = "rawInputAmount")]
    pub raw_input_amount: String,
    #[serde(rename = "rawOutputAmount")]
    pub raw_output_amount: String,
    #[serde(rename = "txId")]
    pub tx_id: String,
}
///The status of the requested orders
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetTriggerV1GetTriggerOrdersResponseOrderStatus {
    #[default]
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "history")]
    History,
}
impl GetTriggerV1GetTriggerOrdersResponseOrderStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Active => "active",
            Self::History => "history",
        }
    }
}
impl ::std::fmt::Display for GetTriggerV1GetTriggerOrdersResponseOrderStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetTriggerV1GetTriggerOrdersResponseOrderStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
pub type GetTokensV2TagResponse = Vec<TokensV2MintInformation>;
pub type GetTokensV2SearchResponse = Vec<TokensV2MintInformation>;
pub type GetTokensV2RecentResponse = Vec<TokensV2MintInformation>;
pub type GetTokensV2CategoryIntervalResponse = Vec<TokensV2MintInformation>;
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2MintInformation {
    ///APY data, only present for assets listed on Jupiter Lend's Earn
    #[serde(skip_serializing_if = "Option::is_none")]
    pub apy: Option<TokensV2MintInformationApy>,
    /**Audit information. All sub-fields are conditional and vary per token.
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub audit: Option<TokensV2MintInformationAudit>,
    #[serde(rename = "circSupply", skip_serializing_if = "Option::is_none")]
    pub circ_supply: Option<f64>,
    ///Token creation timestamp
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<chrono::DateTime<chrono::Utc>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub decimals: Option<f64>,
    ///The token's developer wallet address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dev: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub discord: Option<String>,
    ///Fully diluted valuation in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fdv: Option<f64>,
    #[serde(rename = "firstPool", skip_serializing_if = "Option::is_none")]
    pub first_pool: Option<TokensV2MintInformationFirstPool>,
    ///Freeze authority address (present when freeze authority is not disabled)
    #[serde(rename = "freezeAuthority", skip_serializing_if = "Option::is_none")]
    pub freeze_authority: Option<String>,
    #[serde(rename = "graduatedAt", skip_serializing_if = "Option::is_none")]
    pub graduated_at: Option<String>,
    #[serde(rename = "graduatedPool", skip_serializing_if = "Option::is_none")]
    pub graduated_pool: Option<String>,
    #[serde(rename = "holderCount", skip_serializing_if = "Option::is_none")]
    pub holder_count: Option<f64>,
    ///URL to the token's logo image
    #[serde(skip_serializing_if = "Option::is_none")]
    pub icon: Option<String>,
    ///The token's mint address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub instagram: Option<String>,
    #[serde(rename = "isVerified", skip_serializing_if = "Option::is_none")]
    pub is_verified: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub launchpad: Option<String>,
    ///Total liquidity in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub liquidity: Option<f64>,
    ///Market cap in USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mcap: Option<f64>,
    ///Mint authority address (present when mint authority is not disabled)
    #[serde(rename = "mintAuthority", skip_serializing_if = "Option::is_none")]
    pub mint_authority: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    ///Organic trading activity score (0-100)
    #[serde(rename = "organicScore", skip_serializing_if = "Option::is_none")]
    pub organic_score: Option<f64>,
    #[serde(rename = "organicScoreLabel", skip_serializing_if = "Option::is_none")]
    pub organic_score_label: Option<TokensV2MintInformationOrganicScoreLabel>,
    #[serde(rename = "otherUrl", skip_serializing_if = "Option::is_none")]
    pub other_url: Option<String>,
    #[serde(rename = "partnerConfig", skip_serializing_if = "Option::is_none")]
    pub partner_config: Option<String>,
    ///Solana block number for the price data point
    #[serde(rename = "priceBlockId", skip_serializing_if = "Option::is_none")]
    pub price_block_id: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats1h: Option<TokensV2SwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats24h: Option<TokensV2SwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats5m: Option<TokensV2SwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stats6h: Option<TokensV2SwapStats>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub symbol: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub telegram: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tiktok: Option<String>,
    ///The token program address (SPL Token or Token-2022)
    #[serde(rename = "tokenProgram", skip_serializing_if = "Option::is_none")]
    pub token_program: Option<String>,
    #[serde(rename = "totalSupply", skip_serializing_if = "Option::is_none")]
    pub total_supply: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub twitter: Option<String>,
    ///Last data update timestamp
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<chrono::DateTime<chrono::Utc>>,
    #[serde(rename = "usdPrice", skip_serializing_if = "Option::is_none")]
    pub usd_price: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2SwapStats {
    #[serde(rename = "buyOrganicVolume", skip_serializing_if = "Option::is_none")]
    pub buy_organic_volume: Option<f64>,
    #[serde(rename = "buyVolume", skip_serializing_if = "Option::is_none")]
    pub buy_volume: Option<f64>,
    #[serde(rename = "holderChange", skip_serializing_if = "Option::is_none")]
    pub holder_change: Option<f64>,
    #[serde(rename = "liquidityChange", skip_serializing_if = "Option::is_none")]
    pub liquidity_change: Option<f64>,
    #[serde(rename = "numBuys", skip_serializing_if = "Option::is_none")]
    pub num_buys: Option<f64>,
    #[serde(rename = "numNetBuyers", skip_serializing_if = "Option::is_none")]
    pub num_net_buyers: Option<f64>,
    #[serde(rename = "numOrganicBuyers", skip_serializing_if = "Option::is_none")]
    pub num_organic_buyers: Option<f64>,
    #[serde(rename = "numSells", skip_serializing_if = "Option::is_none")]
    pub num_sells: Option<f64>,
    #[serde(rename = "numTraders", skip_serializing_if = "Option::is_none")]
    pub num_traders: Option<f64>,
    #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")]
    pub price_change: Option<f64>,
    #[serde(rename = "sellOrganicVolume", skip_serializing_if = "Option::is_none")]
    pub sell_organic_volume: Option<f64>,
    #[serde(rename = "sellVolume", skip_serializing_if = "Option::is_none")]
    pub sell_volume: Option<f64>,
    #[serde(rename = "volumeChange", skip_serializing_if = "Option::is_none")]
    pub volume_change: Option<f64>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum TokensV2MintInformationOrganicScoreLabel {
    #[default]
    #[serde(rename = "high")]
    High,
    #[serde(rename = "medium")]
    Medium,
    #[serde(rename = "low")]
    Low,
}
impl TokensV2MintInformationOrganicScoreLabel {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::High => "high",
            Self::Medium => "medium",
            Self::Low => "low",
        }
    }
}
impl ::std::fmt::Display for TokensV2MintInformationOrganicScoreLabel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for TokensV2MintInformationOrganicScoreLabel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2MintInformationFirstPool {
    ///Pool creation timestamp
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    ///Pool address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
}
/**Audit information. All sub-fields are conditional and vary per token.
*/
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2MintInformationAudit {
    /**Percentage of supply held by the developer, on a 0-100 scale
    (e.g. 2.5 means 2.5%, not the fraction 0.025).
    */
    #[serde(
        rename = "devBalancePercentage",
        skip_serializing_if = "Option::is_none"
    )]
    pub dev_balance_percentage: Option<f64>,
    ///Number of developer mint events
    #[serde(rename = "devMints", skip_serializing_if = "Option::is_none")]
    pub dev_mints: Option<f64>,
    #[serde(
        rename = "freezeAuthorityDisabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub freeze_authority_disabled: Option<bool>,
    /**Flagged as suspicious. This field is only present when the token
    has been flagged — check for the field's presence, not its value.
    Not all risky tokens will have this flag.
    */
    #[serde(rename = "isSus", skip_serializing_if = "Option::is_none")]
    pub is_sus: Option<bool>,
    #[serde(
        rename = "mintAuthorityDisabled",
        skip_serializing_if = "Option::is_none"
    )]
    pub mint_authority_disabled: Option<bool>,
    /**Percentage of supply held by the top holders, on a 0-100 scale
    (e.g. 25.07 means 25.07%, not the fraction 0.2507).
    */
    #[serde(
        rename = "topHoldersPercentage",
        skip_serializing_if = "Option::is_none"
    )]
    pub top_holders_percentage: Option<f64>,
}
///APY data, only present for assets listed on Jupiter Lend's Earn
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2MintInformationApy {
    ///Annual percentage yield from Jupiter Earn
    #[serde(rename = "jupEarn", skip_serializing_if = "Option::is_none")]
    pub jup_earn: Option<f64>,
}
pub type GetTokensV1NewResponse = Vec<TokensV1MintWithCreationTimeAndMarkets>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV1MintWithCreationTimeAndMarkets {
    pub created_at: chrono::DateTime<chrono::Utc>,
    pub decimals: i32,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub freeze_authority: Option<String>,
    pub known_markets: Vec<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logo_uri: Option<String>,
    pub metadata_updated_at: chrono::DateTime<chrono::Utc>,
    pub mint: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint_authority: Option<String>,
    pub name: String,
    pub symbol: String,
}
pub type GetTokensV1AllResponse = Vec<TokensV1Mint>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV1Mint {
    pub address: String,
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub daily_volume: Option<f64>,
    pub decimals: i32,
    pub extensions: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub freeze_authority: Option<String>,
    #[serde(rename = "logoURI", skip_serializing_if = "Option::is_none")]
    pub logo_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint_authority: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub minted_at: Option<chrono::DateTime<chrono::Utc>>,
    pub name: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub permanent_delegate: Option<String>,
    pub symbol: String,
    pub tags: Vec<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetStudioV1DbcPoolAddressesMintResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<GetStudioV1DbcPoolAddressesMintResponseData>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetStudioV1DbcPoolAddressesMintResponseData {
    #[serde(rename = "configKey", skip_serializing_if = "Option::is_none")]
    pub config_key: Option<String>,
    #[serde(rename = "dammv2PoolAddress", skip_serializing_if = "Option::is_none")]
    pub dammv2_pool_address: Option<String>,
    #[serde(rename = "dbcPoolAddress", skip_serializing_if = "Option::is_none")]
    pub dbc_pool_address: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPriceV3Response {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, GetPriceV3ResponseObject>,
}
///Token addresses as keys
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPriceV3ResponseObject {
    ///Solana block ID when price was computed
    #[serde(rename = "blockId", skip_serializing_if = "Option::is_none")]
    pub block_id: Option<i64>,
    ///When the token was minted or created (fixed date for legacy tokens like SOL/USDC that predate the API)
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::Utc>,
    ///Token decimal places
    pub decimals: i64,
    ///Total liquidity in USD across all pools
    pub liquidity: f64,
    ///24-hour price change as a percentage
    #[serde(rename = "priceChange24h", skip_serializing_if = "Option::is_none")]
    pub price_change24h: Option<f64>,
    ///Current USD price
    #[serde(rename = "usdPrice")]
    pub usd_price: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1VaultInfoResponse {
    pub data: GetPredictionV1VaultInfoResponseData,
    pub pubkey: String,
    #[serde(rename = "vaultBalance")]
    pub vault_balance: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPredictionV1VaultInfoResponseData {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1TradesResponse {
    pub data: Vec<GetPredictionV1TradesResponseDataItem>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1TradesResponseDataItem {
    pub action: GetPredictionV1TradesResponseAction,
    #[serde(rename = "amountUsd")]
    pub amount_usd: String,
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[serde(rename = "eventImageUrl")]
    pub event_image_url: String,
    #[serde(rename = "eventTitle")]
    pub event_title: String,
    ///Trade identifier (e.g. "order-1906029")
    pub id: String,
    #[serde(rename = "isTeamMarket", skip_serializing_if = "Option::is_none")]
    pub is_team_market: Option<bool>,
    #[serde(rename = "marketId")]
    pub market_id: String,
    #[serde(rename = "marketOptions", skip_serializing_if = "Option::is_none")]
    pub market_options: Option<Vec<GetPredictionV1TradesResponseMarketOptionsItem>>,
    #[serde(rename = "marketTitle")]
    pub market_title: String,
    pub message: String,
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    #[serde(rename = "priceUsd")]
    pub price_usd: String,
    pub side: GetPredictionV1TradesResponseSide,
    pub timestamp: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetPredictionV1TradesResponseSide {
    #[default]
    #[serde(rename = "yes")]
    Yes,
    #[serde(rename = "no")]
    No,
}
impl GetPredictionV1TradesResponseSide {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Yes => "yes",
            Self::No => "no",
        }
    }
}
impl ::std::fmt::Display for GetPredictionV1TradesResponseSide {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetPredictionV1TradesResponseSide {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPredictionV1TradesResponseMarketOptionsItem {
    #[serde(rename = "buyYes", skip_serializing_if = "Option::is_none")]
    pub buy_yes: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetPredictionV1TradesResponseAction {
    #[default]
    #[serde(rename = "buy")]
    Buy,
    #[serde(rename = "sell")]
    Sell,
}
impl GetPredictionV1TradesResponseAction {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Buy => "buy",
            Self::Sell => "sell",
        }
    }
}
impl ::std::fmt::Display for GetPredictionV1TradesResponseAction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetPredictionV1TradesResponseAction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1ProfilesOwnerPubkeyPnlHistoryResponse {
    pub history: Vec<GetPredictionV1ProfilesOwnerPubkeyPnlHistoryResponseHistoryItem>,
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1ProfilesOwnerPubkeyPnlHistoryResponseHistoryItem {
    #[serde(rename = "realizedPnlUsd")]
    pub realized_pnl_usd: String,
    pub timestamp: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1PositionsResponse {
    pub data: Vec<PredictionPosition>,
    pub pagination: GetPredictionV1PositionsResponsePagination,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1PositionsResponsePagination {
    ///Constraint: minimum=0
    pub end: i64,
    #[serde(rename = "hasNext")]
    pub has_next: bool,
    ///Constraint: minimum=0
    pub start: i64,
    ///Constraint: minimum=0
    pub total: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionPosition {
    ///Average entry price per contract in micro USD (u64 as string)
    #[serde(rename = "avgPriceUsd")]
    pub avg_price_usd: String,
    ///Constraint: minimum=0
    pub bump: i64,
    ///True when the position qualifies for payout claim
    pub claimable: bool,
    ///Unix timestamp (seconds) when the position becomes claimable; null when unavailable
    #[serde(rename = "claimableAt", skip_serializing_if = "Option::is_none")]
    pub claimable_at: Option<i64>,
    ///Whether payout has been claimed
    pub claimed: bool,
    ///Amount claimed in micro USD (u64 as string)
    #[serde(rename = "claimedUsd")]
    pub claimed_usd: String,
    ///Legacy whole-contract quantity held. Use contractsMicro or contractsDecimal for the exact fractional quantity.
    pub contracts: String,
    ///Contracts held as a decimal string
    #[serde(rename = "contractsDecimal", skip_serializing_if = "Option::is_none")]
    pub contracts_decimal: Option<String>,
    ///Contracts held in micro-contract units (u64 as string, 1000000 = 1 contract)
    #[serde(rename = "contractsMicro", skip_serializing_if = "Option::is_none")]
    pub contracts_micro: Option<String>,
    ///External event identifier if available
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[serde(rename = "eventMetadata")]
    pub event_metadata: PredictionEventMetadata,
    ///Total fees paid in micro USD (u64 as string)
    #[serde(rename = "feesPaidUsd")]
    pub fees_paid_usd: String,
    ///True if this is a YES position
    #[serde(rename = "isYes")]
    pub is_yes: bool,
    ///Current mark price per contract in micro USD (u64 as string); null once market is closed
    #[serde(rename = "markPriceUsd", skip_serializing_if = "Option::is_none")]
    pub mark_price_usd: Option<String>,
    ///Deterministic market PDA derived from marketId
    pub market: String,
    ///External market identifier (ticker)
    #[serde(rename = "marketId")]
    pub market_id: String,
    ///Hashed market identifier used for on-chain PDAs
    #[serde(rename = "marketIdHash")]
    pub market_id_hash: String,
    #[serde(rename = "marketMetadata")]
    pub market_metadata: serde_json::Value,
    ///Maximum slippage recorded for the position, in basis points
    ///Constraint: minimum=0
    #[serde(rename = "maxSlippageBps", skip_serializing_if = "Option::is_none")]
    pub max_slippage_bps: Option<i64>,
    ///Number of open orders
    ///Constraint: minimum=0
    #[serde(rename = "openOrders")]
    pub open_orders: i64,
    ///Unix timestamp when the position was opened
    #[serde(rename = "openedAt")]
    pub opened_at: i64,
    ///Position owner public key
    pub owner: String,
    ///Position owner public key (alias of owner, prefer ownerPubkey going forward)
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    ///Notional payout if position wins (contracts * $1)
    #[serde(rename = "payoutUsd")]
    pub payout_usd: String,
    ///Unrealized PnL in micro USD (i128 as string); null once market is closed
    #[serde(rename = "pnlUsd", skip_serializing_if = "Option::is_none")]
    pub pnl_usd: Option<String>,
    ///Unrealized PnL after fees in micro USD (i128 as string); null once market is closed
    #[serde(rename = "pnlUsdAfterFees", skip_serializing_if = "Option::is_none")]
    pub pnl_usd_after_fees: Option<String>,
    ///Unrealized PnL after fees percentage relative to size; null once market is closed
    #[serde(
        rename = "pnlUsdAfterFeesPercent",
        skip_serializing_if = "Option::is_none"
    )]
    pub pnl_usd_after_fees_percent: Option<f64>,
    ///Unrealized PnL percentage relative to size; null once market is closed
    #[serde(rename = "pnlUsdPercent", skip_serializing_if = "Option::is_none")]
    pub pnl_usd_percent: Option<f64>,
    ///Position account public key
    pub pubkey: String,
    ///Realized PnL in micro USD (i64 as number)
    #[serde(rename = "realizedPnlUsd")]
    pub realized_pnl_usd: f64,
    ///Current best exit price for this side (micro USD string), or null when unavailable
    #[serde(rename = "sellPriceUsd", skip_serializing_if = "Option::is_none")]
    pub sell_price_usd: Option<String>,
    ///Unix timestamp (seconds) when the market settles; null when unavailable
    #[serde(rename = "settlementDate", skip_serializing_if = "Option::is_none")]
    pub settlement_date: Option<i64>,
    ///Alias of total cost basis in micro USD (u128 as string)
    #[serde(rename = "sizeUsd")]
    pub size_usd: String,
    ///Origin of the position (e.g. "program")
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    ///Total cost basis in micro USD (u128 as string)
    #[serde(rename = "totalCostUsd")]
    pub total_cost_usd: String,
    ///Unix timestamp of the last position update
    #[serde(rename = "updatedAt")]
    pub updated_at: i64,
    ///Mark-to-market value in micro USD (u128 as string); null once market is closed
    #[serde(rename = "valueUsd", skip_serializing_if = "Option::is_none")]
    pub value_usd: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1OrdersStatusOrderPubkeyResponse {
    #[serde(rename = "externalOrderId")]
    pub external_order_id: String,
    pub history: Vec<GetPredictionV1OrdersStatusOrderPubkeyResponseHistoryItem>,
    #[serde(rename = "latestEventType")]
    pub latest_event_type: String,
    #[serde(rename = "latestSignature")]
    pub latest_signature: String,
    #[serde(rename = "orderId")]
    pub order_id: String,
    #[serde(rename = "orderPubkey")]
    pub order_pubkey: String,
    pub status: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1OrdersStatusOrderPubkeyResponseHistoryItem {
    #[serde(rename = "eventType")]
    pub event_type: String,
    #[serde(rename = "externalOrderId")]
    pub external_order_id: String,
    #[serde(rename = "orderId")]
    pub order_id: String,
    #[serde(rename = "rawStatus")]
    pub raw_status: String,
    pub signature: String,
    pub status: String,
    pub timestamp: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1OrdersResponse {
    pub data: Vec<PredictionOrder>,
    pub pagination: GetPredictionV1OrdersResponsePagination,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1OrdersResponsePagination {
    ///Constraint: minimum=0
    pub end: i64,
    #[serde(rename = "hasNext")]
    pub has_next: bool,
    ///Constraint: minimum=0
    pub start: i64,
    ///Constraint: minimum=0
    pub total: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionOrder {
    ///Average fill price in micro USD (u64 as string)
    #[serde(rename = "avgFillPriceUsd")]
    pub avg_fill_price_usd: String,
    ///Constraint: minimum=0
    pub bump: i64,
    ///Number of contracts (u64 as string)
    pub contracts: String,
    ///Unix timestamp (seconds) when the order was created
    #[serde(rename = "createdAt")]
    pub created_at: i64,
    ///External event identifier
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[serde(rename = "eventMetadata")]
    pub event_metadata: PredictionEventMetadata,
    ///Client-provided order identifier
    #[serde(rename = "externalOrderId")]
    pub external_order_id: String,
    ///Unix timestamp (seconds) when the order was filled (0 when pending)
    #[serde(rename = "filledAt")]
    pub filled_at: i64,
    ///Number of filled contracts (u64 as string)
    #[serde(rename = "filledContracts")]
    pub filled_contracts: String,
    ///True when order is a buy order
    #[serde(rename = "isBuy")]
    pub is_buy: bool,
    ///True when order is for the YES side
    #[serde(rename = "isYes")]
    pub is_yes: bool,
    ///Associated market public key
    pub market: String,
    ///External market identifier used to derive the PDA
    #[serde(rename = "marketId")]
    pub market_id: String,
    ///Hashed market identifier used for on-chain PDAs
    #[serde(rename = "marketIdHash")]
    pub market_id_hash: String,
    #[serde(rename = "marketMetadata")]
    pub market_metadata: serde_json::Value,
    ///Buyer-specified max fill price (micro USD)
    #[serde(rename = "maxBuyPriceUsd", skip_serializing_if = "Option::is_none")]
    pub max_buy_price_usd: Option<String>,
    ///Maximum fill price in micro USD (u64 as string)
    #[serde(rename = "maxFillPriceUsd")]
    pub max_fill_price_usd: String,
    ///Seller-specified min fill price (micro USD)
    #[serde(rename = "minSellPriceUsd", skip_serializing_if = "Option::is_none")]
    pub min_sell_price_usd: Option<String>,
    ///External order identifier from the venue
    #[serde(rename = "orderId")]
    pub order_id: String,
    ///Order owner public key
    pub owner: String,
    ///Order owner public key (alias of owner, use ownerPubkey when available)
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    ///Associated position public key
    pub position: String,
    ///Order account public key
    pub pubkey: String,
    ///Whether the order has been settled on-chain
    pub settled: bool,
    ///Order notional in micro USD (u128 as string)
    #[serde(rename = "sizeUsd")]
    pub size_usd: String,
    ///Current order status
    pub status: PredictionOrderStatus,
    ///Unix timestamp (seconds) when the order last changed on-chain
    #[serde(rename = "updatedAt")]
    pub updated_at: i64,
}
///Current order status
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionOrderStatus {
    #[default]
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "filled")]
    Filled,
    #[serde(rename = "failed")]
    Failed,
}
impl PredictionOrderStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pending => "pending",
            Self::Filled => "filled",
            Self::Failed => "failed",
        }
    }
}
impl ::std::fmt::Display for PredictionOrderStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionOrderStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponse {
    pub data: Vec<GetPredictionV1LeaderboardsResponseDataItem>,
    pub summary: GetPredictionV1LeaderboardsResponseSummary,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponseSummary {
    pub all_time: GetPredictionV1LeaderboardsResponseAllTime,
    pub monthly: GetPredictionV1LeaderboardsResponseMonthly,
    pub weekly: GetPredictionV1LeaderboardsResponseWeekly,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponseWeekly {
    #[serde(rename = "predictionsCount")]
    pub predictions_count: f64,
    #[serde(rename = "totalVolumeUsd")]
    pub total_volume_usd: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponseMonthly {
    #[serde(rename = "predictionsCount")]
    pub predictions_count: f64,
    #[serde(rename = "totalVolumeUsd")]
    pub total_volume_usd: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponseAllTime {
    #[serde(rename = "predictionsCount")]
    pub predictions_count: f64,
    #[serde(rename = "totalVolumeUsd")]
    pub total_volume_usd: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1LeaderboardsResponseDataItem {
    #[serde(rename = "correctPredictions")]
    pub correct_predictions: f64,
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    pub period: String,
    #[serde(rename = "periodEnd", skip_serializing_if = "Option::is_none")]
    pub period_end: Option<String>,
    #[serde(rename = "periodStart", skip_serializing_if = "Option::is_none")]
    pub period_start: Option<String>,
    #[serde(rename = "predictionsCount")]
    pub predictions_count: f64,
    #[serde(rename = "realizedPnlUsd")]
    pub realized_pnl_usd: String,
    #[serde(rename = "totalVolumeUsd")]
    pub total_volume_usd: String,
    #[serde(rename = "winRatePct")]
    pub win_rate_pct: String,
    #[serde(rename = "wrongPredictions")]
    pub wrong_predictions: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1HistoryResponse {
    pub data: Vec<PredictionHistoryEvent>,
    pub pagination: PredictionPagination,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionHistoryEvent {
    ///Average fill price in micro USD (u64 as string)
    #[serde(rename = "avgFillPriceUsd")]
    pub avg_fill_price_usd: String,
    ///Number of contracts in the order. Legacy whole-contract value; see contractsMicro/contractsDecimal for the exact quantity.
    pub contracts: String,
    ///Contracts as a decimal string
    #[serde(rename = "contractsDecimal", skip_serializing_if = "Option::is_none")]
    pub contracts_decimal: Option<String>,
    ///Contracts in micro-contract units (u64 as string, 1000000 = 1 contract)
    #[serde(rename = "contractsMicro", skip_serializing_if = "Option::is_none")]
    pub contracts_micro: Option<String>,
    ///Number of contracts settled in this event (legacy whole-contract value)
    #[serde(rename = "contractsSettled")]
    pub contracts_settled: String,
    ///Settled contracts as a decimal string
    #[serde(
        rename = "contractsSettledDecimal",
        skip_serializing_if = "Option::is_none"
    )]
    pub contracts_settled_decimal: Option<String>,
    ///Settled contracts in micro-contract units
    #[serde(
        rename = "contractsSettledMicro",
        skip_serializing_if = "Option::is_none"
    )]
    pub contracts_settled_micro: Option<String>,
    ///Amount deposited for this order in micro USD (u64 as string)
    #[serde(rename = "depositAmountUsd")]
    pub deposit_amount_usd: String,
    ///External event identifier
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[serde(rename = "eventMetadata")]
    pub event_metadata: PredictionEventMetadata,
    ///Type of history event. Position wins surface as payout_claimed (there is no position_won).
    #[serde(rename = "eventType")]
    pub event_type: PredictionHistoryEventEventType,
    ///Client-provided order identifier
    #[serde(rename = "externalOrderId")]
    pub external_order_id: String,
    ///Fee charged for this event in micro USD (u64 as string)
    #[serde(rename = "feeUsd", skip_serializing_if = "Option::is_none")]
    pub fee_usd: Option<String>,
    ///Number of contracts filled (legacy whole-contract value)
    #[serde(rename = "filledContracts")]
    pub filled_contracts: String,
    ///Filled contracts as a decimal string
    #[serde(
        rename = "filledContractsDecimal",
        skip_serializing_if = "Option::is_none"
    )]
    pub filled_contracts_decimal: Option<String>,
    ///Filled contracts in micro-contract units
    #[serde(
        rename = "filledContractsMicro",
        skip_serializing_if = "Option::is_none"
    )]
    pub filled_contracts_micro: Option<String>,
    ///Gross proceeds before fees in micro USD (u64 as string)
    #[serde(rename = "grossProceedsUsd")]
    pub gross_proceeds_usd: String,
    ///Unique history event identifier
    pub id: i64,
    ///True when the event relates to a buy order
    #[serde(rename = "isBuy")]
    pub is_buy: bool,
    ///True when the event relates to the YES side
    #[serde(rename = "isYes")]
    pub is_yes: bool,
    ///Keeper that processed the transaction
    #[serde(rename = "keeperPubkey")]
    pub keeper_pubkey: String,
    ///External market identifier
    #[serde(rename = "marketId")]
    pub market_id: String,
    ///Metadata for the associated market
    #[serde(rename = "marketMetadata")]
    pub market_metadata: serde_json::Value,
    ///Buyer-specified max fill price in micro USD (u64 as string)
    #[serde(rename = "maxBuyPriceUsd", skip_serializing_if = "Option::is_none")]
    pub max_buy_price_usd: Option<String>,
    ///Maximum fill price in micro USD (u64 as string)
    #[serde(rename = "maxFillPriceUsd")]
    pub max_fill_price_usd: String,
    ///Seller-specified min fill price in micro USD (u64 as string)
    #[serde(rename = "minSellPriceUsd", skip_serializing_if = "Option::is_none")]
    pub min_sell_price_usd: Option<String>,
    ///Net proceeds after fees in micro USD (u64 as string)
    #[serde(rename = "netProceedsUsd")]
    pub net_proceeds_usd: String,
    ///External order identifier from the venue
    #[serde(rename = "orderId")]
    pub order_id: String,
    ///Associated order account public key
    #[serde(rename = "orderPubkey")]
    pub order_pubkey: String,
    ///Position or order owner public key
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    ///Payout amount in micro USD (u64 as string), populated for payout_claimed events
    #[serde(rename = "payoutAmountUsd")]
    pub payout_amount_usd: String,
    ///Associated position account public key
    #[serde(rename = "positionPubkey")]
    pub position_pubkey: String,
    ///Realized PnL from this event in micro USD (i64 as string)
    #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")]
    pub realized_pnl: Option<String>,
    ///Realized PnL before fees in micro USD (i64 as string)
    #[serde(
        rename = "realizedPnlBeforeFees",
        skip_serializing_if = "Option::is_none"
    )]
    pub realized_pnl_before_fees: Option<String>,
    ///Solana transaction signature
    pub signature: String,
    ///Solana slot number (u64 as string)
    pub slot: String,
    ///Unix timestamp (seconds) when the event occurred
    pub timestamp: i64,
    ///Total cost of the order in micro USD (u64 as string)
    #[serde(rename = "totalCostUsd")]
    pub total_cost_usd: String,
    ///Token amount transferred in this event (native token units as string)
    #[serde(
        rename = "transferAmountToken",
        skip_serializing_if = "Option::is_none"
    )]
    pub transfer_amount_token: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionMarketMetadata {
    #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")]
    pub close_time: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")]
    pub event_id: Option<String>,
    #[serde(rename = "isTeamMarket", skip_serializing_if = "Option::is_none")]
    pub is_team_market: Option<bool>,
    #[serde(rename = "marketId")]
    pub market_id: String,
    #[serde(rename = "marketOptions", skip_serializing_if = "Option::is_none")]
    pub market_options: Option<Vec<PredictionMarketMetadataMarketOptionsItem>>,
    #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")]
    pub open_time: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub result: Option<String>,
    #[serde(rename = "rulesPrimary", skip_serializing_if = "Option::is_none")]
    pub rules_primary: Option<String>,
    #[serde(rename = "rulesSecondary", skip_serializing_if = "Option::is_none")]
    pub rules_secondary: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subtitle: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionMarketMetadataMarketOptionsItem {
    #[serde(rename = "buyYes", skip_serializing_if = "Option::is_none")]
    pub buy_yes: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}
///Type of history event. Position wins surface as payout_claimed (there is no position_won).
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionHistoryEventEventType {
    #[default]
    #[serde(rename = "order_created")]
    OrderCreated,
    #[serde(rename = "order_filled")]
    OrderFilled,
    #[serde(rename = "order_failed")]
    OrderFailed,
    #[serde(rename = "order_closed")]
    OrderClosed,
    #[serde(rename = "payout_claimed")]
    PayoutClaimed,
    #[serde(rename = "position_updated")]
    PositionUpdated,
    #[serde(rename = "position_lost")]
    PositionLost,
}
impl PredictionHistoryEventEventType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::OrderCreated => "order_created",
            Self::OrderFilled => "order_filled",
            Self::OrderFailed => "order_failed",
            Self::OrderClosed => "order_closed",
            Self::PayoutClaimed => "payout_claimed",
            Self::PositionUpdated => "position_updated",
            Self::PositionLost => "position_lost",
        }
    }
}
impl ::std::fmt::Display for PredictionHistoryEventEventType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionHistoryEventEventType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPredictionV1ForecastResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub forecast_history: Option<Vec<GetPredictionV1ForecastResponseForecastHistoryItem>>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPredictionV1ForecastResponseForecastHistoryItem {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub end_period_ts: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub event_ticker: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub formatted_forecast: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub market_ticker: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub numerical_forecast: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub period_interval: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub raw_numerical_forecast: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1EventsSuggestedPubkeyResponse {
    pub data: Vec<PredictionEvent>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1EventsSearchResponse {
    pub data: Vec<PredictionEvent>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pagination: Option<PredictionPagination>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1EventsScoresResponse {
    pub data: Vec<PredictionGameScore>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionGameScore {
    #[serde(rename = "awayTeam", skip_serializing_if = "Option::is_none")]
    pub away_team: Option<String>,
    ///Elapsed time within the game (e.g. "90")
    #[serde(skip_serializing_if = "Option::is_none")]
    pub elapsed: Option<String>,
    ///True once the game has finished
    pub ended: bool,
    ///Application-level event identifier
    #[serde(rename = "eventId")]
    pub event_id: String,
    ///ISO 8601 timestamp when the game finished, if ended
    #[serde(rename = "finishedTimestamp", skip_serializing_if = "Option::is_none")]
    pub finished_timestamp: Option<String>,
    #[serde(rename = "gameId")]
    pub game_id: String,
    #[serde(rename = "homeTeam", skip_serializing_if = "Option::is_none")]
    pub home_team: Option<String>,
    #[serde(rename = "leagueAbbreviation", skip_serializing_if = "Option::is_none")]
    pub league_abbreviation: Option<String>,
    ///True while the game is in progress
    pub live: bool,
    ///Current period (e.g. "2H")
    #[serde(skip_serializing_if = "Option::is_none")]
    pub period: Option<String>,
    ///Raw score string from the provider (e.g. "2-0")
    #[serde(skip_serializing_if = "Option::is_none")]
    pub score: Option<String>,
    ///Provider status string (e.g. "InProgress")
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    ///ISO 8601 timestamp of the last score update
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1EventsResponse {
    pub data: Vec<PredictionEvent>,
    pub pagination: PredictionPagination,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionEvent {
    ///Unix timestamp (seconds) when the event begins
    #[serde(rename = "beginAt", skip_serializing_if = "Option::is_none")]
    pub begin_at: Option<String>,
    ///The category for the event, allowed values: all, crypto, sports, politics, esports, culture, economics, tech
    pub category: String,
    ///Close condition for the event
    #[serde(rename = "closeCondition")]
    pub close_condition: String,
    ///Application-level identifier
    #[serde(rename = "eventId")]
    pub event_id: String,
    ///Whether the event is active (listed on events)
    #[serde(rename = "isActive")]
    pub is_active: bool,
    ///Whether the event is currently live
    #[serde(rename = "isLive")]
    pub is_live: bool,
    ///Live score data for sports events; null when no score is available
    #[serde(rename = "liveScore", skip_serializing_if = "Option::is_none")]
    pub live_score: Option<serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub markets: Option<Vec<PredictionMarket>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub metadata: Option<PredictionEventMetadata>,
    ///Document to full rules for the event
    #[serde(rename = "rulesPdf")]
    pub rules_pdf: String,
    ///The subcategory for the event
    pub subcategory: String,
    ///Tags associated with the event
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    ///Rolling 24-hour volume in micro USD
    #[serde(skip_serializing_if = "Option::is_none")]
    pub volume24hr: Option<String>,
    ///Total volume for the event in micro USD
    #[serde(rename = "volumeUsd")]
    pub volume_usd: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionEventMetadata {
    ///ISO 8601 formatted close time
    #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")]
    pub close_time: Option<String>,
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<url::Url>,
    #[serde(rename = "isLive", skip_serializing_if = "Option::is_none")]
    pub is_live: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub series: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slug: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subtitle: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1EventsEventIdMarketsResponse {
    pub data: Vec<PredictionMarket>,
    pub pagination: PredictionPagination,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionPagination {
    ///Constraint: minimum=0
    pub end: i64,
    #[serde(rename = "hasNext")]
    pub has_next: bool,
    ///Constraint: minimum=0
    pub start: i64,
    ///Constraint: minimum=0
    pub total: i64,
}
///Market fields are returned flat (there is no nested `metadata` object).
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionMarket {
    ///Underlying CLOB token IDs (provider-specific)
    #[serde(rename = "clobTokenIds", skip_serializing_if = "Option::is_none")]
    pub clob_token_ids: Option<Vec<String>>,
    ///Unix timestamp (seconds) when the market closes
    #[serde(rename = "closeTime")]
    pub close_time: f64,
    ///Parent event identifier
    #[serde(rename = "eventId", skip_serializing_if = "Option::is_none")]
    pub event_id: Option<String>,
    ///Market image URL
    #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<url::Url>,
    ///True for team or sports markets
    #[serde(rename = "isTeamMarket", skip_serializing_if = "Option::is_none")]
    pub is_team_market: Option<bool>,
    ///Jupiter Forecast trading lifecycle: `open`, `resolving` after the close time, or `settled` after issuer resolution. Only `open` is tradable.
    #[serde(rename = "lifecycleStatus", skip_serializing_if = "Option::is_none")]
    pub lifecycle_status: Option<PredictionMarketLifecycleStatus>,
    ///Market identifier
    #[serde(rename = "marketId")]
    pub market_id: String,
    ///Selectable options for team or multi-outcome markets
    #[serde(rename = "marketOptions", skip_serializing_if = "Option::is_none")]
    pub market_options: Option<Vec<PredictionMarketMarketOptionsItem>>,
    ///On-chain market account (Jupiter Forecast / bisonfi).
    #[serde(rename = "marketPda", skip_serializing_if = "Option::is_none")]
    pub market_pda: Option<String>,
    ///Public key of the market result account
    #[serde(rename = "marketResultPubkey", skip_serializing_if = "Option::is_none")]
    pub market_result_pubkey: Option<String>,
    ///Unix timestamp (seconds) when the market opens
    #[serde(rename = "openTime")]
    pub open_time: f64,
    ///Outcome token mint for this market side (Jupiter Forecast / bisonfi). Buying the market gives you this token; it can also be traded directly through the Swap API.
    #[serde(rename = "outcomeMint", skip_serializing_if = "Option::is_none")]
    pub outcome_mint: Option<String>,
    ///Outcome side for Jupiter Forecast markets (`up` or `down`).
    #[serde(rename = "outcomeSide", skip_serializing_if = "Option::is_none")]
    pub outcome_side: Option<String>,
    ///Token program that owns `outcomeMint`. Jupiter Forecast uses Token-2022 (`TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`).
    #[serde(
        rename = "outcomeTokenProgram",
        skip_serializing_if = "Option::is_none"
    )]
    pub outcome_token_program: Option<String>,
    ///Outcome labels for the market
    #[serde(skip_serializing_if = "Option::is_none")]
    pub outcomes: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pricing: Option<PredictionMarketPricing>,
    ///Market data provider
    #[serde(skip_serializing_if = "Option::is_none")]
    pub provider: Option<PredictionMarketProvider>,
    ///When the market resolved. null while open; returned as an ISO 8601 string once resolved
    #[serde(rename = "resolveAt", skip_serializing_if = "Option::is_none")]
    pub resolve_at: Option<PredictionMarketResolveAt>,
    ///Market result. null until resolved, then "yes" or "no"
    #[serde(skip_serializing_if = "Option::is_none")]
    pub result: Option<PredictionMarketResult>,
    ///Primary resolution rules
    #[serde(rename = "rulesPrimary", skip_serializing_if = "Option::is_none")]
    pub rules_primary: Option<String>,
    ///Secondary resolution rules
    #[serde(rename = "rulesSecondary", skip_serializing_if = "Option::is_none")]
    pub rules_secondary: Option<String>,
    ///Sports line or handicap, when applicable
    #[serde(rename = "sportsLine", skip_serializing_if = "Option::is_none")]
    pub sports_line: Option<f64>,
    ///Sports market type, when applicable
    #[serde(rename = "sportsMarketType", skip_serializing_if = "Option::is_none")]
    pub sports_market_type: Option<String>,
    ///Current market status
    pub status: PredictionMarketStatus,
    ///Team metadata, present for team markets
    #[serde(skip_serializing_if = "Option::is_none")]
    pub team: Option<serde_json::Value>,
    ///Market title
    #[serde(skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    ///Whether this Jupiter Forecast side can be traded right now. The Discover example filters on this field.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tradable: Option<bool>,
}
///Current market status
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionMarketStatus {
    #[default]
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "closed")]
    Closed,
    #[serde(rename = "cancelled")]
    Cancelled,
}
impl PredictionMarketStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Open => "open",
            Self::Closed => "closed",
            Self::Cancelled => "cancelled",
        }
    }
}
impl ::std::fmt::Display for PredictionMarketStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionMarketStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Market result. null until resolved, then "yes" or "no"
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionMarketResult {
    #[default]
    #[serde(rename = "yes")]
    Yes,
    #[serde(rename = "no")]
    No,
}
impl PredictionMarketResult {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Yes => "yes",
            Self::No => "no",
        }
    }
}
impl ::std::fmt::Display for PredictionMarketResult {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionMarketResult {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///When the market resolved. null while open; returned as an ISO 8601 string once resolved
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PredictionMarketResolveAt {
    String(String),
    Number(f64),
}
///Market data provider
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionMarketProvider {
    #[default]
    #[serde(rename = "polymarket")]
    Polymarket,
    #[serde(rename = "gx")]
    Gx,
    #[serde(rename = "bisonfi")]
    Bisonfi,
}
impl PredictionMarketProvider {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Polymarket => "polymarket",
            Self::Gx => "gx",
            Self::Bisonfi => "bisonfi",
        }
    }
}
impl ::std::fmt::Display for PredictionMarketProvider {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionMarketProvider {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionMarketPricing {
    #[serde(rename = "buyNoPriceUsd", skip_serializing_if = "Option::is_none")]
    pub buy_no_price_usd: Option<f64>,
    #[serde(rename = "buyYesPriceUsd", skip_serializing_if = "Option::is_none")]
    pub buy_yes_price_usd: Option<f64>,
    #[serde(rename = "sellNoPriceUsd", skip_serializing_if = "Option::is_none")]
    pub sell_no_price_usd: Option<f64>,
    #[serde(rename = "sellYesPriceUsd", skip_serializing_if = "Option::is_none")]
    pub sell_yes_price_usd: Option<f64>,
    ///Trading volume for this market
    #[serde(skip_serializing_if = "Option::is_none")]
    pub volume: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionMarketMarketOptionsItem {
    #[serde(rename = "buyYes", skip_serializing_if = "Option::is_none")]
    pub buy_yes: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}
///Jupiter Forecast trading lifecycle: `open`, `resolving` after the close time, or `settled` after issuer resolution. Only `open` is tradable.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PredictionMarketLifecycleStatus {
    #[default]
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "resolving")]
    Resolving,
    #[serde(rename = "settled")]
    Settled,
}
impl PredictionMarketLifecycleStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Open => "open",
            Self::Resolving => "resolving",
            Self::Settled => "settled",
        }
    }
}
impl ::std::fmt::Display for PredictionMarketLifecycleStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PredictionMarketLifecycleStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1StakedJupAddressResponse {
    #[serde(rename = "stakedAmount", skip_serializing_if = "Option::is_none")]
    pub staked_amount: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub unstaking: Option<Vec<GetPortfolioV1StakedJupAddressResponseUnstakingItem>>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1StakedJupAddressResponseUnstakingItem {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub until: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1PositionsAddressResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub date: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub duration: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub elements: Option<Vec<PortfolioPortfolioElement>>,
    #[serde(rename = "fetcherReports", skip_serializing_if = "Option::is_none")]
    pub fetcher_reports: Option<Vec<PortfolioFetcherReport>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    #[serde(rename = "tokenInfo", skip_serializing_if = "Option::is_none")]
    pub token_info: Option<GetPortfolioV1PositionsAddressResponseTokenInfo>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1PositionsAddressResponseTokenInfo {
    ///Tokens indexed by token address
    #[serde(skip_serializing_if = "Option::is_none")]
    pub solana: Option<GetPortfolioV1PositionsAddressResponseSolana>,
}
///Tokens indexed by token address
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1PositionsAddressResponseSolana {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, PortfolioTokenInfo>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioTokenInfo {
    ///Token address
    pub address: String,
    ///Number of decimals for the token
    pub decimals: f64,
    ///URI of the token logo
    #[serde(rename = "logoURI", skip_serializing_if = "Option::is_none")]
    pub logo_uri: Option<String>,
    ///Token name
    pub name: String,
    ///Token symbol
    pub symbol: String,
    ///Tags associated with the token
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum PortfolioPortfolioElement {
    #[serde(rename = "multiple")]
    PortfolioPortfolioElementMultiple(PortfolioPortfolioElementMultiple),
    #[serde(rename = "liquidity")]
    PortfolioPortfolioElementLiquidity(PortfolioPortfolioElementLiquidity),
    #[serde(rename = "leverage")]
    PortfolioPortfolioElementLeverage(PortfolioPortfolioElementLeverage),
    #[serde(rename = "borrowlend")]
    PortfolioPortfolioElementBorrowLend(PortfolioPortfolioElementBorrowLend),
    #[serde(rename = "trade")]
    PortfolioPortfolioElementTrade(PortfolioPortfolioElementTrade),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementTrade {
    pub data: PortfolioPortfolioElementTradeData,
    pub label: PortfolioPortfolioElementLabel,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "netApy", skip_serializing_if = "Option::is_none")]
    pub net_apy: Option<PortfolioNetApy>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(rename = "platformId")]
    pub platform_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementTradeType {
    #[default]
    #[serde(rename = "trade")]
    Trade,
}
impl PortfolioPortfolioElementTradeType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Trade => "trade",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementTradeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementTradeType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementTradeData {
    pub assets: PortfolioPortfolioElementTradeAssets,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contract: Option<String>,
    ///Created at timestamp in ms
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<f64>,
    #[serde(
        rename = "expectedOutputAmount",
        skip_serializing_if = "Option::is_none"
    )]
    pub expected_output_amount: Option<f64>,
    ///Expire at timestamp in ms
    #[serde(rename = "expireAt", skip_serializing_if = "Option::is_none")]
    pub expire_at: Option<f64>,
    ///Filled percentage between 0 and 1
    #[serde(rename = "filledPercentage")]
    pub filled_percentage: f64,
    #[serde(rename = "initialInputAmount")]
    pub initial_input_amount: f64,
    #[serde(rename = "inputAddress")]
    pub input_address: String,
    #[serde(rename = "inputPrice")]
    pub input_price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(rename = "outputAddress")]
    pub output_address: String,
    #[serde(rename = "outputPrice")]
    pub output_price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub recurring: Option<PortfolioPortfolioElementTradeRecurring>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    #[serde(rename = "withdrawnOutputAmount")]
    pub withdrawn_output_amount: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementTradeRecurring {
    ///The total number of orders
    pub cycles: f64,
    ///The interval between two orders in ms
    pub interval: f64,
    #[serde(rename = "priceRange", skip_serializing_if = "Option::is_none")]
    pub price_range: Option<PortfolioPortfolioElementTradePriceRange>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PortfolioPortfolioElementTradePriceRange {
    ///Maximum usd price
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max: Option<f64>,
    ///Minimum usd price
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementTradeAssets {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<PortfolioPortfolioAsset>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<PortfolioPortfolioAsset>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementMultiple {
    pub data: PortfolioPortfolioElementMultipleData,
    pub label: PortfolioPortfolioElementLabel,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "netApy", skip_serializing_if = "Option::is_none")]
    pub net_apy: Option<PortfolioNetApy>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(rename = "platformId")]
    pub platform_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementMultipleType {
    #[default]
    #[serde(rename = "multiple")]
    Multiple,
}
impl PortfolioPortfolioElementMultipleType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Multiple => "multiple",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementMultipleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementMultipleType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementMultipleData {
    pub assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "assetsYields", skip_serializing_if = "Option::is_none")]
    pub assets_yields: Option<Vec<Vec<PortfolioYield>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLiquidity {
    pub data: PortfolioPortfolioElementLiquidityData,
    pub label: PortfolioPortfolioElementLabel,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "netApy", skip_serializing_if = "Option::is_none")]
    pub net_apy: Option<PortfolioNetApy>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(rename = "platformId")]
    pub platform_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementLiquidityType {
    #[default]
    #[serde(rename = "liquidity")]
    Liquidity,
}
impl PortfolioPortfolioElementLiquidityType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Liquidity => "liquidity",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementLiquidityType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementLiquidityType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLiquidityData {
    pub liquidities: Vec<PortfolioPortfolioLiquidity>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioLiquidity {
    pub assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "assetsValue")]
    pub assets_value: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contract: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lp: Option<PortfolioLiquidityLp>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "rewardAssets")]
    pub reward_assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "rewardAssetsValue")]
    pub reward_assets_value: f64,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    pub value: f64,
    pub yields: Vec<PortfolioYield>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioLiquidityLp {
    pub amount: f64,
    pub mint: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLeverage {
    pub data: PortfolioPortfolioElementLeverageData,
    pub label: PortfolioPortfolioElementLabel,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "netApy", skip_serializing_if = "Option::is_none")]
    pub net_apy: Option<PortfolioNetApy>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(rename = "platformId")]
    pub platform_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementLeverageType {
    #[default]
    #[serde(rename = "leverage")]
    Leverage,
}
impl PortfolioPortfolioElementLeverageType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Leverage => "leverage",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementLeverageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementLeverageType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLeverageData {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contract: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cross: Option<PortfolioPortfolioElementLeverageCross>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub isolated: Option<PortfolioPortfolioElementLeverageIsolated>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    ///Total value (total equity)
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLeverageIsolated {
    pub positions: Vec<PortfolioIsoLevPosition>,
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementLeverageCross {
    #[serde(rename = "collateralAssets", skip_serializing_if = "Option::is_none")]
    pub collateral_assets: Option<Vec<PortfolioPortfolioAsset>>,
    #[serde(rename = "collateralValue")]
    pub collateral_value: f64,
    ///Sum of positions sizeValue / cross value
    #[serde(skip_serializing_if = "Option::is_none")]
    pub leverage: Option<f64>,
    pub positions: Vec<PortfolioCrossLevPosition>,
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioIsoLevPosition {
    ///Address of the leveraged asset if it exists
    #[serde(skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    #[serde(rename = "collateralValue")]
    pub collateral_value: f64,
    #[serde(rename = "entryPrice")]
    pub entry_price: f64,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub leverage: Option<f64>,
    #[serde(rename = "liquidationPrice")]
    pub liquidation_price: f64,
    #[serde(rename = "markPrice")]
    pub mark_price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "pnlValue")]
    pub pnl_value: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<String>,
    pub side: PortfolioIsoLevPositionSide,
    pub size: f64,
    #[serde(rename = "sizeValue")]
    pub size_value: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sl: Option<f64>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tp: Option<f64>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioIsoLevPositionSide {
    #[default]
    #[serde(rename = "long")]
    Long,
    #[serde(rename = "short")]
    Short,
}
impl PortfolioIsoLevPositionSide {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Long => "long",
            Self::Short => "short",
        }
    }
}
impl ::std::fmt::Display for PortfolioIsoLevPositionSide {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioIsoLevPositionSide {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioCrossLevPosition {
    ///Address of the leveraged asset if it exists
    #[serde(skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    #[serde(rename = "entryPrice")]
    pub entry_price: f64,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub leverage: Option<f64>,
    #[serde(rename = "liquidationPrice")]
    pub liquidation_price: f64,
    #[serde(rename = "markPrice")]
    pub mark_price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "pnlValue")]
    pub pnl_value: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<String>,
    pub side: PortfolioCrossLevPositionSide,
    pub size: f64,
    #[serde(rename = "sizeValue")]
    pub size_value: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sl: Option<f64>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tp: Option<f64>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioCrossLevPositionSide {
    #[default]
    #[serde(rename = "long")]
    Long,
    #[serde(rename = "short")]
    Short,
}
impl PortfolioCrossLevPositionSide {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Long => "long",
            Self::Short => "short",
        }
    }
}
impl ::std::fmt::Display for PortfolioCrossLevPositionSide {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioCrossLevPositionSide {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementBorrowLend {
    pub data: PortfolioPortfolioElementBorrowLendData,
    pub label: PortfolioPortfolioElementLabel,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "netApy", skip_serializing_if = "Option::is_none")]
    pub net_apy: Option<PortfolioNetApy>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(rename = "platformId")]
    pub platform_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementLabel {
    #[default]
    #[serde(rename = "Wallet")]
    Wallet,
    #[serde(rename = "Staked")]
    Staked,
    #[serde(rename = "LiquidityPool")]
    LiquidityPool,
    #[serde(rename = "Farming")]
    Farming,
    #[serde(rename = "Vault")]
    Vault,
    #[serde(rename = "Lending")]
    Lending,
    #[serde(rename = "Vesting")]
    Vesting,
    #[serde(rename = "Deposit")]
    Deposit,
    #[serde(rename = "Rewards")]
    Rewards,
    #[serde(rename = "Airdrop")]
    Airdrop,
    #[serde(rename = "Margin")]
    Margin,
    #[serde(rename = "LimitOrder")]
    LimitOrder,
    #[serde(rename = "DCA")]
    Dca,
    #[serde(rename = "SmartDCA")]
    SmartDca,
    #[serde(rename = "Leverage")]
    Leverage,
}
impl PortfolioPortfolioElementLabel {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Wallet => "Wallet",
            Self::Staked => "Staked",
            Self::LiquidityPool => "LiquidityPool",
            Self::Farming => "Farming",
            Self::Vault => "Vault",
            Self::Lending => "Lending",
            Self::Vesting => "Vesting",
            Self::Deposit => "Deposit",
            Self::Rewards => "Rewards",
            Self::Airdrop => "Airdrop",
            Self::Margin => "Margin",
            Self::LimitOrder => "LimitOrder",
            Self::Dca => "DCA",
            Self::SmartDca => "SmartDCA",
            Self::Leverage => "Leverage",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementLabel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementLabel {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioElementBorrowLendType {
    #[default]
    #[serde(rename = "borrowlend")]
    Borrowlend,
}
impl PortfolioPortfolioElementBorrowLendType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Borrowlend => "borrowlend",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioElementBorrowLendType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioElementBorrowLendType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementBorrowLendData {
    #[serde(rename = "borrowedAssets")]
    pub borrowed_assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "borrowedValue")]
    pub borrowed_value: f64,
    #[serde(rename = "borrowedYields")]
    pub borrowed_yields: Vec<Vec<PortfolioYield>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contract: Option<String>,
    ///Date (in ms) when the loan will expire
    #[serde(rename = "expireOn", skip_serializing_if = "Option::is_none")]
    pub expire_on: Option<f64>,
    ///Health ratio (1 = full health, 0 or below = can be liquidated, null = unknown)
    #[serde(rename = "healthRatio", skip_serializing_if = "Option::is_none")]
    pub health_ratio: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "rewardAssets")]
    pub reward_assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "rewardValue")]
    pub reward_value: f64,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    #[serde(rename = "suppliedAssets")]
    pub supplied_assets: Vec<PortfolioPortfolioAsset>,
    #[serde(rename = "suppliedValue")]
    pub supplied_value: f64,
    #[serde(rename = "suppliedYields")]
    pub supplied_yields: Vec<Vec<PortfolioYield>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub unsettled: Option<PortfolioPortfolioElementBorrowLendUnsettled>,
    ///The value of the portfolio element in USD
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioElementBorrowLendUnsettled {
    pub assets: Vec<PortfolioPortfolioAssetGeneric>,
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum PortfolioPortfolioAsset {
    #[serde(rename = "generic")]
    PortfolioPortfolioAssetGeneric(PortfolioPortfolioAssetGeneric),
    #[serde(rename = "token")]
    PortfolioPortfolioAssetToken(PortfolioPortfolioAssetToken),
    #[serde(rename = "collectible")]
    PortfolioPortfolioAssetCollectible(PortfolioPortfolioAssetCollectible),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetToken {
    pub attributes: PortfolioPortfolioAssetAttributes,
    pub data: PortfolioPortfolioAssetTokenData,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioAssetTokenType {
    #[default]
    #[serde(rename = "token")]
    Token,
}
impl PortfolioPortfolioAssetTokenType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Token => "token",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioAssetTokenType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioAssetTokenType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetTokenData {
    pub address: String,
    pub amount: f64,
    pub price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub yields: Option<Vec<PortfolioYield>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetGeneric {
    pub attributes: PortfolioPortfolioAssetAttributes,
    pub data: PortfolioPortfolioAssetGenericData,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    pub value: f64,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioAssetGenericType {
    #[default]
    #[serde(rename = "generic")]
    Generic,
}
impl PortfolioPortfolioAssetGenericType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Generic => "generic",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioAssetGenericType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioAssetGenericType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PortfolioPortfolioAssetGenericData {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub price: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetCollectible {
    pub attributes: PortfolioPortfolioAssetAttributes,
    pub data: PortfolioPortfolioAssetCollectibleData,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "networkId")]
    pub network_id: PortfolioNetworkId,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#ref: Option<PortfolioRef>,
    #[serde(rename = "sourceRefs", skip_serializing_if = "Option::is_none")]
    pub source_refs: Option<Vec<PortfolioSourceRef>>,
    pub value: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioSourceRef {
    pub address: String,
    pub name: PortfolioSourceRefName,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioSourceRefName {
    #[default]
    #[serde(rename = "Pool")]
    Pool,
    #[serde(rename = "Farm")]
    Farm,
    #[serde(rename = "Market")]
    Market,
    #[serde(rename = "Vault")]
    Vault,
    #[serde(rename = "Lending Market")]
    LendingMarket,
    #[serde(rename = "Strategy")]
    Strategy,
    #[serde(rename = "NFT Mint")]
    NftMint,
    #[serde(rename = "Reserve")]
    Reserve,
    #[serde(rename = "Proposal")]
    Proposal,
    #[serde(rename = "Distributor")]
    Distributor,
    #[serde(rename = "Locker")]
    Locker,
    #[serde(rename = "Custody")]
    Custody,
    #[serde(rename = "Pair")]
    Pair,
    #[serde(rename = "Borrow Token")]
    BorrowToken,
    #[serde(rename = "Collateral Token")]
    CollateralToken,
    #[serde(rename = "Elevation Group")]
    ElevationGroup,
    #[serde(rename = "Program")]
    Program,
    #[serde(rename = "Validator")]
    Validator,
}
impl PortfolioSourceRefName {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Pool => "Pool",
            Self::Farm => "Farm",
            Self::Market => "Market",
            Self::Vault => "Vault",
            Self::LendingMarket => "Lending Market",
            Self::Strategy => "Strategy",
            Self::NftMint => "NFT Mint",
            Self::Reserve => "Reserve",
            Self::Proposal => "Proposal",
            Self::Distributor => "Distributor",
            Self::Locker => "Locker",
            Self::Custody => "Custody",
            Self::Pair => "Pair",
            Self::BorrowToken => "Borrow Token",
            Self::CollateralToken => "Collateral Token",
            Self::ElevationGroup => "Elevation Group",
            Self::Program => "Program",
            Self::Validator => "Validator",
        }
    }
}
impl ::std::fmt::Display for PortfolioSourceRefName {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioSourceRefName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Account address
pub type PortfolioRef = String;
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioPortfolioAssetCollectibleType {
    #[default]
    #[serde(rename = "collectible")]
    Collectible,
}
impl PortfolioPortfolioAssetCollectibleType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Collectible => "collectible",
        }
    }
}
impl ::std::fmt::Display for PortfolioPortfolioAssetCollectibleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioPortfolioAssetCollectibleType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetCollectibleData {
    pub address: String,
    pub amount: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attributes: Option<Vec<PortfolioCollectibleAttribute>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub collection: Option<PortfolioCollectibleCollection>,
    #[serde(rename = "dataUri", skip_serializing_if = "Option::is_none")]
    pub data_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    pub price: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PortfolioPortfolioAssetAttributes {
    #[serde(rename = "isClaimable", skip_serializing_if = "Option::is_none")]
    pub is_claimable: Option<bool>,
    #[serde(rename = "isDeprecated", skip_serializing_if = "Option::is_none")]
    pub is_deprecated: Option<bool>,
    ///Date (in ms) when the asset will be unlocked. -1 means locked for an unknown period
    #[serde(rename = "lockedUntil", skip_serializing_if = "Option::is_none")]
    pub locked_until: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub prediction: Option<PortfolioPortfolioAssetAttributesPrediction>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<PortfolioTags>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validator: Option<PortfolioPortfolioAssetAttributesValidator>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetAttributesValidator {
    pub address: String,
    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
    pub image_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    pub yields: Vec<PortfolioYield>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PortfolioYield {
    ///Annual Percentage Rate as a fraction
    #[serde(skip_serializing_if = "Option::is_none")]
    pub apr: Option<f64>,
    ///Annual Percentage Yield as a fraction (0.28 = 28%)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub apy: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
}
pub type PortfolioTags = Vec<String>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetAttributesPrediction {
    ///Timestamp in milliseconds
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<f64>,
    #[serde(rename = "feesPaidValue", skip_serializing_if = "Option::is_none")]
    pub fees_paid_value: Option<f64>,
    pub market: PortfolioPortfolioAssetAttributesMarket,
    #[serde(
        rename = "pnlAfterFeesPercent",
        skip_serializing_if = "Option::is_none"
    )]
    pub pnl_after_fees_percent: Option<f64>,
    #[serde(rename = "pnlAfterFeesValue", skip_serializing_if = "Option::is_none")]
    pub pnl_after_fees_value: Option<f64>,
    #[serde(rename = "pnlPercent", skip_serializing_if = "Option::is_none")]
    pub pnl_percent: Option<f64>,
    #[serde(rename = "pnlValue", skip_serializing_if = "Option::is_none")]
    pub pnl_value: Option<f64>,
    #[serde(rename = "sideName")]
    pub side_name: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioPortfolioAssetAttributesMarket {
    ///Timestamp in milliseconds
    #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")]
    pub close_time: Option<f64>,
    #[serde(rename = "eventTitle", skip_serializing_if = "Option::is_none")]
    pub event_title: Option<String>,
    #[serde(rename = "marketTitle")]
    pub market_title: String,
    ///Timestamp in milliseconds
    #[serde(rename = "resolveAt", skip_serializing_if = "Option::is_none")]
    pub resolve_at: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioCollectibleCollection {
    #[serde(rename = "floorPrice")]
    pub floor_price: f64,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PortfolioCollectibleAttribute {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trait_type: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub value: Option<serde_json::Value>,
    /// Additional properties not explicitly defined in the schema
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioNetworkId {
    #[default]
    #[serde(rename = "solana")]
    Solana,
}
impl PortfolioNetworkId {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Solana => "solana",
        }
    }
}
impl ::std::fmt::Display for PortfolioNetworkId {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioNetworkId {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Net APY (Annual Percentage Yield) as fraction. 0.28 means 28% APY
pub type PortfolioNetApy = f64;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PortfolioFetcherReport {
    ///Execution duration in milliseconds
    #[serde(skip_serializing_if = "Option::is_none")]
    pub duration: Option<f64>,
    ///Error message if status is failed
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Unique identifier of the fetcher
    pub id: String,
    ///Status of the fetcher execution
    pub status: PortfolioFetcherReportStatus,
}
///Status of the fetcher execution
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum PortfolioFetcherReportStatus {
    #[default]
    #[serde(rename = "succeeded")]
    Succeeded,
    #[serde(rename = "failed")]
    Failed,
}
impl PortfolioFetcherReportStatus {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Succeeded => "succeeded",
            Self::Failed => "failed",
        }
    }
}
impl ::std::fmt::Display for PortfolioFetcherReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for PortfolioFetcherReportStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
pub type GetPortfolioV1PlatformsResponse = Vec<GetPortfolioV1PlatformsResponseItem>;
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1PlatformsResponseItem {
    #[serde(rename = "defiLlamaId", skip_serializing_if = "Option::is_none")]
    pub defi_llama_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
    #[serde(rename = "isDeprecated", skip_serializing_if = "Option::is_none")]
    pub is_deprecated: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub links: Option<GetPortfolioV1PlatformsResponseLinks>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tokens: Option<Vec<String>>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetPortfolioV1PlatformsResponseLinks {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub discord: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub documentation: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub github: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub medium: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub telegram: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub twitter: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetOrderResponse {
    ///Duplicate of errorMessage for backwards compatibility
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /**Present when `taker` is defined and `transaction` is the empty string. The router quoted a price but could not build a transaction. Match on `router` + `errorCode` to identify the error.

    Aggregator routers (router is metis, dflow, okx):
    - 1: Insufficient funds
    - 2: Insufficient SOL for gas
    - 3: Swap below minimum for gasless

    JupiterZ router (router is jupiterz):
    - 1: Insufficient balance to fund the swap
    - 2: Missing associated token account
    - 3: Quote could not be built into a transaction
    */
    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
    pub error_code: Option<f64>,
    /**Human-readable error description. Present when `taker` is defined and `transaction` is the empty string.
    Match on `router` + `errorCode` instead of this string, as the message text may be parameterised.
    */
    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<String>,
    ///Quote expiration timestamp for RFQ swaps
    #[serde(rename = "expireAt", skip_serializing_if = "Option::is_none")]
    pub expire_at: Option<String>,
    ///Total fee rate charged for the swap in basis points. This includes the Jupiter platform fee plus any additional charges, such as gasless support cost recoup.
    #[serde(rename = "feeBps", skip_serializing_if = "Option::is_none")]
    pub fee_bps: Option<f64>,
    #[serde(rename = "feeMint", skip_serializing_if = "Option::is_none")]
    pub fee_mint: Option<String>,
    /**True when signature and priority fees are paid by a wallet other than the taker. Set by three independent paths:
    - Automatic Jupiter sponsorship: `signatureFeePayer = gasTzr94Pmp4Gf8vknQnqxeYxdgwFjbgdJa4msYRpnB`
    - JupiterZ market maker: `signatureFeePayer` is the MM address (varies per quote); Jupiter's gas wallet can pay the rent to create the taker's output token account when referral fees are not set
    - Integrator payer: `signatureFeePayer` is your `payer` parameter
    For a deterministic opt-out, check `signatureFeePayer == taker` on every response.
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub gasless: Option<bool>,
    #[serde(rename = "inAmount", skip_serializing_if = "Option::is_none")]
    pub in_amount: Option<String>,
    #[serde(rename = "inUsdValue", skip_serializing_if = "Option::is_none")]
    pub in_usd_value: Option<f64>,
    #[serde(rename = "inputMint", skip_serializing_if = "Option::is_none")]
    pub input_mint: Option<String>,
    #[serde(
        rename = "lastValidBlockHeight",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_valid_block_height: Option<String>,
    ///Market maker address for RFQ swaps
    #[serde(skip_serializing_if = "Option::is_none")]
    pub maker: Option<String>,
    ///"ultra" or "manual" based on parameters used
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,
    ///Minimum output amount after slippage
    #[serde(
        rename = "otherAmountThreshold",
        skip_serializing_if = "Option::is_none"
    )]
    pub other_amount_threshold: Option<String>,
    #[serde(rename = "outAmount", skip_serializing_if = "Option::is_none")]
    pub out_amount: Option<String>,
    #[serde(rename = "outUsdValue", skip_serializing_if = "Option::is_none")]
    pub out_usd_value: Option<f64>,
    #[serde(rename = "outputMint", skip_serializing_if = "Option::is_none")]
    pub output_mint: Option<String>,
    #[serde(rename = "platformFee", skip_serializing_if = "Option::is_none")]
    pub platform_fee: Option<SwapV2PlatformFee>,
    ///Price impact in percentage points (e.g. -0.1 = -0.1%). Divide by 100 to convert to a decimal fraction.
    #[serde(rename = "priceImpact", skip_serializing_if = "Option::is_none")]
    pub price_impact: Option<f64>,
    ///Deprecated: decimal price impact ratio. Use priceImpact divided by 100 instead.
    #[serde(rename = "priceImpactPct", skip_serializing_if = "Option::is_none")]
    pub price_impact_pct: Option<String>,
    ///Includes priority fees and tips (Jito, Nozomi)
    #[serde(
        rename = "prioritizationFeeLamports",
        skip_serializing_if = "Option::is_none"
    )]
    pub prioritization_fee_lamports: Option<f64>,
    #[serde(
        rename = "prioritizationFeePayer",
        skip_serializing_if = "Option::is_none"
    )]
    pub prioritization_fee_payer: Option<String>,
    ///Quote ID for RFQ swaps
    #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")]
    pub quote_id: Option<String>,
    #[serde(rename = "referralAccount", skip_serializing_if = "Option::is_none")]
    pub referral_account: Option<String>,
    ///Estimated rent fee
    #[serde(rename = "rentFeeLamports", skip_serializing_if = "Option::is_none")]
    pub rent_fee_lamports: Option<f64>,
    #[serde(rename = "rentFeePayer", skip_serializing_if = "Option::is_none")]
    pub rent_fee_payer: Option<String>,
    ///Unique request ID. Pass this to /execute.
    #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
    #[serde(rename = "routePlan", skip_serializing_if = "Option::is_none")]
    pub route_plan: Option<Vec<SwapV2RoutePlanStep>>,
    ///Which router won the quote
    #[serde(skip_serializing_if = "Option::is_none")]
    pub router: Option<GetOrderResponseRouter>,
    #[serde(
        rename = "signatureFeeLamports",
        skip_serializing_if = "Option::is_none"
    )]
    pub signature_fee_lamports: Option<f64>,
    #[serde(rename = "signatureFeePayer", skip_serializing_if = "Option::is_none")]
    pub signature_fee_payer: Option<String>,
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<f64>,
    #[serde(rename = "swapMode", skip_serializing_if = "Option::is_none")]
    pub swap_mode: Option<String>,
    ///Deprecated: use router instead
    #[serde(rename = "swapType", skip_serializing_if = "Option::is_none")]
    pub swap_type: Option<GetOrderResponseSwapType>,
    #[serde(rename = "swapUsdValue", skip_serializing_if = "Option::is_none")]
    pub swap_usd_value: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub taker: Option<String>,
    ///Response time in milliseconds
    #[serde(rename = "totalTime", skip_serializing_if = "Option::is_none")]
    pub total_time: Option<f64>,
    /**- Base64-encoded transaction. Null if taker is not provided.
    - Empty string if taker is provided but transaction could not be built (check errorCode).
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub transaction: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct SwapV2PlatformFee {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    ///Jupiter platform fee component in basis points. This is the fee Jupiter intends to make from the swap and does not include gasless support cost recoup.
    #[serde(rename = "feeBps", skip_serializing_if = "Option::is_none")]
    pub fee_bps: Option<f64>,
    #[serde(rename = "feeMint", skip_serializing_if = "Option::is_none")]
    pub fee_mint: Option<String>,
}
///Deprecated: use router instead
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetOrderResponseSwapType {
    #[default]
    #[serde(rename = "aggregator")]
    Aggregator,
    #[serde(rename = "rfq")]
    Rfq,
    #[serde(rename = "aggregator+rfq")]
    AggregatorRfq,
    #[serde(rename = "dflow")]
    Dflow,
    #[serde(rename = "okx")]
    Okx,
}
impl GetOrderResponseSwapType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Aggregator => "aggregator",
            Self::Rfq => "rfq",
            Self::AggregatorRfq => "aggregator+rfq",
            Self::Dflow => "dflow",
            Self::Okx => "okx",
        }
    }
}
impl ::std::fmt::Display for GetOrderResponseSwapType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetOrderResponseSwapType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Which router won the quote
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetOrderResponseRouter {
    #[default]
    #[serde(rename = "metis")]
    Metis,
    #[serde(rename = "jupiterz")]
    Jupiterz,
    #[serde(rename = "dflow")]
    Dflow,
    #[serde(rename = "okx")]
    Okx,
}
impl GetOrderResponseRouter {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Metis => "metis",
            Self::Jupiterz => "jupiterz",
            Self::Dflow => "dflow",
            Self::Okx => "okx",
        }
    }
}
impl ::std::fmt::Display for GetOrderResponseRouter {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetOrderResponseRouter {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetBuildResponse {
    ///Address lookup table mappings for v0 transactions
    #[serde(
        rename = "addressesByLookupTableAddress",
        skip_serializing_if = "Option::is_none"
    )]
    pub addresses_by_lookup_table_address: Option<GetBuildResponseAddressesByLookupTableAddress>,
    #[serde(
        rename = "blockhashWithMetadata",
        skip_serializing_if = "Option::is_none"
    )]
    pub blockhash_with_metadata: Option<GetBuildResponseBlockhashWithMetadata>,
    #[serde(rename = "cleanupInstruction", skip_serializing_if = "Option::is_none")]
    pub cleanup_instruction: Option<SwapV2Instruction>,
    ///Compute unit price instruction (does not include compute unit limit)
    #[serde(
        rename = "computeBudgetInstructions",
        skip_serializing_if = "Option::is_none"
    )]
    pub compute_budget_instructions: Option<Vec<SwapV2Instruction>>,
    #[serde(rename = "inAmount", skip_serializing_if = "Option::is_none")]
    pub in_amount: Option<String>,
    #[serde(rename = "inputMint", skip_serializing_if = "Option::is_none")]
    pub input_mint: Option<String>,
    ///Minimum output amount after slippage
    #[serde(
        rename = "otherAmountThreshold",
        skip_serializing_if = "Option::is_none"
    )]
    pub other_amount_threshold: Option<String>,
    #[serde(rename = "otherInstructions", skip_serializing_if = "Option::is_none")]
    pub other_instructions: Option<Vec<SwapV2Instruction>>,
    #[serde(rename = "outAmount", skip_serializing_if = "Option::is_none")]
    pub out_amount: Option<String>,
    #[serde(rename = "outputMint", skip_serializing_if = "Option::is_none")]
    pub output_mint: Option<String>,
    #[serde(rename = "routePlan", skip_serializing_if = "Option::is_none")]
    pub route_plan: Option<Vec<SwapV2RoutePlanStep>>,
    ///Pre-swap setup instructions (e.g. create ATAs)
    #[serde(rename = "setupInstructions", skip_serializing_if = "Option::is_none")]
    pub setup_instructions: Option<Vec<SwapV2Instruction>>,
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<f64>,
    #[serde(rename = "swapInstruction", skip_serializing_if = "Option::is_none")]
    pub swap_instruction: Option<SwapV2Instruction>,
    #[serde(rename = "swapMode", skip_serializing_if = "Option::is_none")]
    pub swap_mode: Option<String>,
    #[serde(rename = "tipInstruction", skip_serializing_if = "Option::is_none")]
    pub tip_instruction: Option<SwapV2Instruction>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV2RoutePlanStep {
    ///Basis points of total swap routed through this step
    pub bps: f64,
    ///Percentage of total swap routed through this step
    pub percent: f64,
    #[serde(rename = "swapInfo")]
    pub swap_info: SwapV2SwapInfo,
    ///USD value of this step
    #[serde(rename = "usdValue", skip_serializing_if = "Option::is_none")]
    pub usd_value: Option<f64>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV2SwapInfo {
    #[serde(rename = "ammKey")]
    pub amm_key: String,
    #[serde(rename = "inAmount")]
    pub in_amount: String,
    #[serde(rename = "inputMint")]
    pub input_mint: String,
    pub label: String,
    #[serde(rename = "outAmount")]
    pub out_amount: String,
    #[serde(rename = "outputMint")]
    pub output_mint: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV2Instruction {
    pub accounts: Vec<SwapV2InstructionAccountsItem>,
    ///Base64-encoded instruction data
    pub data: String,
    ///Program executing the instruction
    #[serde(rename = "programId")]
    pub program_id: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV2InstructionAccountsItem {
    #[serde(rename = "isSigner")]
    pub is_signer: bool,
    #[serde(rename = "isWritable")]
    pub is_writable: bool,
    pub pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetBuildResponseBlockhashWithMetadata {
    ///Blockhash as byte array
    #[serde(skip_serializing_if = "Option::is_none")]
    pub blockhash: Option<Vec<f64>>,
    ///ISO 8601 timestamp of when the blockhash was fetched
    #[serde(rename = "fetchedAt", skip_serializing_if = "Option::is_none")]
    pub fetched_at: Option<String>,
    #[serde(
        rename = "lastValidBlockHeight",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_valid_block_height: Option<f64>,
}
///Address lookup table mappings for v0 transactions
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetBuildResponseAddressesByLookupTableAddress {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, Vec<String>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct DeletePredictionV1PositionsResponse {
    pub data: Vec<DeletePredictionV1PositionsResponseDataItemUnion>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum DeletePredictionV1PositionsResponseDataItemUnion {
    PredictionCreateOrderResponse(PredictionCreateOrderResponse),
    PredictionClaimPositionResponse(PredictionClaimPositionResponse),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionCreateOrderResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution: Option<PredictionExecution>,
    ///Execution model for the order. `atomic_swap` for Jupiter Forecast (bisonfi) orders, which execute as a single atomic swap through `POST /execute`. `null` for keeper-filled prediction orders.
    #[serde(rename = "executionModel", skip_serializing_if = "Option::is_none")]
    pub execution_model: Option<String>,
    #[serde(rename = "externalOrderId", skip_serializing_if = "Option::is_none")]
    pub external_order_id: Option<String>,
    ///Jupiter swap request id when the order executes as a swap (Jupiter Forecast). `null` otherwise.
    #[serde(
        rename = "jupiterSwapRequestId",
        skip_serializing_if = "Option::is_none"
    )]
    pub jupiter_swap_request_id: Option<String>,
    pub order: PredictionCreateOrderResponseOrder,
    ///Public keys that must sign the returned transaction
    #[serde(rename = "requiredSigners", skip_serializing_if = "Option::is_none")]
    pub required_signers: Option<Vec<String>>,
    ///Settlement mode. `auto` for Jupiter Forecast orders, which settle automatically. `null` for keeper-filled prediction orders.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub settlement: Option<String>,
    ///Base64 encoded transaction
    #[serde(skip_serializing_if = "Option::is_none")]
    pub transaction: Option<String>,
    ///Transaction metadata
    #[serde(rename = "txMeta", skip_serializing_if = "Option::is_none")]
    pub tx_meta: Option<PredictionCreateOrderResponseTxMeta>,
}
///Transaction metadata
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionCreateOrderResponseTxMeta {
    pub blockhash: String,
    ///Constraint: minimum=0
    #[serde(rename = "lastValidBlockHeight")]
    pub last_valid_block_height: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionCreateOrderResponseOrder {
    ///Legacy whole-contract quantity. Use contractsMicro or contractsDecimal for the exact fractional quantity.
    pub contracts: String,
    ///Contracts as a decimal string
    #[serde(rename = "contractsDecimal", skip_serializing_if = "Option::is_none")]
    pub contracts_decimal: Option<String>,
    ///Contracts in micro-contract units (u64 as string, 1000000 = 1 contract)
    #[serde(rename = "contractsMicro", skip_serializing_if = "Option::is_none")]
    pub contracts_micro: Option<String>,
    ///Estimated protocol fee (micro USD)
    #[serde(rename = "estimatedProtocolFeeUsd")]
    pub estimated_protocol_fee_usd: String,
    ///Estimated total fees applied (micro USD)
    #[serde(rename = "estimatedTotalFeeUsd")]
    pub estimated_total_fee_usd: String,
    ///Estimated venue fee (micro USD)
    #[serde(rename = "estimatedVenueFeeUsd")]
    pub estimated_venue_fee_usd: String,
    ///Client provided order identifier
    #[serde(rename = "externalOrderId", skip_serializing_if = "Option::is_none")]
    pub external_order_id: Option<String>,
    ///True when the order increases exposure
    #[serde(rename = "isBuy")]
    pub is_buy: bool,
    ///True when the order is on the YES side
    #[serde(rename = "isYes")]
    pub is_yes: bool,
    ///Associated market identifier
    #[serde(rename = "marketId")]
    pub market_id: String,
    ///Hashed market identifier used for on-chain PDAs
    #[serde(rename = "marketIdHash")]
    pub market_id_hash: String,
    ///Max fill price for buys (micro USD)
    #[serde(rename = "maxBuyPriceUsd", skip_serializing_if = "Option::is_none")]
    pub max_buy_price_usd: Option<String>,
    ///Maximum slippage allowed for this order, in basis points
    ///Constraint: minimum=0
    #[serde(rename = "maxSlippageBps", skip_serializing_if = "Option::is_none")]
    pub max_slippage_bps: Option<i64>,
    ///Min fill price for sells (micro USD)
    #[serde(rename = "minSellPriceUsd", skip_serializing_if = "Option::is_none")]
    pub min_sell_price_usd: Option<String>,
    ///Average position entry price after the order
    #[serde(rename = "newAvgPriceUsd")]
    pub new_avg_price_usd: String,
    ///Position contracts after executing the order (legacy whole-contract quantity)
    #[serde(rename = "newContracts")]
    pub new_contracts: String,
    ///Position contracts after the order, as a decimal string
    #[serde(
        rename = "newContractsDecimal",
        skip_serializing_if = "Option::is_none"
    )]
    pub new_contracts_decimal: Option<String>,
    ///Position contracts after the order, in micro-contract units
    #[serde(rename = "newContractsMicro", skip_serializing_if = "Option::is_none")]
    pub new_contracts_micro: Option<String>,
    ///Position max payout after the order
    #[serde(rename = "newPayoutUsd")]
    pub new_payout_usd: String,
    ///Total position cost basis after the order
    #[serde(rename = "newSizeUsd")]
    pub new_size_usd: String,
    ///Order escrow token account
    #[serde(rename = "orderAtaPubkey", skip_serializing_if = "Option::is_none")]
    pub order_ata_pubkey: Option<String>,
    ///Notional for this order in micro USD
    #[serde(rename = "orderCostUsd")]
    pub order_cost_usd: String,
    ///Order account public key
    #[serde(rename = "orderPubkey", skip_serializing_if = "Option::is_none")]
    pub order_pubkey: Option<String>,
    ///Position max payout for this order (micro USD)
    #[serde(rename = "payoutUsd", skip_serializing_if = "Option::is_none")]
    pub payout_usd: Option<String>,
    ///Position PDA used for the order
    #[serde(rename = "positionPubkey")]
    pub position_pubkey: String,
    ///Estimated slippage for this order, in basis points (0 = none, 250 = 2.5%). For a Polymarket buy this is the estimated price impact from sweeping orderbook levels; for a sell it is the max allowed slippage from best bid to the protected sell floor. Treat it as a quote signal, not a guaranteed loss.
    ///Constraint: minimum=0
    #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
    pub slippage_bps: Option<i64>,
    ///Order owner public key
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
///Execution details returned with an order build. Sign the build's `transaction`, then pass `context` unchanged to `POST /execute`.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionExecution {
    ///Opaque execution context. Pass this object unchanged to `POST /execute`. Includes a `type` field (`create_order` for keeper-filled orders, `bisonfi_swap` for Jupiter Forecast orders).
    pub context: PredictionExecutionContext,
    ///Relative execute path. Resolves to `https://api.jup.ag/prediction/v1/execute`.
    pub endpoint: String,
}
///Opaque execution context. Pass this object unchanged to `POST /execute`. Includes a `type` field (`create_order` for keeper-filled orders, `bisonfi_swap` for Jupiter Forecast orders).
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionExecutionContext {
    /// Additional properties not explicitly defined in the schema
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionClaimPositionResponse {
    pub position: PredictionClaimPositionResponsePosition,
    ///Base64 encoded transaction
    pub transaction: String,
    #[serde(rename = "txMeta")]
    pub tx_meta: PredictionClaimPositionResponseTxMeta,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionClaimPositionResponseTxMeta {
    pub blockhash: String,
    ///Constraint: minimum=0
    #[serde(rename = "lastValidBlockHeight")]
    pub last_valid_block_height: i64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionClaimPositionResponsePosition {
    ///Legacy whole-contract quantity settled. Use contractsMicro or contractsDecimal for the exact fractional quantity.
    pub contracts: String,
    ///Contracts settled as a decimal string
    #[serde(rename = "contractsDecimal", skip_serializing_if = "Option::is_none")]
    pub contracts_decimal: Option<String>,
    ///Contracts settled in micro-contract units (u64 as string, 1000000 = 1 contract)
    #[serde(rename = "contractsMicro", skip_serializing_if = "Option::is_none")]
    pub contracts_micro: Option<String>,
    #[serde(rename = "isYes")]
    pub is_yes: bool,
    ///Market account public key
    #[serde(rename = "marketPubkey")]
    pub market_pubkey: String,
    ///Position owner public key
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    ///Payout amount in micro USD (u64 as string)
    #[serde(rename = "payoutAmountUsd")]
    pub payout_amount_usd: String,
    ///Position account public key
    #[serde(rename = "positionPubkey")]
    pub position_pubkey: String,
    ///User public key requesting claim
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct ArrayItemItem {
    /**- Human-readable warning message
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /**- Severity level of the warning
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub severity: Option<GetUltraV1ShieldResponseSeverity>,
    /**- Optional external source of the warning
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source: Option<GetUltraV1ShieldResponseSource>,
    /**- Type of warning for the token
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#type: Option<GetUltraV1ShieldResponseType>,
}
/**- Type of warning for the token
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1ShieldResponseType {
    #[default]
    #[serde(rename = "NOT_VERIFIED")]
    NotVerified,
    #[serde(rename = "LOW_LIQUIDITY")]
    LowLiquidity,
    #[serde(rename = "NOT_SELLABLE")]
    NotSellable,
    #[serde(rename = "LOW_ORGANIC_ACTIVITY")]
    LowOrganicActivity,
    #[serde(rename = "HAS_MINT_AUTHORITY")]
    HasMintAuthority,
    #[serde(rename = "HAS_FREEZE_AUTHORITY")]
    HasFreezeAuthority,
    #[serde(rename = "HAS_PERMANENT_DELEGATE")]
    HasPermanentDelegate,
    #[serde(rename = "NEW_LISTING")]
    NewListing,
    #[serde(rename = "VERY_LOW_TRADING_ACTIVITY")]
    VeryLowTradingActivity,
    #[serde(rename = "HIGH_SUPPLY_CONCENTRATION")]
    HighSupplyConcentration,
    #[serde(rename = "NON_TRANSFERABLE")]
    NonTransferable,
    #[serde(rename = "MUTABLE_TRANSFER_FEES")]
    MutableTransferFees,
    #[serde(rename = "SUSPICIOUS_DEV_ACTIVITY")]
    SuspiciousDevActivity,
    #[serde(rename = "SUSPICIOUS_TOP_HOLDER_ACTIVITY")]
    SuspiciousTopHolderActivity,
    #[serde(rename = "HIGH_SINGLE_OWNERSHIP")]
    HighSingleOwnership,
    #[serde(rename = "{}%_TRANSFER_FEES")]
    TransferFees,
}
impl GetUltraV1ShieldResponseType {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::NotVerified => "NOT_VERIFIED",
            Self::LowLiquidity => "LOW_LIQUIDITY",
            Self::NotSellable => "NOT_SELLABLE",
            Self::LowOrganicActivity => "LOW_ORGANIC_ACTIVITY",
            Self::HasMintAuthority => "HAS_MINT_AUTHORITY",
            Self::HasFreezeAuthority => "HAS_FREEZE_AUTHORITY",
            Self::HasPermanentDelegate => "HAS_PERMANENT_DELEGATE",
            Self::NewListing => "NEW_LISTING",
            Self::VeryLowTradingActivity => "VERY_LOW_TRADING_ACTIVITY",
            Self::HighSupplyConcentration => "HIGH_SUPPLY_CONCENTRATION",
            Self::NonTransferable => "NON_TRANSFERABLE",
            Self::MutableTransferFees => "MUTABLE_TRANSFER_FEES",
            Self::SuspiciousDevActivity => "SUSPICIOUS_DEV_ACTIVITY",
            Self::SuspiciousTopHolderActivity => "SUSPICIOUS_TOP_HOLDER_ACTIVITY",
            Self::HighSingleOwnership => "HIGH_SINGLE_OWNERSHIP",
            Self::TransferFees => "{}%_TRANSFER_FEES",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1ShieldResponseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1ShieldResponseType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
/**- Optional external source of the warning
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1ShieldResponseSource {
    #[default]
    #[serde(rename = "RugCheck")]
    RugCheck,
}
impl GetUltraV1ShieldResponseSource {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::RugCheck => "RugCheck",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1ShieldResponseSource {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1ShieldResponseSource {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
/**- Severity level of the warning
*/
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum GetUltraV1ShieldResponseSeverity {
    #[default]
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warning")]
    Warning,
    #[serde(rename = "critical")]
    Critical,
}
impl GetUltraV1ShieldResponseSeverity {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Info => "info",
            Self::Warning => "warning",
            Self::Critical => "critical",
        }
    }
}
impl ::std::fmt::Display for GetUltraV1ShieldResponseSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for GetUltraV1ShieldResponseSeverity {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetBuildResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetOrderResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1OrderbookMarketIdResponse {
    ///NO-side levels sorted by price ascending. Each entry is a [price_cents, size] tuple. price_cents is rounded, so sub-cent levels show 0; size may be fractional.
    pub no: Vec<Vec<f64>>,
    ///NO-side levels with price as decimal dollar string. Each entry is a [price_string, size] tuple, e.g. ["0.0100", 219].
    pub no_dollars: Vec<Vec<serde_json::Value>>,
    ///YES-side levels sorted by price ascending. Each entry is a [price_cents, size] tuple. price_cents is rounded, so sub-cent levels show 0; size may be fractional.
    pub yes: Vec<Vec<f64>>,
    ///YES-side levels with price as decimal dollar string. Each entry is a [price_string, size] tuple, e.g. ["0.0100", 346014].
    pub yes_dollars: Vec<Vec<serde_json::Value>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1ProfilesOwnerPubkeyResponse {
    #[serde(rename = "correctPredictions")]
    pub correct_predictions: String,
    #[serde(rename = "ownerPubkey")]
    pub owner_pubkey: String,
    #[serde(rename = "predictionsCount")]
    pub predictions_count: String,
    #[serde(rename = "realizedPnlUsd")]
    pub realized_pnl_usd: String,
    ///Legacy whole-contract count. Use totalActiveContractsMicro or totalActiveContractsDecimal for the exact value.
    #[serde(rename = "totalActiveContracts")]
    pub total_active_contracts: String,
    ///Active contracts as a decimal string
    #[serde(
        rename = "totalActiveContractsDecimal",
        skip_serializing_if = "Option::is_none"
    )]
    pub total_active_contracts_decimal: Option<String>,
    ///Active contracts in micro-contract units (1000000 = 1 contract)
    #[serde(
        rename = "totalActiveContractsMicro",
        skip_serializing_if = "Option::is_none"
    )]
    pub total_active_contracts_micro: Option<String>,
    #[serde(rename = "totalPositionsValueUsd")]
    pub total_positions_value_usd: String,
    #[serde(rename = "totalVolumeUsd")]
    pub total_volume_usd: String,
    #[serde(rename = "wrongPredictions")]
    pub wrong_predictions: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1ProfilesOwnerPubkeyResponse404 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetPredictionV1VaultInfoResponse404 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetSendV1InviteHistoryResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetSendV1InviteHistoryResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetSendV1PendingInvitesResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetSendV1PendingInvitesResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetStudioV1DbcPoolAddressesMintResponse400 {
    ///Validation errors
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetStudioV1DbcPoolAddressesMintResponse404 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct GetStudioV1DbcPoolAddressesMintResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
pub type GetTokensV1MarketMarketAddressMintsResponse = Vec<String>;
pub type GetTokensV1MintsTradableResponse = Vec<String>;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2CategoryIntervalResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2CategoryIntervalResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2RecentResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2RecentResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2SearchResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2SearchResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2TagResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTokensV2TagResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV2VaultRegisterResponse201 {
    #[serde(rename = "privyVaultId")]
    pub privy_vault_id: String,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
    #[serde(rename = "vaultPubkey")]
    pub vault_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetTriggerV2VaultResponse {
    #[serde(rename = "privyUserId", skip_serializing_if = "Option::is_none")]
    pub privy_user_id: Option<String>,
    #[serde(rename = "privyVaultId")]
    pub privy_vault_id: String,
    #[serde(rename = "userPubkey")]
    pub user_pubkey: String,
    #[serde(rename = "vaultPubkey")]
    pub vault_pubkey: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1BalancesAddressResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1BalancesAddressResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1OrderResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1SearchResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1SearchResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1ShieldResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct GetUltraV1ShieldResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum LendBorrowMarket {
    #[default]
    #[serde(rename = "main")]
    Main,
    #[serde(rename = "ethena")]
    Ethena,
}
impl LendBorrowMarket {
    pub fn as_str(&self) -> &'static str {
        match self {
            Self::Main => "main",
            Self::Ethena => "ethena",
        }
    }
}
impl ::std::fmt::Display for LendBorrowMarket {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_str())
    }
}
impl AsRef<str> for LendBorrowMarket {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
///Request body validated by `operateValidator` in `app/validators/borrowing.ts`.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowOperatePayload {
    ///Collateral delta in supply-token base units. Positive deposits collateral, negative withdraws. Use -170141183460469231731687303715884105728 (MIN_I128) to withdraw all collateral.
    ///Constraint: pattern=`^-?[0-9]+$`
    #[serde(rename = "colAmount")]
    pub col_amount: String,
    ///Debt delta in borrow-token base units. Positive borrows, negative repays. Use -170141183460469231731687303715884105728 (MIN_I128) to repay all debt.
    ///Constraint: pattern=`^-?[0-9]+$`
    #[serde(rename = "debtAmount")]
    pub debt_amount: String,
    ///Existing position id. Use `0` when opening a new position.
    #[serde(rename = "positionId")]
    pub position_id: i64,
    ///Optional position owner when operating on behalf of another wallet.
    #[serde(rename = "positionOwner", skip_serializing_if = "Option::is_none")]
    pub position_owner: Option<String>,
    ///Transaction fee payer and signer wallet address.
    pub signer: String,
    ///Target vault id.
    #[serde(rename = "vaultId")]
    pub vault_id: i64,
}
impl LendBorrowOperatePayload {
    /// Construct this request with every required wire field.
    pub fn new(
        col_amount: String,
        debt_amount: String,
        position_id: i64,
        signer: String,
        vault_id: i64,
    ) -> Self {
        Self {
            col_amount,
            debt_amount,
            position_id,
            signer,
            vault_id,
            position_owner: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        col_amount: String,
        debt_amount: String,
        position_id: i64,
        signer: String,
        vault_id: i64,
    ) -> LendBorrowOperatePayloadBuilder {
        LendBorrowOperatePayloadBuilder::new(col_amount, debt_amount, position_id, signer, vault_id)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct LendBorrowOperatePayloadBuilder {
    value: LendBorrowOperatePayload,
}
impl LendBorrowOperatePayloadBuilder {
    /// Start a builder with every required wire field.
    pub fn new(
        col_amount: String,
        debt_amount: String,
        position_id: i64,
        signer: String,
        vault_id: i64,
    ) -> Self {
        Self {
            value: LendBorrowOperatePayload::new(
                col_amount,
                debt_amount,
                position_id,
                signer,
                vault_id,
            ),
        }
    }
    #[doc = concat!("Set the optional `", "positionOwner", "` request field.")]
    #[must_use]
    pub fn position_owner(mut self, position_owner: String) -> Self {
        self.value.position_owner = Some(position_owner);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> LendBorrowOperatePayload {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendBorrowOperateTransactionResponse {
    ///Position NFT id affected by the operation.
    #[serde(rename = "nftId")]
    pub nft_id: i64,
    ///Base64-encoded unsigned versioned transaction.
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendEarnAmountRequestBody {
    #[serde(default)]
    pub amount: String,
    #[serde(default)]
    pub asset: String,
    #[serde(default)]
    pub signer: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendEarnSharesRequestBody {
    #[serde(default)]
    pub asset: String,
    #[serde(default)]
    pub shares: String,
    #[serde(default)]
    pub signer: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendTransactionResponse {
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct LendUserEarningsResponse {
    pub address: String,
    pub earnings: f64,
    #[serde(rename = "ownerAddress")]
    pub owner_address: String,
    pub slot: f64,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PatchTriggerV2OrdersPriceOrderIdResponse {
    pub id: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostExecuteRequest {
    ///Optional block height for nonce validation
    #[serde(
        rename = "lastValidBlockHeight",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_valid_block_height: Option<String>,
    ///The requestId from the /order response
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Base64-encoded signed transaction
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
impl PostExecuteRequest {
    /// Construct this request with every required wire field.
    pub fn new(request_id: String, signed_transaction: String) -> Self {
        Self {
            request_id,
            signed_transaction,
            last_valid_block_height: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(request_id: String, signed_transaction: String) -> PostExecuteRequestBuilder {
        PostExecuteRequestBuilder::new(request_id, signed_transaction)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostExecuteRequestBuilder {
    value: PostExecuteRequest,
}
impl PostExecuteRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(request_id: String, signed_transaction: String) -> Self {
        Self {
            value: PostExecuteRequest::new(request_id, signed_transaction),
        }
    }
    #[doc = concat!("Set the optional `", "lastValidBlockHeight", "` request field.")]
    #[must_use]
    pub fn last_valid_block_height(mut self, last_valid_block_height: String) -> Self {
        self.value.last_valid_block_height = Some(last_valid_block_height);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostExecuteRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostExecuteResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub code: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostExecuteResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftClawbackRequest {
    /**- Program Derived Address derived by `"invite"` and the public key of the invite
    - Do note that, the invitePDA requires to be generated client side, [refer to docs](/docs/send)
    - Please handle invite code and secret key with highest security as user funds are involved
    */
    #[serde(rename = "invitePDA")]
    pub invite_pda: String,
    /**- Public key address of the sender
    - Since this address funded the invite, it will be the receiving address of the full amount
    */
    pub sender: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftClawbackResponse {
    /**- Base64-encoded unsigned Send transaction
     */
    pub tx: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftClawbackResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftClawbackResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftSendRequest {
    /**- Amount in atomic value (before decimals)
    - E.g. to send 1 USDC is equivalent of `amount='1000000'`
    - Do note that there will be additional SOL amount being used in the transaction for transaction fees and token accounts
    */
    pub amount: String,
    /**- Public key address generated from the hash of the invite code
    - Do note that, the invite code requires to be generated client side, [refer to docs](/docs/send)
    - Please handle invite code and secret key with highest security as user funds are involved
    */
    #[serde(rename = "inviteSigner")]
    pub invite_signer: String,
    /**- Defaults to WSOL mint
    - Only pass in this parameter with other mint when required
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint: Option<String>,
    /**- Public key address of the sender
    - This address will be funding the amount to be sent and the token accounts involved
    */
    pub sender: String,
}
impl PostSendV1CraftSendRequest {
    /// Construct this request with every required wire field.
    pub fn new(amount: String, invite_signer: String, sender: String) -> Self {
        Self {
            amount,
            invite_signer,
            sender,
            mint: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        amount: String,
        invite_signer: String,
        sender: String,
    ) -> PostSendV1CraftSendRequestBuilder {
        PostSendV1CraftSendRequestBuilder::new(amount, invite_signer, sender)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostSendV1CraftSendRequestBuilder {
    value: PostSendV1CraftSendRequest,
}
impl PostSendV1CraftSendRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(amount: String, invite_signer: String, sender: String) -> Self {
        Self {
            value: PostSendV1CraftSendRequest::new(amount, invite_signer, sender),
        }
    }
    #[doc = concat!("Set the optional `", "mint", "` request field.")]
    #[must_use]
    pub fn mint(mut self, mint: String) -> Self {
        self.value.mint = Some(mint);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostSendV1CraftSendRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftSendResponse {
    /**- Unix timestamp of when the invite will expire
    - Expired invites will automatically clawback to sender
    */
    pub expiry: String,
    /**- Amount of fees required for network's transaction fee and token accounts
     */
    #[serde(rename = "totalFeeLamports")]
    pub total_fee_lamports: String,
    /**- Base64-encoded unsigned Send transaction
     */
    pub tx: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftSendResponse400 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostSendV1CraftSendResponse500 {
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostStudioV1DbcFeeCreateTxResponse {
    ///Base64-encoded transaction ready for signing
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeCreateTxResponse403 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcFeeCreateTxResponse404 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostStudioV1DbcFeeRequest {
    /**- Dynamic Bonding Curve pool address
     */
    #[serde(rename = "poolAddress")]
    pub pool_address: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostStudioV1DbcFeeResponse {
    /**- Total trading quote fee amount divided by 2 (creator share)
     */
    pub total: String,
    /**- Unclaimed creator quote fee amount
     */
    pub unclaimed: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcPoolCreateTxResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcPoolCreateTxResponse500 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub details: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PostStudioV1DbcPoolSubmitResponse400 {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<serde_json::Value>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrderRequest {
    /**In microlamports, defaults to 95th percentile of priority fees
     */
    #[serde(rename = "computeUnitPrice", skip_serializing_if = "Option::is_none")]
    pub compute_unit_price: Option<String>,
    #[serde(default)]
    pub maker: String,
    #[serde(default)]
    pub order: String,
}
impl PostTriggerV1CancelOrderRequest {
    /// Construct this request with every required wire field.
    pub fn new(maker: String, order: String) -> Self {
        Self {
            maker,
            order,
            compute_unit_price: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(maker: String, order: String) -> PostTriggerV1CancelOrderRequestBuilder {
        PostTriggerV1CancelOrderRequestBuilder::new(maker, order)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV1CancelOrderRequestBuilder {
    value: PostTriggerV1CancelOrderRequest,
}
impl PostTriggerV1CancelOrderRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(maker: String, order: String) -> Self {
        Self {
            value: PostTriggerV1CancelOrderRequest::new(maker, order),
        }
    }
    #[doc = concat!("Set the optional `", "computeUnitPrice", "` request field.")]
    #[must_use]
    pub fn compute_unit_price(mut self, compute_unit_price: String) -> Self {
        self.value.compute_unit_price = Some(compute_unit_price);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV1CancelOrderRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrderResponse {
    ///Required to make a request to `/execute`
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Unsigned base-64 encoded transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrdersRequest {
    /**In microlamports, defaults to 95th percentile of priority fees
     */
    #[serde(rename = "computeUnitPrice", skip_serializing_if = "Option::is_none")]
    pub compute_unit_price: Option<String>,
    #[serde(default)]
    pub maker: String,
    /**Array of orders to cancel, if none is provided, the API will generate cancel instructions for all open orders belonging to the maker
     */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub orders: Option<Vec<String>>,
}
impl PostTriggerV1CancelOrdersRequest {
    /// Construct this request with every required wire field.
    pub fn new(maker: String) -> Self {
        Self {
            maker,
            compute_unit_price: None,
            orders: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(maker: String) -> PostTriggerV1CancelOrdersRequestBuilder {
        PostTriggerV1CancelOrdersRequestBuilder::new(maker)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PostTriggerV1CancelOrdersRequestBuilder {
    value: PostTriggerV1CancelOrdersRequest,
}
impl PostTriggerV1CancelOrdersRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(maker: String) -> Self {
        Self {
            value: PostTriggerV1CancelOrdersRequest::new(maker),
        }
    }
    #[doc = concat!("Set the optional `", "computeUnitPrice", "` request field.")]
    #[must_use]
    pub fn compute_unit_price(mut self, compute_unit_price: String) -> Self {
        self.value.compute_unit_price = Some(compute_unit_price);
        self
    }
    #[doc = concat!("Set the optional `", "orders", "` request field.")]
    #[must_use]
    pub fn orders(mut self, orders: Vec<String>) -> Self {
        self.value.orders = Some(orders);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PostTriggerV1CancelOrdersRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CancelOrdersResponse {
    ///Required to make a request to `/execute`
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Array of unsigned base-64 encoded transaction(s)
    pub transactions: Vec<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1CreateOrderResponse {
    ///Base-58 account which is the Trigger Order account
    #[serde(skip_serializing_if = "Option::is_none")]
    pub order: Option<String>,
    ///Required to make a request to `/execute`
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Unsigned base-64 encoded transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV1ExecuteRequest {
    ///Found in the response of `/createOrder` or `/cancelOrder`
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///The signed transaction to execute
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2AuthVerifyResponse {
    ///JWT token (24h TTL)
    pub token: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2DepositCraftResponse {
    ///Deposit amount in smallest unit
    pub amount: String,
    ///Deterministic per-order input token account. Returned for deposits crafted with an orderSubType.
    #[serde(rename = "inputTokenAccount", skip_serializing_if = "Option::is_none")]
    pub input_token_account: Option<String>,
    ///Jupiter Lend position account. Returned instead of inputTokenAccount when the deposit is crafted with jlMint (Earn While You Wait).
    #[serde(rename = "jlTokenAccount", skip_serializing_if = "Option::is_none")]
    pub jl_token_account: Option<String>,
    ///Token mint being deposited
    pub mint: String,
    ///Deterministic per-order output token account. Returned only when orderSubType is otoco.
    #[serde(rename = "outputTokenAccount", skip_serializing_if = "Option::is_none")]
    pub output_token_account: Option<String>,
    ///Vault public key receiving the deposit
    #[serde(rename = "receiverAddress")]
    pub receiver_address: String,
    ///Deposit request ID (used when creating the order)
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Token decimals
    #[serde(rename = "tokenDecimals")]
    pub token_decimals: f64,
    ///Base64-encoded unsigned transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersDcaCancelIdResponse {
    pub id: String,
    ///Amount to be refunded in smallest units
    #[serde(rename = "refundAmount")]
    pub refund_amount: String,
    ///Pass to confirm-cancel as cancelRequestId
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Rounds that will not execute
    #[serde(rename = "roundsRemaining")]
    pub rounds_remaining: f64,
    ///Base64-encoded unsigned withdrawal transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersDcaConfirmCancelIdRequest {
    ///requestId from the cancel response
    #[serde(rename = "cancelRequestId")]
    pub cancel_request_id: String,
    ///Base64-encoded signed withdrawal transaction
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersPriceCancelOrderIdResponse {
    pub id: String,
    ///Cancel request ID (used in confirm step)
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Base64-encoded unsigned withdrawal transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostTriggerV2OrdersPriceConfirmCancelOrderIdRequest {
    ///Cancel request ID from the initiate step
    #[serde(rename = "cancelRequestId")]
    pub cancel_request_id: String,
    ///Base64-encoded signed withdrawal transaction
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostUltraV1ExecuteRequest {
    /**- Found in response of `/order`
     */
    #[serde(rename = "requestId")]
    pub request_id: String,
    /**- The signed transaction to execute
     */
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostUltraV1ExecuteResponse400 {
    pub code: f64,
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PostUltraV1ExecuteResponse500 {
    pub code: f64,
    pub error: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionClaimPositionRequest {
    ///Position owner public key
    ///Constraint: minLength=32
    #[serde(rename = "ownerPubkey", skip_serializing_if = "Option::is_none")]
    pub owner_pubkey: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionCloseAllPositionsRequest {
    ///Slippage tolerance applied to each sell, in basis points. Required.
    #[serde(rename = "minSellPriceSlippageBps")]
    pub min_sell_price_slippage_bps: f64,
    ///Position owner public key
    ///Constraint: minLength=32
    #[serde(rename = "ownerPubkey", skip_serializing_if = "Option::is_none")]
    pub owner_pubkey: Option<String>,
}
impl PredictionCloseAllPositionsRequest {
    /// Construct this request with every required wire field.
    pub fn new(min_sell_price_slippage_bps: f64) -> Self {
        Self {
            min_sell_price_slippage_bps,
            owner_pubkey: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(min_sell_price_slippage_bps: f64) -> PredictionCloseAllPositionsRequestBuilder {
        PredictionCloseAllPositionsRequestBuilder::new(min_sell_price_slippage_bps)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct PredictionCloseAllPositionsRequestBuilder {
    value: PredictionCloseAllPositionsRequest,
}
impl PredictionCloseAllPositionsRequestBuilder {
    /// Start a builder with every required wire field.
    pub fn new(min_sell_price_slippage_bps: f64) -> Self {
        Self {
            value: PredictionCloseAllPositionsRequest::new(min_sell_price_slippage_bps),
        }
    }
    #[doc = concat!("Set the optional `", "ownerPubkey", "` request field.")]
    #[must_use]
    pub fn owner_pubkey(mut self, owner_pubkey: String) -> Self {
        self.value.owner_pubkey = Some(owner_pubkey);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> PredictionCloseAllPositionsRequest {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct PredictionClosePositionRequest {
    ///Position owner public key
    ///Constraint: minLength=32
    #[serde(rename = "ownerPubkey", skip_serializing_if = "Option::is_none")]
    pub owner_pubkey: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct PredictionTradingStatusResponse {
    pub trading_active: bool,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct ProgramIdToLabelGetResponse {
    /// Additional properties matching the spec's
    /// `additionalProperties` value schema.
    #[serde(flatten)]
    pub additional_properties: std::collections::BTreeMap<String, String>,
}
///DEPRECATED: Price-based recurring orders are deprecated
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringDepositPriceRecurring {
    ///Constraint: minimum=0
    pub amount: i64,
    ///Base-58 account which is the Recurring Order account
    pub order: String,
    pub user: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringExecuteRecurring {
    #[serde(rename = "requestId")]
    pub request_id: String,
    #[serde(rename = "signedTransaction")]
    pub signed_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct RecurringRecurringResponse {
    ///Required to make a request to `/execute`
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Unsigned base-64 encoded transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateClaimFeeDBCTransactionRequestBody {
    /**- Maximum quote amount to claim
     */
    ///Constraint: minimum=0
    #[serde(rename = "maxQuoteAmount")]
    pub max_quote_amount: f64,
    /**- Owner wallet public key
     */
    #[serde(rename = "ownerWallet")]
    pub owner_wallet: String,
    /**- Dynamic Bonding Curve pool address
     */
    #[serde(rename = "poolAddress")]
    pub pool_address: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioCreateDBCTransactionResponse {
    /**- Presigned URL for image upload via `PUT` request
    - This is for you to make a PUT request to upload your token image to the on-chain uri metadata
    - [Refer to the Token Metadata section for better understanding](/docs/studio/create-token#token-metadata)
    */
    #[serde(rename = "imagePresignedUrl")]
    pub image_presigned_url: url::Url,
    ///Final image URL
    #[serde(rename = "imageUrl")]
    pub image_url: url::Url,
    /**- Presigned URL for metadata upload via `PUT` request
    - This is for you to make a PUT request to upload your token metadata to the on-chain uri metadata
    - [Refer to the Token Metadata section for better understanding](/docs/studio/create-token#token-metadata)
    */
    #[serde(rename = "metadataPresignedUrl")]
    pub metadata_presigned_url: url::Url,
    ///Generated token mint address
    pub mint: String,
    ///Base64-encoded transaction ready for signing
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct StudioSubmitDBCTransactionRequestBody {
    /**- Optional content description displayed on Studio dedicated token page
    - This is stored off-chain for our frontend to display
    - This is NOT the on-chain token metadata
    - The on-chain token metadata is done by making a PUT request to the presigned URL
    */
    #[serde(skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,
    /**- Optional header image file displayed on Studio token page
    - This is stored off-chain for our frontend to display
    - This is NOT the on-chain token metadata
    - The on-chain token metadata is done by making a PUT request to the presigned URL
    */
    #[serde(rename = "headerImage", skip_serializing_if = "Option::is_none")]
    pub header_image: Option<bytes::Bytes>,
    /**- Owner wallet public key
     */
    pub owner: String,
    /**- Base64-encoded signed transaction
     */
    pub transaction: String,
}
impl StudioSubmitDBCTransactionRequestBody {
    /// Construct this request with every required wire field.
    pub fn new(owner: String, transaction: String) -> Self {
        Self {
            owner,
            transaction,
            content: None,
            header_image: None,
        }
    }
    /// Start a dependency-free builder with every required wire field.
    pub fn builder(
        owner: String,
        transaction: String,
    ) -> StudioSubmitDBCTransactionRequestBodyBuilder {
        StudioSubmitDBCTransactionRequestBodyBuilder::new(owner, transaction)
    }
}
/// Dependency-free builder for [`#struct_name`].
#[derive(Debug, Clone)]
#[must_use]
pub struct StudioSubmitDBCTransactionRequestBodyBuilder {
    value: StudioSubmitDBCTransactionRequestBody,
}
impl StudioSubmitDBCTransactionRequestBodyBuilder {
    /// Start a builder with every required wire field.
    pub fn new(owner: String, transaction: String) -> Self {
        Self {
            value: StudioSubmitDBCTransactionRequestBody::new(owner, transaction),
        }
    }
    #[doc = concat!("Set the optional `", "content", "` request field.")]
    #[must_use]
    pub fn content(mut self, content: String) -> Self {
        self.value.content = Some(content);
        self
    }
    #[doc = concat!("Set the optional `", "headerImage", "` request field.")]
    #[must_use]
    pub fn header_image(mut self, header_image: bytes::Bytes) -> Self {
        self.value.header_image = Some(header_image);
        self
    }
    /// Finish building the request model.
    pub fn build(self) -> StudioSubmitDBCTransactionRequestBody {
        self.value
    }
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SwapV1SwapResponse {
    #[serde(rename = "lastValidBlockHeight")]
    pub last_valid_block_height: u64,
    #[serde(
        rename = "prioritizationFeeLamports",
        skip_serializing_if = "Option::is_none"
    )]
    pub prioritization_fee_lamports: Option<u64>,
    #[serde(rename = "swapTransaction")]
    pub swap_transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV1MintIncludingDuplicates {
    pub address: String,
    pub created_at: chrono::DateTime<chrono::Utc>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub daily_volume: Option<i64>,
    pub decimals: i32,
    pub extensions: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub freeze_authority: Option<String>,
    #[serde(rename = "logoURI", skip_serializing_if = "Option::is_none")]
    pub logo_uri: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mint_authority: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub minted_at: Option<chrono::DateTime<chrono::Utc>>,
    pub name: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub permanent_delegate: Option<String>,
    pub symbol: String,
    pub tags: Vec<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV2VerificationCheckEligibilityResponse {
    ///Whether a metadata update can be submitted
    #[serde(rename = "canMetadata")]
    pub can_metadata: bool,
    ///Whether a verification request can be submitted
    #[serde(rename = "canVerify")]
    pub can_verify: bool,
    ///Whether the token is already verified
    #[serde(rename = "isVerified")]
    pub is_verified: bool,
    ///Reason metadata update is not allowed (only present when there is a specific error)
    #[serde(rename = "metadataError", skip_serializing_if = "Option::is_none")]
    pub metadata_error: Option<String>,
    ///Whether the token exists on-chain
    #[serde(rename = "tokenExists")]
    pub token_exists: bool,
    ///Reason verification is not allowed (only present when there is a specific error)
    #[serde(rename = "verificationError", skip_serializing_if = "Option::is_none")]
    pub verification_error: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TokensV2VerificationCraftTxnResponse {
    ///JUP amount collected in smallest unit. JUP path transfers exactly 1000 JUP (1000000000); swap paths yield at least that.
    pub amount: String,
    ///Status code (0 for success)
    pub code: f64,
    ///Error message if crafting failed
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    ///Expiry timestamp for the crafted transaction
    #[serde(rename = "expireAt", skip_serializing_if = "Option::is_none")]
    pub expire_at: Option<String>,
    ///Fee amount in smallest unit
    #[serde(rename = "feeAmount")]
    pub fee_amount: f64,
    ///Transaction fee in lamports
    #[serde(rename = "feeLamports")]
    pub fee_lamports: f64,
    ///Mint address of the fee token
    #[serde(rename = "feeMint")]
    pub fee_mint: String,
    ///Decimals of the fee token
    #[serde(rename = "feeTokenDecimals")]
    pub fee_token_decimals: f64,
    ///Transaction fee in USD
    #[serde(rename = "feeUsdAmount", skip_serializing_if = "Option::is_none")]
    pub fee_usd_amount: Option<f64>,
    ///Whether the transaction is gasless
    pub gasless: bool,
    ///Input token decimals (non-JUP paths)
    #[serde(rename = "inputDecimals", skip_serializing_if = "Option::is_none")]
    pub input_decimals: Option<f64>,
    ///Input token mint address (non-JUP paths)
    #[serde(rename = "inputMint", skip_serializing_if = "Option::is_none")]
    pub input_mint: Option<String>,
    ///Maximum atomic input amount for the swap; equal to quotedInputAmount on the current swap flow (non-JUP paths)
    #[serde(rename = "maxInputAmount", skip_serializing_if = "Option::is_none")]
    pub max_input_amount: Option<String>,
    ///Mint address of the payment token (JUP)
    pub mint: String,
    ///Atomic input amount for the swap, sized to yield at least 1000 JUP (non-JUP paths)
    #[serde(rename = "quotedInputAmount", skip_serializing_if = "Option::is_none")]
    pub quoted_input_amount: Option<String>,
    ///Wallet address receiving the JUP payment
    #[serde(rename = "receiverAddress")]
    pub receiver_address: String,
    ///Unique request ID. Pass this to the execute endpoint.
    #[serde(rename = "requestId")]
    pub request_id: String,
    ///Decimals of the payment token
    #[serde(rename = "tokenDecimals")]
    pub token_decimals: f64,
    ///USD rate of the payment token at time of crafting
    #[serde(rename = "tokenUsdRate", skip_serializing_if = "Option::is_none")]
    pub token_usd_rate: Option<f64>,
    ///Time taken to craft the transaction in milliseconds
    #[serde(rename = "totalTime")]
    pub total_time: f64,
    ///Base64-encoded unsigned transaction
    pub transaction: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct TokensV2VerificationErrorResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<f64>,
}
///Response for a price order create. The deposit lands synchronously during the call, so depositConfirmed is returned. DCA create and confirm-cancel use TxSignatureResponse instead.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TriggerV2OrderResponse {
    ///Whether the deposit has landed and the order is active
    #[serde(rename = "depositConfirmed")]
    pub deposit_confirmed: bool,
    ///Order UUID
    pub id: String,
    ///Additional context about the deposit state, present on idempotent retries
    #[serde(skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    ///On-chain signature of the deposit transaction
    #[serde(rename = "txSignature")]
    pub tx_signature: String,
}
///Minimal create/cancel response carrying the order ID and an on-chain transaction signature. Returned by DCA create (deposit signature) and by confirm-cancel (withdrawal signature). Unlike price order create, it does not include depositConfirmed.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct TriggerV2TxSignatureResponse {
    ///Order UUID
    pub id: String,
    ///On-chain transaction signature
    #[serde(rename = "txSignature")]
    pub tx_signature: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct UltraNativeHoldingsResponse {
    ///Total SOL in lamports
    pub amount: String,
    ///Total SOL in UI units after applying decimals
    #[serde(rename = "uiAmount")]
    pub ui_amount: f64,
    ///Total SOL as string in UI units after applying decimals
    #[serde(rename = "uiAmountString")]
    pub ui_amount_string: String,
}