lsp-ty 0.2.2

type definitons for LSP
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
use super::*;
use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ConfigurationItem {
    #[doc = " The scope to get the configuration section for."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "scopeUri")]
    pub scope_uri: Option<DocumentUri>,
    #[doc = " The configuration section asked for."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub section: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ConfigurationParams {
    pub items: Vec<ConfigurationItem>,
}
#[doc = " Create file operation"]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct CreateFile {
    #[doc = " An optional annotation identifer describing the operation."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "annotationId")]
    pub annotation_id: Option<ChangeAnnotationIdentifier>,
    #[doc = " A create"]
    pub kind: String,
    #[doc = " Additional options"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub options: Option<CreateFileOptions>,
    #[doc = " The resource to create."]
    pub uri: DocumentUri,
}
#[doc = " Options to create a file."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct CreateFileOptions {
    #[doc = " Ignore if exists."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "ignoreIfExists")]
    pub ignore_if_exists: Option<bool>,
    #[doc = " Overwrite existing file. Overwrite wins over `ignoreIfExists`"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub overwrite: Option<bool>,
}
#[doc = " The parameters sent in notifications/requests for user-initiated creation of files."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct CreateFilesParams {
    #[doc = " An array of all files/folders created in this operation."]
    pub files: Vec<FileCreate>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DeclarationClientCapabilities {
    #[doc = " Whether declaration supports dynamic registration. If this is set to `true` the client "]
    #[doc = " supports the new `DeclarationRegistrationOptions` return value for the corresponding server "]
    #[doc = " capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " The client supports additional metadata in the form of declaration links."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "linkSupport")]
    pub link_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DeclarationOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DeclarationParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DeclarationRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DefinitionClientCapabilities {
    #[doc = " Whether definition supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " The client supports additional metadata in the form of definition links."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "linkSupport")]
    pub link_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DefinitionOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DefinitionParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DefinitionRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[doc = " Delete file operation"]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DeleteFile {
    #[doc = " An optional annotation identifer describing the operation."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "annotationId")]
    pub annotation_id: Option<ChangeAnnotationIdentifier>,
    #[doc = " A delete"]
    pub kind: String,
    #[doc = " Delete options."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub options: Option<DeleteFileOptions>,
    #[doc = " The file to delete."]
    pub uri: DocumentUri,
}
#[doc = " Delete file options"]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DeleteFileOptions {
    #[doc = " Ignore the operation if the file doesn't exist."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "ignoreIfNotExists")]
    pub ignore_if_not_exists: Option<bool>,
    #[doc = " Delete the content recursively if a folder is denoted."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub recursive: Option<bool>,
}
#[doc = " The parameters sent in notifications/requests for user-initiated deletes of files."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DeleteFilesParams {
    #[doc = " An array of all files/folders deleted in this operation."]
    pub files: Vec<FileDelete>,
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Diagnostic {
    #[doc = " The diagnostic's code, which might appear in the user interface."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub code: Option<DiagnosticCode>,
    #[doc = " An optional property to describe the error code."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "codeDescription")]
    pub code_description: Option<CodeDescription>,
    #[doc = " A data entry field that is preserved between a `textDocument/publishDiagnostics` "]
    #[doc = " notification and `textDocument/codeAction` request."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = " The diagnostic's message."]
    pub message: String,
    #[doc = " The range at which the message applies."]
    pub range: Range,
    #[doc = " An array of related diagnostic information, e.g. when symbol-names within a scope collide "]
    #[doc = " all definitions can be marked via this property."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "relatedInformation")]
    pub related_information: Option<Vec<DiagnosticRelatedInformation>>,
    #[doc = " The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret "]
    #[doc = " diagnostics as error, warning, info or hint."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub severity: Option<DiagnosticSeverity>,
    #[doc = " A human-readable string describing the source of this diagnostic, e.g. 'typescript' or "]
    #[doc = " 'super lint'."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    #[doc = " Additional metadata about the diagnostic."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<DiagnosticTag>>,
}
#[doc = " Represents a related message and source code location for a diagnostic. This should be used to "]
#[doc = " point to code locations that cause or are related to a diagnostics, e.g when duplicating a "]
#[doc = " symbol in a scope."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DiagnosticRelatedInformation {
    #[doc = " The location of this related diagnostic information."]
    pub location: Location,
    #[doc = " The message of this related diagnostic information."]
    pub message: String,
}
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum DiagnosticSeverity {
    Error = 1,
    Warning = 2,
    Information = 3,
    Hint = 4,
}
#[doc = " The diagnostic tags."]
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum DiagnosticTag {
    Unnecessary = 1,
    Deprecated = 2,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeConfigurationClientCapabilities {
    #[doc = " Did change configuration notification supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeConfigurationParams {
    #[doc = " The actual changed settings"]
    pub settings: serde_json::Value,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DidChangeTextDocumentParams {
    #[doc = " The actual content changes. The content changes describe single state changes to the "]
    #[doc = " document. So if there are two content changes c1 (at array index 0) and c2 (at array index "]
    #[doc = " 1) for a document in state S then c1 moves the document from S to S' and c2 from S' to S''. "]
    #[doc = " So c1 is computed on the state S and c2 is computed on the state S'."]
    #[doc = " "]
    #[doc = " To mirror the content of a document using change events use the following approach:"]
    #[doc = " - start with the same initial content"]
    #[doc = " - apply the 'textDocument/didChange' notifications in the order you   receive them."]
    #[doc = " - apply the `TextDocumentContentChangeEvent`s in a single notification   in the order you "]
    #[doc = " receive them."]
    #[serde(rename = "contentChanges")]
    pub content_changes: Vec<TextDocumentContentChangeEvent>,
    #[doc = " The document that did change. The version number points to the version after all provided "]
    #[doc = " content changes have been applied."]
    #[serde(rename = "textDocument")]
    pub text_document: VersionedTextDocumentIdentifier,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeWatchedFilesClientCapabilities {
    #[doc = " Did change watched files notification supports dynamic registration. Please note that the "]
    #[doc = " current protocol doesn't support static configuration for file changes from the server "]
    #[doc = " side."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeWatchedFilesParams {
    #[doc = " The actual file events."]
    pub changes: Vec<FileEvent>,
}
#[doc = " Describe options to be used when registering for file system change events."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeWatchedFilesRegistrationOptions {
    #[doc = " The watchers to register."]
    pub watchers: Vec<FileSystemWatcher>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DidChangeWorkspaceFoldersParams {
    #[doc = " The actual workspace folder change event."]
    pub event: WorkspaceFoldersChangeEvent,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DidCloseTextDocumentParams {
    #[doc = " The document that was closed."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DidOpenTextDocumentParams {
    #[doc = " The document that was opened."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentItem,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DidSaveTextDocumentParams {
    #[doc = " Optional the content when saved. Depends on the includeText value when the save "]
    #[doc = " notification was requested."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    #[doc = " The document that was saved."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentColorClientCapabilities {
    #[doc = " Whether document color supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentColorOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentColorParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentColorRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentFilter {
    #[doc = " A language id, like `typescript`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub language: Option<String>,
    #[doc = " A glob pattern, like `*.{ts,js}`."]
    #[doc = " "]
    #[doc = " Glob patterns can have the following syntax:"]
    #[doc = " - `*` to match one or more characters in a path segment"]
    #[doc = " - `?` to match on one character in a path segment"]
    #[doc = " - `**` to match any number of path segments, including none"]
    #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}`   matches all "]
    #[doc = " TypeScript and JavaScript files)"]
    #[doc = " - `[]` to declare a range of characters to match in a path segment   (e.g., `example.[0-9]` "]
    #[doc = " to match on `example.0`, `example.1`, …)"]
    #[doc = " - `[!...]` to negate a range of characters to match in a path segment   (e.g., "]
    #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but   not `example.0`)"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pattern: Option<String>,
    #[doc = " A Uri [scheme](#Uri.scheme), like `file` or `untitled`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub scheme: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentFormattingClientCapabilities {
    #[doc = " Whether formatting supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentFormattingOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentFormattingParams {
    #[doc = " The format options."]
    pub options: FormattingOptions,
    #[doc = " The document to format."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentFormattingRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[doc = " A document highlight is a range inside a text document which deserves special attention. "]
#[doc = " Usually a document highlight is visualized by changing the background color of its range."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentHighlight {
    #[doc = " The highlight kind, default is DocumentHighlightKind.Text."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<DocumentHighlightKind>,
    #[doc = " The range this highlight applies to."]
    pub range: Range,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentHighlightClientCapabilities {
    #[doc = " Whether document highlight supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[doc = " A document highlight kind."]
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum DocumentHighlightKind {
    Text = 1,
    Read = 2,
    Write = 3,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentHighlightOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentHighlightParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentHighlightRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[doc = " A document link is a range in a text document that links to an internal or external resource, "]
#[doc = " like another text document or a web site."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentLink {
    #[doc = " A data entry field that is preserved on a document link between a DocumentLinkRequest and a "]
    #[doc = " DocumentLinkResolveRequest."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = " The range this link applies to."]
    pub range: Range,
    #[doc = " The uri this link points to. If missing a resolve request is sent later."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target: Option<DocumentUri>,
    #[doc = " The tooltip text when you hover over this link."]
    #[doc = " "]
    #[doc = " If a tooltip is provided, is will be displayed in a string that includes instructions on "]
    #[doc = " how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary "]
    #[doc = " depending on OS, user settings, and localization."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tooltip: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentLinkClientCapabilities {
    #[doc = " Whether document link supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " Whether the client supports the `tooltip` property on `DocumentLink`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "tooltipSupport")]
    pub tooltip_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentLinkOptions {
    #[doc = " Document links have a resolve provider as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "resolveProvider")]
    pub resolve_provider: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentLinkParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The document to provide document links for."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentLinkRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " Document links have a resolve provider as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "resolveProvider")]
    pub resolve_provider: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentOnTypeFormattingClientCapabilities {
    #[doc = " Whether on type formatting supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentOnTypeFormattingOptions {
    #[doc = " A character on which formatting should be triggered, like `}`."]
    #[serde(rename = "firstTriggerCharacter")]
    pub first_trigger_character: String,
    #[doc = " More trigger characters."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "moreTriggerCharacter")]
    pub more_trigger_character: Option<Vec<String>>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentOnTypeFormattingParams {
    #[doc = " The character that has been typed."]
    pub ch: String,
    #[doc = " The format options."]
    pub options: FormattingOptions,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentOnTypeFormattingRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " A character on which formatting should be triggered, like `}`."]
    #[serde(rename = "firstTriggerCharacter")]
    pub first_trigger_character: String,
    #[doc = " More trigger characters."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "moreTriggerCharacter")]
    pub more_trigger_character: Option<Vec<String>>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentRangeFormattingClientCapabilities {
    #[doc = " Whether formatting supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentRangeFormattingOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentRangeFormattingParams {
    #[doc = " The format options"]
    pub options: FormattingOptions,
    #[doc = " The range to format"]
    pub range: Range,
    #[doc = " The document to format."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentRangeFormattingRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
pub type DocumentSelector = Vec<DocumentFilter>;
#[doc = " Represents programming constructs like variables, classes, interfaces etc. that appear in a "]
#[doc = " document. Document symbols can be hierarchical and they have two ranges: one that encloses its "]
#[doc = " definition and one that points to its most interesting range, e.g. the range of an identifier."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentSymbol {
    #[doc = " Children of this symbol, e.g. properties of a class."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub children: Option<Vec<DocumentSymbol>>,
    #[doc = " Indicates if this symbol is deprecated."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub deprecated: Option<bool>,
    #[doc = " More detail for this symbol, e.g the signature of a function."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub detail: Option<String>,
    #[doc = " The kind of this symbol."]
    pub kind: SymbolKind,
    #[doc = " The name of this symbol. Will be displayed in the user interface and therefore must not be "]
    #[doc = " an empty string or a string only consisting of white spaces."]
    pub name: String,
    #[doc = " The range enclosing this symbol not including leading/trailing whitespace but everything "]
    #[doc = " else like comments. This information is typically used to determine if the clients cursor "]
    #[doc = " is inside the symbol to reveal in the symbol in the UI."]
    pub range: Range,
    #[doc = " The range that should be selected and revealed when this symbol is being picked, e.g. the "]
    #[doc = " name of a function. Must be contained by the `range`."]
    #[serde(rename = "selectionRange")]
    pub selection_range: Range,
    #[doc = " Tags for this document symbol."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<SymbolTag>>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentSymbolClientCapabilitiesSymbolKind {
    #[doc = " The symbol kind values the client supports. When this property exists the client also "]
    #[doc = " guarantees that it will handle values outside its set gracefully and falls back to a "]
    #[doc = " default value when unknown."]
    #[doc = " "]
    #[doc = " If this property is not present the client only supports the symbol kinds from `File` to "]
    #[doc = " `Array` as defined in the initial version of the protocol."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "valueSet")]
    pub value_set: Option<Vec<SymbolKind>>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentSymbolClientCapabilitiesTagSupport {
    #[doc = " The tags supported by the client."]
    #[serde(rename = "valueSet")]
    pub value_set: Vec<SymbolTag>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentSymbolClientCapabilities {
    #[doc = " Whether document symbol supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " The client supports hierarchical document symbols."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "hierarchicalDocumentSymbolSupport")]
    pub hierarchical_document_symbol_support: Option<bool>,
    #[doc = " The client supports an additional label presented in the UI when registering a document "]
    #[doc = " symbol provider."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "labelSupport")]
    pub label_support: Option<bool>,
    #[doc = " Specific capabilities for the `SymbolKind` in the `textDocument/documentSymbol` request."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "symbolKind")]
    pub symbol_kind: Option<DocumentSymbolClientCapabilitiesSymbolKind>,
    #[doc = " The client supports tags on `SymbolInformation`. Tags are supported on `DocumentSymbol` if "]
    #[doc = " `hierarchicalDocumentSymbolSupport` is set to true. Clients supporting tags have to handle "]
    #[doc = " unknown tags gracefully."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "tagSupport")]
    pub tag_support: Option<DocumentSymbolClientCapabilitiesTagSupport>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentSymbolOptions {
    #[doc = " A human-readable string that is shown when multiple outlines trees are shown for the same "]
    #[doc = " document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct DocumentSymbolParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct DocumentSymbolRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " A human-readable string that is shown when multiple outlines trees are shown for the same "]
    #[doc = " document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
pub type DocumentUri = url::Url;
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ExecuteCommandClientCapabilities {
    #[doc = " Execute command supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ExecuteCommandOptions {
    #[doc = " The commands to be executed on the server"]
    pub commands: Vec<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ExecuteCommandParams {
    #[doc = " Arguments that the command should be invoked with."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub arguments: Option<Vec<serde_json::Value>>,
    #[doc = " The identifier of the actual command handler."]
    pub command: String,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[doc = " Execute command registration options."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ExecuteCommandRegistrationOptions {
    #[doc = " The commands to be executed on the server"]
    pub commands: Vec<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}

#[derive(Clone, PartialEq, Debug, Default)]
pub struct ExitParams {}

#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum FailureHandlingKind {
    #[serde(rename = "abort")]
    Abort,
    #[serde(rename = "transactional")]
    Transactional,
    #[serde(rename = "undo")]
    Undo,
    #[serde(rename = "textOnlyTransactional")]
    TextOnlyTransactional,
}
#[doc = " The file event type."]
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum FileChangeType {
    Created = 1,
    Changed = 2,
    Deleted = 3,
}
#[doc = " Represents information on a file/folder create."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileCreate {
    #[doc = " A file:// URI for the location of the file/folder being created."]
    pub uri: String,
}
#[doc = " Represents information on a file/folder delete."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileDelete {
    #[doc = " A file:// URI for the location of the file/folder being deleted."]
    pub uri: String,
}
#[doc = " An event describing a file change."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct FileEvent {
    #[doc = " The change type."]
    #[serde(rename = "type")]
    pub type_: Uinteger,
    #[doc = " The file's URI."]
    pub uri: DocumentUri,
}
#[doc = " A filter to describe in which file operation requests or notifications the server is interested "]
#[doc = " in."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileOperationFilter {
    #[doc = " The actual file operation pattern."]
    pub pattern: FileOperationPattern,
    #[doc = " A Uri like `file` or `untitled`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub scheme: Option<String>,
}
#[doc = " A pattern to describe in which file operation requests or notifications the server is "]
#[doc = " interested in."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileOperationPattern {
    #[doc = " The glob pattern to match. Glob patterns can have the following syntax:"]
    #[doc = " - `*` to match one or more characters in a path segment"]
    #[doc = " - `?` to match on one character in a path segment"]
    #[doc = " - `**` to match any number of path segments, including none"]
    #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}`   matches all "]
    #[doc = " TypeScript and JavaScript files)"]
    #[doc = " - `[]` to declare a range of characters to match in a path segment   (e.g., `example.[0-9]` "]
    #[doc = " to match on `example.0`, `example.1`, …)"]
    #[doc = " - `[!...]` to negate a range of characters to match in a path segment   (e.g., "]
    #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but   not `example.0`)"]
    pub glob: String,
    #[doc = " Whether to match files or folders with this pattern."]
    #[doc = " "]
    #[doc = " Matches both if undefined."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub matches: Option<FileOperationPatternKind>,
    #[doc = " Additional options used during matching."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub options: Option<FileOperationPatternOptions>,
}
#[doc = " A pattern kind describing if a glob pattern matches a file a folder or both."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum FileOperationPatternKind {
    #[serde(rename = "file")]
    File,
    #[serde(rename = "folder")]
    Folder,
}
#[doc = " Matching options for the file operation pattern."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileOperationPatternOptions {
    #[doc = " The pattern should be matched ignoring casing."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "ignoreCase")]
    pub ignore_case: Option<bool>,
}
#[doc = " The options to register for file operations."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileOperationRegistrationOptions {
    #[doc = " The actual filters."]
    pub filters: Vec<FileOperationFilter>,
}
#[doc = " Represents information on a file/folder rename."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileRename {
    #[doc = " A file:// URI for the new location of the file/folder being renamed."]
    #[serde(rename = "newUri")]
    pub new_uri: String,
    #[doc = " A file:// URI for the original location of the file/folder being renamed."]
    #[serde(rename = "oldUri")]
    pub old_uri: String,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FileSystemWatcher {
    #[doc = " The glob pattern to watch."]
    #[doc = " "]
    #[doc = " Glob patterns can have the following syntax:"]
    #[doc = " - `*` to match one or more characters in a path segment"]
    #[doc = " - `?` to match on one character in a path segment"]
    #[doc = " - `**` to match any number of path segments, including none"]
    #[doc = " - `{}` to group sub patterns into an OR expression. (e.g. `**\u{200b}/*.{ts,js}`   matches all "]
    #[doc = " TypeScript and JavaScript files)"]
    #[doc = " - `[]` to declare a range of characters to match in a path segment   (e.g., `example.[0-9]` "]
    #[doc = " to match on `example.0`, `example.1`, …)"]
    #[doc = " - `[!...]` to negate a range of characters to match in a path segment   (e.g., "]
    #[doc = " `example.[!0-9]` to match on `example.a`, `example.b`, but not   `example.0`)"]
    #[serde(rename = "globPattern")]
    pub glob_pattern: String,
    #[doc = " The kind of events of interest. If omitted it defaults to WatchKind.Create | "]
    #[doc = " WatchKind.Change | WatchKind.Delete which is 7."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<Uinteger>,
}
#[doc = " Represents a folding range. To be valid, start and end line must be bigger than zero and "]
#[doc = " smaller than the number of lines in the document. Clients are free to ignore invalid ranges."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FoldingRange {
    #[doc = " The zero-based character offset before the folded range ends. If not defined, defaults to "]
    #[doc = " the length of the end line."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "endCharacter")]
    pub end_character: Option<Uinteger>,
    #[doc = " The zero-based end line of the range to fold. The folded area ends with the line's last "]
    #[doc = " character. To be valid, the end must be zero or larger and smaller than the number of lines "]
    #[doc = " in the document."]
    #[serde(rename = "endLine")]
    pub end_line: Uinteger,
    #[doc = " Describes the kind of the folding range such as `comment` or `region`. The kind is used to "]
    #[doc = " categorize folding ranges and used by commands like 'Fold all comments'. See "]
    #[doc = " [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    #[doc = " The zero-based character offset from where the folded range starts. If not defined, "]
    #[doc = " defaults to the length of the start line."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "startCharacter")]
    pub start_character: Option<Uinteger>,
    #[doc = " The zero-based start line of the range to fold. The folded area starts after the line's "]
    #[doc = " last character. To be valid, the end must be zero or larger and smaller than the number of "]
    #[doc = " lines in the document."]
    #[serde(rename = "startLine")]
    pub start_line: Uinteger,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FoldingRangeClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration for folding range providers. If this "]
    #[doc = " is set to `true` the client supports the new `FoldingRangeRegistrationOptions` return value "]
    #[doc = " for the corresponding server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " If set, the client signals that it only supports folding complete lines. If set, client "]
    #[doc = " will ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "lineFoldingOnly")]
    pub line_folding_only: Option<bool>,
    #[doc = " The maximum number of folding ranges that the client prefers to receive per document. The "]
    #[doc = " value serves as a hint, servers are free to follow the limit."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "rangeLimit")]
    pub range_limit: Option<Uinteger>,
}
#[doc = " Enum of known range kinds"]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum FoldingRangeKind {
    #[serde(rename = "comment")]
    Comment,
    #[serde(rename = "imports")]
    Imports,
    #[serde(rename = "region")]
    Region,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FoldingRangeOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct FoldingRangeParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FoldingRangeRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[doc = " Value-object describing what options formatting should use."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct FormattingOptions {
    #[doc = " Insert a newline character at the end of the file if one does not exist."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "insertFinalNewline")]
    pub insert_final_newline: Option<bool>,
    #[doc = " Prefer spaces over tabs."]
    #[serde(rename = "insertSpaces")]
    pub insert_spaces: bool,
    #[doc = " Size of a tab in spaces."]
    #[serde(rename = "tabSize")]
    pub tab_size: Uinteger,
    #[doc = " Trim all newlines after the final newline at the end of the file."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "trimFinalNewlines")]
    pub trim_final_newlines: Option<bool>,
    #[doc = " Trim trailing whitespace on a line."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "trimTrailingWhitespace")]
    pub trim_trailing_whitespace: Option<bool>,
    #[doc = "Signature for further properties."]
    #[serde(flatten)]
    pub extra: std::collections::BTreeMap<String, OneOf3<bool, Integer, String>>,
}
#[doc = " The result of a hover request."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Hover {
    #[doc = " The hover's content"]
    pub contents: OneOf3<MarkedString, Vec<MarkedString>, MarkupContent>,
    #[doc = " An optional range is a range inside a text document that is used to visualize a hover, e.g. "]
    #[doc = " by changing the background color."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub range: Option<Range>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct HoverClientCapabilities {
    #[doc = " Client supports the following content formats if the content property refers to a `literal "]
    #[doc = " of type MarkupContent`. The order describes the preferred format of the client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "contentFormat")]
    pub content_format: Option<Vec<MarkupKind>>,
    #[doc = " Whether hover supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct HoverOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct HoverParams {
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct HoverRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ImplementationClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
    #[doc = " supports the new `ImplementationRegistrationOptions` return value for the corresponding "]
    #[doc = " server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " The client supports additional metadata in the form of definition links."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "linkSupport")]
    pub link_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ImplementationOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct ImplementationParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ImplementationRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InitializeError {
    #[doc = " Indicates whether the client execute the following retry logic: (1) show the message "]
    #[doc = " provided by the ResponseError to the user (2) user selects retry or cancel (3) if user "]
    #[doc = " selected retry the initialize method is sent again."]
    pub retry: bool,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InitializeParamsClientInfo {
    #[doc = " The name of the client as defined by the client."]
    pub name: String,
    #[doc = " The client's version as defined by the client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InitializeParams {
    #[doc = " The capabilities provided by the client (editor or tool)"]
    pub capabilities: ClientCapabilities,
    #[doc = " Information about the client"]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "clientInfo")]
    pub client_info: Option<InitializeParamsClientInfo>,
    #[doc = " User provided initialization options."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "initializationOptions")]
    pub initialization_options: Option<serde_json::Value>,
    #[doc = " The locale the client is currently showing the user interface in. This must not necessarily "]
    #[doc = " be the locale of the operating system."]
    #[doc = " "]
    #[doc = " Uses IETF language tags as the value's syntax (See"]
    #[doc = "<https://en.wikipedia.org/wiki/IETF_language_tag>)"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub locale: Option<String>,
    #[doc = " The process Id of the parent process that started the server. Is null if the process has "]
    #[doc = " not been started by another process. If the parent process is not alive then the server "]
    #[doc = " should exit (see exit notification) its process."]
    #[serde(rename = "processId")]
    pub process_id: Option<Integer>,
    #[doc = " The rootPath of the workspace. Is null if no folder is open."]
    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "rootPath")]
    pub root_path: Option<String>,
    #[doc = " The rootUri of the workspace. Is null if no folder is open. If both `rootPath` and "]
    #[doc = " `rootUri` are set `rootUri` wins."]
    #[serde(rename = "rootUri")]
    pub root_uri: Option<DocumentUri>,
    #[doc = " The initial trace setting. If omitted trace is disabled ('off')."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trace: Option<TraceValue>,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
    #[doc = " The workspace folders configured in the client when the server starts. This property is "]
    #[doc = " only available if the client supports workspace folders. It can be `null` if the client "]
    #[doc = " supports workspace folders but none are configured."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workspaceFolders")]
    pub workspace_folders: Option<Vec<WorkspaceFolder>>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InitializeResultServerInfo {
    #[doc = " The name of the server as defined by the server."]
    pub name: String,
    #[doc = " The server's version as defined by the server."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InitializeResult {
    #[doc = " The capabilities the language server provides."]
    pub capabilities: ServerCapabilities,
    #[doc = " Information about the server."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "serverInfo")]
    pub server_info: Option<InitializeResultServerInfo>,
}
#[derive(Clone, PartialEq, Debug, Default)]
pub struct InitializedParams {}
#[doc = " A special text edit to provide an insert and a replace operation."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct InsertReplaceEdit {
    #[doc = " The range if the insert is requested"]
    pub insert: Range,
    #[doc = " The string to be inserted."]
    #[serde(rename = "newText")]
    pub new_text: String,
    #[doc = " The range if the replace is requested."]
    pub replace: Range,
}
#[doc = " Defines whether the insert text in a completion item should be interpreted as plain text or a "]
#[doc = " snippet."]
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum InsertTextFormat {
    PlainText = 1,
    Snippet = 2,
}
#[doc = " How whitespace and indentation is handled during completion item insertion."]
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum InsertTextMode {
    AsIs = 1,
    AdjustIndentation = 2,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LinkedEditingRangeClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
    #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
    #[doc = " value for the corresponding server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LinkedEditingRangeOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct LinkedEditingRangeParams {
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LinkedEditingRangeRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LinkedEditingRanges {
    #[doc = " A list of ranges that can be renamed together. The ranges must have identical length and "]
    #[doc = " contain identical text content. The ranges cannot overlap."]
    pub ranges: Vec<Range>,
    #[doc = " An optional word pattern (regular expression) that describes valid contents for the given "]
    #[doc = " ranges. If no pattern is provided, the client configuration's word pattern will be used."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "wordPattern")]
    pub word_pattern: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Location {
    pub range: Range,
    pub uri: DocumentUri,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct LocationLink {
    #[doc = " Span of the origin of this link."]
    #[doc = " "]
    #[doc = " Used as the underlined span for mouse interaction. Defaults to the word range at the mouse "]
    #[doc = " position."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "originSelectionRange")]
    pub origin_selection_range: Option<Range>,
    #[doc = " The full target range of this link. If the target for example is a symbol then target range "]
    #[doc = " is the range enclosing this symbol not including leading/trailing whitespace but everything "]
    #[doc = " else like comments. This information is typically used to highlight the range in the "]
    #[doc = " editor."]
    #[serde(rename = "targetRange")]
    pub target_range: Range,
    #[doc = " The range that should be selected and revealed when this link is being followed, e.g the "]
    #[doc = " name of a function. Must be contained by the the `targetRange`. See also "]
    #[doc = " `DocumentSymbol#range`"]
    #[serde(rename = "targetSelectionRange")]
    pub target_selection_range: Range,
    #[doc = " The target resource identifier of this link."]
    #[serde(rename = "targetUri")]
    pub target_uri: DocumentUri,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LogMessageParams {
    #[doc = " The actual message"]
    pub message: String,
    #[doc = " The message type. See  {@link  MessageType }"]
    #[serde(rename = "type")]
    pub type_: MessageType,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct LogTraceParams {
    #[doc = " The message to be logged."]
    pub message: String,
    #[doc = " Additional information that can be computed if the `trace` configuration is set to "]
    #[doc = " `'verbose'`"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub verbose: Option<String>,
}
#[doc = " Client capabilities specific to the used markdown parser."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MarkdownClientCapabilities {
    #[doc = " The name of the parser."]
    pub parser: String,
    #[doc = " The version of the parser."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}
#[doc = " MarkedString can be used to render human readable text. It is either a markdown string or a "]
#[doc = " code-block that provides a language and a code snippet. The language identifier is semantically "]
#[doc = " equal to the optional language identifier in fenced code blocks in GitHub issues."]
#[doc = " "]
#[doc = " The pair of a language and a value is an equivalent to markdown: ```${language} ${value} ```"]
#[doc = " "]
#[doc = " Note that markdown strings will be sanitized - that means html will be escaped."]
pub type MarkedString = serde_json::Value;
#[doc = " A `MarkupContent` literal represents a string value which content is interpreted base on its "]
#[doc = " kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds."]
#[doc = " "]
#[doc = " If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues."]
#[doc = " "]
#[doc = " Here is an example how such a string can be constructed using JavaScript / TypeScript: "]
#[doc = " ```typescript let markdown: MarkdownContent = {  kind: MarkupKind.Markdown,  value: [   '# "]
#[doc = " Header',   'Some text',   '```typescript',   'someCode();',   '```'  ].join('\\n') }; ```"]
#[doc = " "]
#[doc = " *Please Note* that clients might sanitize the return markdown. A client could decide to remove "]
#[doc = " HTML from the markdown to avoid script execution."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MarkupContent {
    #[doc = " The type of the Markup"]
    pub kind: MarkupKind,
    #[doc = " The content itself"]
    pub value: String,
}
#[doc = " Describes the content type that a client supports in various result literals like `Hover`, "]
#[doc = " `ParameterInfo` or `CompletionItem`."]
#[doc = " "]
#[doc = " Please note that `MarkupKinds` must not start with a `$`. This kinds are reserved for internal "]
#[doc = " usage."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum MarkupKind {
    #[serde(rename = "plaintext")]
    Plaintext,
    #[serde(rename = "markdown")]
    Markdown,
}

impl Default for MarkupKind {
    fn default() -> Self {
        Self::Plaintext
    }
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Message {
    pub jsonrpc: String,
    #[serde(flatten)]
    pub data: serde_json::Value,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MessageActionItem {
    #[doc = " A short title like 'Retry', 'Open Log' etc."]
    pub title: String,
}
#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum MessageType {
    Error = 1,
    Warning = 2,
    Info = 3,
    Log = 4,
}

impl Default for MessageType {
    fn default() -> Self {
        Self::Info
    }
}

#[doc = " Moniker definition to match LSIF 0.5 moniker definition."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Moniker {
    #[doc = " The identifier of the moniker. The value is opaque in LSIF however schema owners are "]
    #[doc = " allowed to define the structure if they want."]
    pub identifier: String,
    #[doc = " The moniker kind if known."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub kind: Option<MonikerKind>,
    #[doc = " The scheme of the moniker. For example tsc or .Net"]
    pub scheme: String,
    #[doc = " The scope in which the moniker is unique"]
    pub unique: UniquenessLevel,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MonikerClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
    #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
    #[doc = " value for the corresponding server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[doc = " The moniker kind."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum MonikerKind {
    #[serde(rename = "import")]
    Import,
    #[serde(rename = "export")]
    Export,
    #[serde(rename = "local")]
    Local,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MonikerOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct MonikerParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct MonikerRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct NotificationMessage {
    pub jsonrpc: String,
    #[doc = " The method to be invoked."]
    pub method: String,
    #[doc = " The notification's params."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub params: Option<serde_json::Value>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct OptionalVersionedTextDocumentIdentifier {
    #[doc = " The text document's URI."]
    pub uri: DocumentUri,
    #[doc = " The version number of this document. If an optional versioned text document identifier is "]
    #[doc = " sent from the server to the client and the file is not open in the editor (the server has "]
    #[doc = " not received an open notification before) the server can send `null` to indicate that the "]
    #[doc = " version is known and the content on disk is the master (as specified with document content "]
    #[doc = " ownership)."]
    #[doc = " "]
    #[doc = " The version number of a document will increase after each change, including undo/redo. The "]
    #[doc = " number doesn't need to be consecutive."]
    pub version: Option<Integer>,
}
#[doc = " Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ParameterInformation {
    #[doc = " The human-readable doc-comment of this parameter. Will be shown in the UI but can be "]
    #[doc = " omitted."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub documentation: Option<OneOf<String, MarkupContent>>,
    #[doc = " The label of this parameter information."]
    #[doc = " "]
    #[doc = " Either a string or an inclusive start and exclusive end offsets within its containing "]
    #[doc = " signature label. (see SignatureInformation.label). The offsets are based on a UTF-16 string "]
    #[doc = " representation as `Position` and `Range` does."]
    #[doc = " "]
    #[doc = " *Note*: a label of type string should be a substring of its containing signature label. Its "]
    #[doc = " intended use case is to highlight the parameter label part in the "]
    #[doc = " `SignatureInformation.label`."]
    pub label: OneOf<String, Vec<(Uinteger, Uinteger)>>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct PartialResultParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Position {
    #[doc = " Character offset on a line in a document (zero-based). Assuming that the line is "]
    #[doc = " represented as a string, the `character` value represents the gap between the `character` "]
    #[doc = " and `character + 1`."]
    #[doc = " "]
    #[doc = " If the character value is greater than the line length it defaults back to the line length."]
    pub character: Uinteger,
    #[doc = " Line position in a document (zero-based)."]
    pub line: Uinteger,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct PrepareRenameParams {
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
}

#[derive(Clone, PartialEq, Debug, Serialize_repr, Deserialize_repr)]
#[repr(i64)]
pub enum PrepareSupportDefaultBehavior {
    Identifier = 1,
}

impl Default for PrepareSupportDefaultBehavior {
    fn default() -> Self {
        Self::Identifier
    }
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct PrepareRenameResult1 {
    pub range: Range,
    pub placeholder: String,
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct PrepareRenameResult2 {
    #[serde(rename = "defaultBehavior")]
    pub default_behavior: bool,
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct PublishDiagnosticsClientCapabilitiesTagSupport {
    #[doc = " The tags supported by the client."]
    #[serde(rename = "valueSet")]
    pub value_set: Vec<DiagnosticTag>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct PublishDiagnosticsClientCapabilities {
    #[doc = " Client supports a codeDescription property"]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "codeDescriptionSupport")]
    pub code_description_support: Option<bool>,
    #[doc = " Whether code action supports the `data` property which is preserved between a "]
    #[doc = " `textDocument/publishDiagnostics` and `textDocument/codeAction` request."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dataSupport")]
    pub data_support: Option<bool>,
    #[doc = " Whether the clients accepts diagnostics with related information."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "relatedInformation")]
    pub related_information: Option<bool>,
    #[doc = " Client supports the tag property to provide meta data about a diagnostic. Clients "]
    #[doc = " supporting tags have to handle unknown tags gracefully."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "tagSupport")]
    pub tag_support: Option<PublishDiagnosticsClientCapabilitiesTagSupport>,
    #[doc = " Whether the client interprets the version property of the `textDocument/publishDiagnostics` "]
    #[doc = " notification's parameter."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "versionSupport")]
    pub version_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct PublishDiagnosticsParams {
    #[doc = " An array of diagnostic information items."]
    pub diagnostics: Vec<Diagnostic>,
    #[doc = " The URI for which diagnostic information is reported."]
    pub uri: DocumentUri,
    #[doc = " Optional the version number of the document the diagnostics are published for."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<Integer>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Range {
    #[doc = " The range's end position."]
    pub end: Position,
    #[doc = " The range's start position."]
    pub start: Position,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ReferenceClientCapabilities {
    #[doc = " Whether references supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ReferenceContext {
    #[doc = " Include the declaration of the current symbol."]
    #[serde(rename = "includeDeclaration")]
    pub include_declaration: bool,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ReferenceOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct ReferenceParams {
    pub context: ReferenceContext,
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ReferenceRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[doc = " General parameters to register for a capability."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct Registration {
    #[doc = " The id used to register the request. The id can be used to deregister the request again."]
    pub id: String,
    #[doc = " The method / capability to register for."]
    pub method: String,
    #[doc = " Options necessary for the registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "registerOptions")]
    pub register_options: Option<serde_json::Value>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RegistrationParams {
    pub registrations: Vec<Registration>,
}
#[doc = " Client capabilities specific to regular expressions."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RegularExpressionsClientCapabilities {
    #[doc = " The engine's name."]
    pub engine: String,
    #[doc = " The engine's version."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RenameClientCapabilities {
    #[doc = " Whether rename supports dynamic registration."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " Whether the client honors the change annotations in text edits and resource operations "]
    #[doc = " returned via the rename request's workspace edit by for example presenting the workspace "]
    #[doc = " edit in the user interface and asking for confirmation."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "honorsChangeAnnotations")]
    pub honors_change_annotations: Option<bool>,
    #[doc = " Client supports testing for validity of rename operations before execution."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "prepareSupport")]
    pub prepare_support: Option<bool>,
    #[doc = " Client supports the default behavior result (`{ defaultBehavior: boolean }`)."]
    #[doc = " "]
    #[doc = " The value indicates the default behavior used by the client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "prepareSupportDefaultBehavior")]
    pub prepare_support_default_behavior: Option<PrepareSupportDefaultBehavior>,
}
#[doc = " Rename file operation"]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct RenameFile {
    #[doc = " An optional annotation identifer describing the operation."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "annotationId")]
    pub annotation_id: Option<ChangeAnnotationIdentifier>,
    #[doc = " A rename"]
    pub kind: String,
    #[doc = " The new location."]
    #[serde(rename = "newUri")]
    pub new_uri: DocumentUri,
    #[doc = " The old (existing) location."]
    #[serde(rename = "oldUri")]
    pub old_uri: DocumentUri,
    #[doc = " Rename options."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub options: Option<RenameFileOptions>,
}
#[doc = " Rename file options"]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RenameFileOptions {
    #[doc = " Ignores if target exists."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "ignoreIfExists")]
    pub ignore_if_exists: Option<bool>,
    #[doc = " Overwrite target if existing. Overwrite wins over `ignoreIfExists`"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub overwrite: Option<bool>,
}
#[doc = " The parameters sent in notifications/requests for user-initiated renames of files."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RenameFilesParams {
    #[doc = " An array of all files/folders renamed in this operation. When a folder is renamed, only the "]
    #[doc = " folder will be included, and not its children."]
    pub files: Vec<FileRename>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RenameOptions {
    #[doc = " Renames should be checked and tested before being executed."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "prepareProvider")]
    pub prepare_provider: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct RenameParams {
    #[doc = " The new name of the symbol. If the given name is not valid the request must return a "]
    #[doc = " [ResponseError](#ResponseError) with an appropriate message set."]
    #[serde(rename = "newName")]
    pub new_name: String,
    #[doc = " The position inside the text document."]
    pub position: Position,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RenameRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " Renames should be checked and tested before being executed."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "prepareProvider")]
    pub prepare_provider: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct RequestMessage {
    #[doc = " The request id."]
    pub id: ReqId,
    pub jsonrpc: String,
    #[doc = " The method to be invoked."]
    pub method: String,
    #[doc = " The method's params."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub params: Option<serde_json::Value>,
}
#[doc = " The kind of resource operations supported by the client."]
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum ResourceOperationKind {
    #[serde(rename = "create")]
    Create,
    #[serde(rename = "rename")]
    Rename,
    #[serde(rename = "delete")]
    Delete,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ResponseError {
    #[doc = " A number indicating the error type that occurred."]
    pub code: Integer,
    #[doc = " A primitive or structured value that contains additional information about the error. Can "]
    #[doc = " be omitted."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = " A string providing a short description of the error."]
    pub message: String,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ResponseMessage {
    #[doc = " The error object in case a request fails."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<ResponseError>,
    #[doc = " The request id."]
    pub id: Option<ReqId>,
    pub jsonrpc: String,
    #[doc = " The result of a request. This member is REQUIRED on success. This member MUST NOT exist if "]
    #[doc = " there was an error invoking the method."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub result: Option<serde_json::Value>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SaveOptions {
    #[doc = " The client is supposed to include the content on save."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "includeText")]
    pub include_text: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SelectionRange {
    #[doc = " The parent selection range containing this range. Therefore `parent.range` must contain "]
    #[doc = " `this.range`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parent: Option<Box<SelectionRange>>,
    #[doc = " The [range](#Range) of this selection range."]
    pub range: Range,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SelectionRangeClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration for selection range providers. If this "]
    #[doc = " is set to `true` the client supports the new `SelectionRangeRegistrationOptions` return "]
    #[doc = " value for the corresponding server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SelectionRangeOptions {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SelectionRangeParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The positions inside the text document."]
    pub positions: Vec<Position>,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SelectionRangeRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}

#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SemanticTokenModifiers(String);

impl From<&str> for SemanticTokenModifiers {
    fn from(s: &str) -> Self {
        Self(s.to_string())
    }
}

impl Into<String> for SemanticTokenModifiers {
    fn into(self) -> String {
        self.0
    }
}

impl SemanticTokenModifiers {
    pub fn new(s: String) -> Self {
        Self(s)
    }

    pub fn declaration() -> Self {
        "declaration".into()
    }

    pub fn definition() -> Self {
        "definition".into()
    }

    pub fn readonly() -> Self {
        "readonly".into()
    }

    pub fn static_() -> Self {
        "static".into()
    }

    pub fn deprecated() -> Self {
        "deprecated".into()
    }

    pub fn abstract_() -> Self {
        "abstract".into()
    }

    pub fn async_() -> Self {
        "async".into()
    }

    pub fn modification() -> Self {
        "modification".into()
    }

    pub fn documentation() -> Self {
        "documentation".into()
    }

    pub fn default_library() -> Self {
        "defaultLibrary".into()
    }
}

#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SemanticTokenTypes(String);

impl From<&str> for SemanticTokenTypes {
    fn from(s: &str) -> Self {
        Self(s.to_string())
    }
}

impl Into<String> for SemanticTokenTypes {
    fn into(self) -> String {
        self.0
    }
}

impl SemanticTokenTypes {
    pub fn new(s: String) -> Self {
        Self(s)
    }

    pub fn namespace() -> Self {
        "namespace".into()
    }
    pub fn type_() -> Self {
        "type".into()
    }
    pub fn class() -> Self {
        "class".into()
    }
    pub fn enum_() -> Self {
        "enum".into()
    }
    pub fn interface() -> Self {
        "interface".into()
    }
    pub fn struct_() -> Self {
        "struct".into()
    }
    pub fn type_parameter() -> Self {
        "typeParameter".into()
    }
    pub fn parameter() -> Self {
        "parameter".into()
    }
    pub fn variable() -> Self {
        "variable".into()
    }
    pub fn property() -> Self {
        "property".into()
    }
    pub fn enum_member() -> Self {
        "enumMember".into()
    }
    pub fn event() -> Self {
        "event".into()
    }
    pub fn function() -> Self {
        "function".into()
    }
    pub fn method() -> Self {
        "method".into()
    }
    pub fn macro_() -> Self {
        "macro".into()
    }
    pub fn keyword() -> Self {
        "keyword".into()
    }
    pub fn modifier() -> Self {
        "modifier".into()
    }
    pub fn comment() -> Self {
        "comment".into()
    }
    pub fn string() -> Self {
        "string".into()
    }
    pub fn number() -> Self {
        "number".into()
    }
    pub fn regexp() -> Self {
        "regexp".into()
    }
    pub fn operator() -> Self {
        "operator".into()
    }
}

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokens {
    #[doc = " The actual tokens."]
    pub data: Vec<Uinteger>,
    #[doc = " An optional result id. If provided and clients support delta updating the client will "]
    #[doc = " include the result id in the next semantic token request. A server can then instead of "]
    #[doc = " computing all semantic tokens again simply send a delta."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "resultId")]
    pub result_id: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensClientCapabilitiesRequests {
    #[doc = " The client will send the `textDocument/semanticTokens/full` request if the server provides "]
    #[doc = " a corresponding handler."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub full: Option<SemanticTokensOptionsFull>,
    #[doc = " The client will send the `textDocument/semanticTokens/range` request if the server provides "]
    #[doc = " a corresponding handler."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub range: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensClientCapabilities {
    #[doc = " Whether implementation supports dynamic registration. If this is set to `true` the client "]
    #[doc = " supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` return "]
    #[doc = " value for the corresponding server capability as well."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "dynamicRegistration")]
    pub dynamic_registration: Option<bool>,
    #[doc = " The formats the clients supports."]
    pub formats: Vec<TokenFormat>,
    #[doc = " Whether the client supports tokens that can span multiple lines."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "multilineTokenSupport")]
    pub multiline_token_support: Option<bool>,
    #[doc = " Whether the client supports tokens that can overlap each other."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "overlappingTokenSupport")]
    pub overlapping_token_support: Option<bool>,
    #[doc = " Which requests the client supports and might send to the server depending on the server's "]
    #[doc = " capability. Please note that clients might not show semantic tokens or degrade some of the "]
    #[doc = " user experience if a range or full request is advertised by the client but not provided by "]
    #[doc = " the server. If for example the client capability `requests.full` and `request.range` are "]
    #[doc = " both set to true but the server only provides a range provider the client might not render "]
    #[doc = " a minimap correctly or might even decide to not show any semantic tokens at all."]
    pub requests: SemanticTokensClientCapabilitiesRequests,
    #[doc = " The token modifiers that the client supports."]
    #[serde(rename = "tokenModifiers")]
    pub token_modifiers: Vec<SemanticTokenModifiers>,
    #[doc = " The token types that the client supports."]
    #[serde(rename = "tokenTypes")]
    pub token_types: Vec<SemanticTokenTypes>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensDelta {
    #[doc = " The semantic token edits to transform a previous result into a new result."]
    pub edits: Vec<SemanticTokensEdit>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "resultId")]
    pub result_id: Option<String>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SemanticTokensDeltaParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The result id of a previous response. The result Id can either point to a full response or "]
    #[doc = " a delta response depending on what was received last."]
    #[serde(rename = "previousResultId")]
    pub previous_result_id: String,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensDeltaPartialResult {
    pub edits: Vec<SemanticTokensEdit>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensEdit {
    #[doc = " The elements to insert."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<Vec<Uinteger>>,
    #[doc = " The count of elements to remove."]
    #[serde(rename = "deleteCount")]
    pub delete_count: Uinteger,
    #[doc = " The start offset of the edit."]
    pub start: Uinteger,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensLegend {
    #[doc = " The token modifiers a server uses."]
    #[serde(rename = "tokenModifiers")]
    pub token_modifiers: Vec<String>,
    #[doc = " The token types a server uses."]
    #[serde(rename = "tokenTypes")]
    pub token_types: Vec<String>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensOptions {
    #[doc = " Server supports providing semantic tokens for a full document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub full: Option<OneOf<bool, SemanticTokensOptionsFull>>,
    #[doc = " The legend used by the server"]
    pub legend: SemanticTokensLegend,
    #[doc = " Server supports providing semantic tokens for a specific range of a document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub range: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensOptionsFull {
    #[doc = " The server supports deltas for full documents."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub delta: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default)]
pub struct SemanticTokensRefreshParams {}

#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SemanticTokensParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensPartialResult {
    pub data: Vec<Uinteger>,
}
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct SemanticTokensRangeParams {
    #[doc = " An optional token that a server can use to report partial results (e.g. streaming) to the "]
    #[doc = " client."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "partialResultToken")]
    pub partial_result_token: Option<ProgressToken>,
    #[doc = " The range the semantic tokens are requested for."]
    pub range: Range,
    #[doc = " The text document."]
    #[serde(rename = "textDocument")]
    pub text_document: TextDocumentIdentifier,
    #[doc = " An optional token that a server can use to report work done progress."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneToken")]
    pub work_done_token: Option<ProgressToken>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensRegistrationOptions {
    #[doc = " A document selector to identify the scope of the registration. If set to null the document "]
    #[doc = " selector provided on the client side will be used."]
    #[serde(rename = "documentSelector")]
    pub document_selector: serde_json::Value,
    #[doc = " Server supports providing semantic tokens for a full document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub full: Option<serde_json::Value>,
    #[doc = " The id used to register the request. The id can be used to deregister the request again. "]
    #[doc = " See also Registration#id."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = " The legend used by the server"]
    pub legend: SemanticTokensLegend,
    #[doc = " Server supports providing semantic tokens for a specific range of a document."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub range: Option<serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workDoneProgress")]
    pub work_done_progress: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SemanticTokensWorkspaceClientCapabilities {
    #[doc = " Whether the client implementation supports a refresh request sent from the server to the "]
    #[doc = " client."]
    #[doc = " "]
    #[doc = " Note that this event is global and will force the client to refresh all semantic tokens "]
    #[doc = " currently shown. It should be used with absolute care and is useful for situation where a "]
    #[doc = " server for example detect a project wide change that requires such a calculation."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "refreshSupport")]
    pub refresh_support: Option<bool>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ServerCapabilitiesWorkspaceFileOperations {
    #[doc = " The server is interested in receiving didCreateFiles notifications."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "didCreate")]
    pub did_create: Option<FileOperationRegistrationOptions>,
    #[doc = " The server is interested in receiving didDeleteFiles file notifications."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "didDelete")]
    pub did_delete: Option<FileOperationRegistrationOptions>,
    #[doc = " The server is interested in receiving didRenameFiles notifications."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "didRename")]
    pub did_rename: Option<FileOperationRegistrationOptions>,
    #[doc = " The server is interested in receiving willCreateFiles requests."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "willCreate")]
    pub will_create: Option<FileOperationRegistrationOptions>,
    #[doc = " The server is interested in receiving willDeleteFiles file requests."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "willDelete")]
    pub will_delete: Option<FileOperationRegistrationOptions>,
    #[doc = " The server is interested in receiving willRenameFiles requests."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "willRename")]
    pub will_rename: Option<FileOperationRegistrationOptions>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ServerCapabilitiesWorkspace {
    #[doc = " The server is interested in file notifications/requests."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "fileOperations")]
    pub file_operations: Option<ServerCapabilitiesWorkspaceFileOperations>,
    #[doc = " The server supports workspace folder."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workspaceFolders")]
    pub workspace_folders: Option<WorkspaceFoldersServerCapabilities>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ServerCapabilities {
    #[doc = " The server provides call hierarchy support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "callHierarchyProvider")]
    pub call_hierarchy_provider:
        Option<OneOf3<bool, CallHierarchyRegistrationOptions, CallHierarchyOptions>>,
    #[doc = " The server provides code actions. The `CodeActionOptions` return type is only valid if the "]
    #[doc = " client signals code action literal support via the property "]
    #[doc = " `textDocument.codeAction.codeActionLiteralSupport`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "codeActionProvider")]
    pub code_action_provider: Option<OneOf<bool, CodeActionOptions>>,
    #[doc = " The server provides code lens."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "codeLensProvider")]
    pub code_lens_provider: Option<CodeLensOptions>,
    #[doc = " The server provides color provider support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "colorProvider")]
    pub color_provider:
        Option<OneOf3<bool, DocumentColorOptions, DocumentColorRegistrationOptions>>,
    #[doc = " The server provides completion support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "completionProvider")]
    pub completion_provider: Option<CompletionOptions>,
    #[doc = " The server provides go to declaration support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "declarationProvider")]
    pub declaration_provider:
        Option<OneOf3<bool, DeclarationOptions, DeclarationRegistrationOptions>>,
    #[doc = " The server provides goto definition support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "definitionProvider")]
    pub definition_provider: Option<OneOf<bool, DefinitionOptions>>,
    #[doc = " The server provides document formatting."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentFormattingProvider")]
    pub document_formatting_provider: Option<OneOf<bool, DocumentFormattingOptions>>,
    #[doc = " The server provides document highlight support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentHighlightProvider")]
    pub document_highlight_provider: Option<OneOf<bool, DocumentHighlightOptions>>,
    #[doc = " The server provides document link support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentLinkProvider")]
    pub document_link_provider: Option<DocumentLinkOptions>,
    #[doc = " The server provides document formatting on typing."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentOnTypeFormattingProvider")]
    pub document_on_type_formatting_provider: Option<DocumentOnTypeFormattingOptions>,
    #[doc = " The server provides document range formatting."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentRangeFormattingProvider")]
    pub document_range_formatting_provider: Option<OneOf<bool, DocumentRangeFormattingOptions>>,
    #[doc = " The server provides document symbol support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "documentSymbolProvider")]
    pub document_symbol_provider: Option<OneOf<bool, DocumentSymbolOptions>>,
    #[doc = " The server provides execute command support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "executeCommandProvider")]
    pub execute_command_provider: Option<ExecuteCommandOptions>,
    #[doc = " Experimental server capabilities."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub experimental: Option<serde_json::Value>,
    #[doc = " The server provides folding provider support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "foldingRangeProvider")]
    pub folding_range_provider:
        Option<OneOf3<bool, FoldingRangeOptions, FoldingRangeRegistrationOptions>>,
    #[doc = " The server provides hover support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "hoverProvider")]
    pub hover_provider: Option<OneOf<bool, HoverOptions>>,
    #[doc = " The server provides goto implementation support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "implementationProvider")]
    pub implementation_provider:
        Option<OneOf3<bool, ImplementationOptions, ImplementationRegistrationOptions>>,
    #[doc = " The server provides linked editing range support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "linkedEditingRangeProvider")]
    pub linked_editing_range_provider:
        Option<OneOf3<bool, LinkedEditingRangeOptions, LinkedEditingRangeRegistrationOptions>>,
    #[doc = " Whether server provides moniker support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "monikerProvider")]
    pub moniker_provider: Option<OneOf3<bool, MonikerOptions, MonikerRegistrationOptions>>,
    #[doc = " The server provides find references support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "referencesProvider")]
    pub references_provider: Option<OneOf<bool, ReferenceOptions>>,
    #[doc = " The server provides rename support. RenameOptions may only be specified if the client "]
    #[doc = " states that it supports `prepareSupport` in its initial `initialize` request."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "renameProvider")]
    pub rename_provider: Option<OneOf<bool, RenameOptions>>,
    #[doc = " The server provides selection range support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "selectionRangeProvider")]
    pub selection_range_provider:
        Option<OneOf3<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>>,
    #[doc = " The server provides semantic tokens support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "semanticTokensProvider")]
    pub semantic_tokens_provider:
        Option<OneOf<SemanticTokensOptions, SemanticTokensRegistrationOptions>>,
    #[doc = " The server provides signature help support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "signatureHelpProvider")]
    pub signature_help_provider: Option<SignatureHelpOptions>,
    #[doc = " Defines how text documents are synced. Is either a detailed structure defining each "]
    #[doc = " notification or for backwards compatibility the TextDocumentSyncKind number. If omitted it "]
    #[doc = " defaults to `TextDocumentSyncKind.None`."]
    // #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default = "TextDocumentSync::opt_default_other")]
    #[serde(rename = "textDocumentSync")]
    pub text_document_sync: Option<TextDocumentSync>,
    #[doc = " The server provides goto type definition support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "typeDefinitionProvider")]
    pub type_definition_provider:
        Option<OneOf3<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>>,
    #[doc = " Workspace specific server capabilities"]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub workspace: Option<ServerCapabilitiesWorkspace>,
    #[doc = " The server provides workspace symbol support."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "workspaceSymbolProvider")]
    pub workspace_symbol_provider: Option<OneOf<bool, WorkspaceSymbolOptions>>,
}

pub type TextDocumentSync = OneOf<TextDocumentSyncOptions, TextDocumentSyncKind>;

#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct SetTraceParams {
    #[doc = " The new value that should be assigned to the trace setting."]
    pub value: TraceValue,
}
#[doc = " Client capabilities for the show document request."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowDocumentClientCapabilities {
    #[doc = " The client has support for the show document request."]
    pub support: bool,
}
#[doc = " Params to show a document."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowDocumentParams {
    #[doc = " Indicates to show the resource in an external program. To show for example "]
    #[doc = " `https://code.visualstudio.com/` in the default WEB browser set `external` to `true`."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub external: Option<bool>,
    #[doc = " An optional selection range if the document is a text document. Clients might ignore the "]
    #[doc = " property if an external program is started or the file is not a text file."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub selection: Option<Range>,
    #[doc = " An optional property to indicate whether the editor showing the document should take focus "]
    #[doc = " or not. Clients might ignore this property if an external program is started."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "takeFocus")]
    pub take_focus: Option<bool>,
    #[doc = " The document uri to show."]
    pub uri: Uri,
}
#[doc = " The result of an show document request."]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowDocumentResult {
    #[doc = " A boolean indicating if the show was successful."]
    pub success: bool,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowMessageParams {
    #[doc = " The actual message."]
    pub message: String,
    #[doc = " The message type. See  {@link  MessageType } ."]
    #[serde(rename = "type")]
    pub type_: MessageType,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowMessageRequestClientCapabilitiesMessageActionItem {
    #[doc = " Whether the client supports additional attributes which are preserved and sent back to the "]
    #[doc = " server in the request's response."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "additionalPropertiesSupport")]
    pub additional_properties_support: Option<bool>,
}
#[doc = " Show message request client capabilities"]
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowMessageRequestClientCapabilities {
    #[doc = " Capabilities specific to the `MessageActionItem` type."]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "messageActionItem")]
    pub message_action_item: Option<ShowMessageRequestClientCapabilitiesMessageActionItem>,
}
#[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
pub struct ShowMessageRequestParams {
    #[doc = " The message action items to present."]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub actions: Option<Vec<MessageActionItem>>,
    #[doc = " The actual message"]
    pub message: String,
    #[doc = " The message type. See  {@link  MessageType }"]
    #[serde(rename = "type")]
    pub type_: MessageType,
}

#[derive(Clone, PartialEq, Debug, Default)]
pub struct ShutdownParams {}