Codebase list golang-github-google-go-dap / HEAD schematypes.go
HEAD

Tree @HEAD (Download .tar.gz)

schematypes.go @HEADraw · history · blame

   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
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by "cmd/gentypes/gentypes.go"; DO NOT EDIT.
// DAP spec: https://microsoft.github.io/debug-adapter-protocol/specification
// See cmd/gentypes/README.md for additional details.

package dap

import "encoding/json"

// Message is an interface that all DAP message types implement with pointer
// receivers. It's not part of the protocol but is used to enforce static
// typing in Go code and provide some common accessors.
//
// Note: the DAP type "Message" (which is used in the body of ErrorResponse)
// is renamed to ErrorMessage to avoid collision with this interface.
type Message interface {
	GetSeq() int
}

// RequestMessage is an interface implemented by all Request-types.
type RequestMessage interface {
	Message
	// GetRequest provides access to the embedded Request.
	GetRequest() *Request
}

// ResponseMessage is an interface implemented by all Response-types.
type ResponseMessage interface {
	Message
	// GetResponse provides access to the embedded Response.
	GetResponse() *Response
}

// EventMessage is an interface implemented by all Event-types.
type EventMessage interface {
	Message
	// GetEvent provides access to the embedded Event.
	GetEvent() *Event
}

// LaunchAttachRequest is an interface implemented by
// LaunchRequest and AttachRequest as they contain shared
// implementation specific arguments that are not part of
// the specification.
type LaunchAttachRequest interface {
	RequestMessage
	// GetArguments provides access to the Arguments map.
	GetArguments() json.RawMessage
}

// ProtocolMessage: Base class of requests, responses, and events.
type ProtocolMessage struct {
	Seq  int    `json:"seq"`
	Type string `json:"type"`
}

func (m *ProtocolMessage) GetSeq() int { return m.Seq }

// Request: A client or debug adapter initiated request.
type Request struct {
	ProtocolMessage

	Command string `json:"command"`
}

// Event: A debug adapter initiated event.
type Event struct {
	ProtocolMessage

	Event string `json:"event"`
}

// Response: Response for a request.
type Response struct {
	ProtocolMessage

	RequestSeq int    `json:"request_seq"`
	Success    bool   `json:"success"`
	Command    string `json:"command"`
	Message    string `json:"message,omitempty"`
}

// ErrorResponse: On error (whenever `success` is false), the body can provide more details.
type ErrorResponse struct {
	Response

	Body ErrorResponseBody `json:"body"`
}

type ErrorResponseBody struct {
	Error *ErrorMessage `json:"error,omitempty"`
}

func (r *ErrorResponse) GetResponse() *Response { return &r.Response }

// CancelRequest: The `cancel` request is used by the client in two situations:
// - to indicate that it is no longer interested in the result produced by a specific request issued earlier
// - to cancel a progress sequence. Clients should only call this request if the corresponding capability `supportsCancelRequest` is true.
// This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.
// The `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.
// The request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).
// Returning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.
// The progress that got cancelled still needs to send a `progressEnd` event back.
//
//	A client should not assume that progress just got cancelled after sending the `cancel` request.
type CancelRequest struct {
	Request

	Arguments *CancelArguments `json:"arguments,omitempty"`
}

func (r *CancelRequest) GetRequest() *Request { return &r.Request }

// CancelArguments: Arguments for `cancel` request.
type CancelArguments struct {
	RequestId  int    `json:"requestId,omitempty"`
	ProgressId string `json:"progressId,omitempty"`
}

// CancelResponse: Response to `cancel` request. This is just an acknowledgement, so no body field is required.
type CancelResponse struct {
	Response
}

func (r *CancelResponse) GetResponse() *Response { return &r.Response }

// InitializedEvent: This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).
// A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).
// The sequence of events/requests is as follows:
// - adapters sends `initialized` event (after the `initialize` request has returned)
// - client sends zero or more `setBreakpoints` requests
// - client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)
// - client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)
// - client sends other future configuration requests
// - client sends one `configurationDone` request to indicate the end of the configuration.
type InitializedEvent struct {
	Event
}

func (e *InitializedEvent) GetEvent() *Event { return &e.Event }

// StoppedEvent: The event indicates that the execution of the debuggee has stopped due to some condition.
// This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.
type StoppedEvent struct {
	Event

	Body StoppedEventBody `json:"body"`
}

type StoppedEventBody struct {
	Reason            string `json:"reason"`
	Description       string `json:"description,omitempty"`
	ThreadId          int    `json:"threadId,omitempty"`
	PreserveFocusHint bool   `json:"preserveFocusHint,omitempty"`
	Text              string `json:"text,omitempty"`
	AllThreadsStopped bool   `json:"allThreadsStopped,omitempty"`
	HitBreakpointIds  []int  `json:"hitBreakpointIds,omitempty"`
}

func (e *StoppedEvent) GetEvent() *Event { return &e.Event }

// ContinuedEvent: The event indicates that the execution of the debuggee has continued.
// Please note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.
// It is only necessary to send a `continued` event if there was no previous request that implied this.
type ContinuedEvent struct {
	Event

	Body ContinuedEventBody `json:"body"`
}

type ContinuedEventBody struct {
	ThreadId            int  `json:"threadId"`
	AllThreadsContinued bool `json:"allThreadsContinued,omitempty"`
}

func (e *ContinuedEvent) GetEvent() *Event { return &e.Event }

// ExitedEvent: The event indicates that the debuggee has exited and returns its exit code.
type ExitedEvent struct {
	Event

	Body ExitedEventBody `json:"body"`
}

type ExitedEventBody struct {
	ExitCode int `json:"exitCode"`
}

func (e *ExitedEvent) GetEvent() *Event { return &e.Event }

// TerminatedEvent: The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.
type TerminatedEvent struct {
	Event

	Body TerminatedEventBody `json:"body,omitempty"`
}

type TerminatedEventBody struct {
	Restart interface{} `json:"restart,omitempty"`
}

func (e *TerminatedEvent) GetEvent() *Event { return &e.Event }

// ThreadEvent: The event indicates that a thread has started or exited.
type ThreadEvent struct {
	Event

	Body ThreadEventBody `json:"body"`
}

type ThreadEventBody struct {
	Reason   string `json:"reason"`
	ThreadId int    `json:"threadId"`
}

func (e *ThreadEvent) GetEvent() *Event { return &e.Event }

// OutputEvent: The event indicates that the target has produced some output.
type OutputEvent struct {
	Event

	Body OutputEventBody `json:"body"`
}

type OutputEventBody struct {
	Category           string      `json:"category,omitempty"`
	Output             string      `json:"output"`
	Group              string      `json:"group,omitempty"`
	VariablesReference int         `json:"variablesReference,omitempty"`
	Source             *Source     `json:"source,omitempty"`
	Line               int         `json:"line,omitempty"`
	Column             int         `json:"column,omitempty"`
	Data               interface{} `json:"data,omitempty"`
}

func (e *OutputEvent) GetEvent() *Event { return &e.Event }

// BreakpointEvent: The event indicates that some information about a breakpoint has changed.
type BreakpointEvent struct {
	Event

	Body BreakpointEventBody `json:"body"`
}

type BreakpointEventBody struct {
	Reason     string     `json:"reason"`
	Breakpoint Breakpoint `json:"breakpoint"`
}

func (e *BreakpointEvent) GetEvent() *Event { return &e.Event }

// ModuleEvent: The event indicates that some information about a module has changed.
type ModuleEvent struct {
	Event

	Body ModuleEventBody `json:"body"`
}

type ModuleEventBody struct {
	Reason string `json:"reason"`
	Module Module `json:"module"`
}

func (e *ModuleEvent) GetEvent() *Event { return &e.Event }

// LoadedSourceEvent: The event indicates that some source has been added, changed, or removed from the set of all loaded sources.
type LoadedSourceEvent struct {
	Event

	Body LoadedSourceEventBody `json:"body"`
}

type LoadedSourceEventBody struct {
	Reason string `json:"reason"`
	Source Source `json:"source"`
}

func (e *LoadedSourceEvent) GetEvent() *Event { return &e.Event }

// ProcessEvent: The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.
type ProcessEvent struct {
	Event

	Body ProcessEventBody `json:"body"`
}

type ProcessEventBody struct {
	Name            string `json:"name"`
	SystemProcessId int    `json:"systemProcessId,omitempty"`
	IsLocalProcess  bool   `json:"isLocalProcess,omitempty"`
	StartMethod     string `json:"startMethod,omitempty"`
	PointerSize     int    `json:"pointerSize,omitempty"`
}

func (e *ProcessEvent) GetEvent() *Event { return &e.Event }

// CapabilitiesEvent: The event indicates that one or more capabilities have changed.
// Since the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).
// Consequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.
// Only changed capabilities need to be included, all other capabilities keep their values.
type CapabilitiesEvent struct {
	Event

	Body CapabilitiesEventBody `json:"body"`
}

type CapabilitiesEventBody struct {
	Capabilities Capabilities `json:"capabilities"`
}

func (e *CapabilitiesEvent) GetEvent() *Event { return &e.Event }

// ProgressStartEvent: The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.
// The client is free to delay the showing of the UI in order to reduce flicker.
// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
type ProgressStartEvent struct {
	Event

	Body ProgressStartEventBody `json:"body"`
}

type ProgressStartEventBody struct {
	ProgressId  string `json:"progressId"`
	Title       string `json:"title"`
	RequestId   int    `json:"requestId,omitempty"`
	Cancellable bool   `json:"cancellable,omitempty"`
	Message     string `json:"message,omitempty"`
	Percentage  int    `json:"percentage,omitempty"`
}

func (e *ProgressStartEvent) GetEvent() *Event { return &e.Event }

// ProgressUpdateEvent: The event signals that the progress reporting needs to be updated with a new message and/or percentage.
// The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.
// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
type ProgressUpdateEvent struct {
	Event

	Body ProgressUpdateEventBody `json:"body"`
}

type ProgressUpdateEventBody struct {
	ProgressId string `json:"progressId"`
	Message    string `json:"message,omitempty"`
	Percentage int    `json:"percentage,omitempty"`
}

func (e *ProgressUpdateEvent) GetEvent() *Event { return &e.Event }

// ProgressEndEvent: The event signals the end of the progress reporting with a final message.
// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
type ProgressEndEvent struct {
	Event

	Body ProgressEndEventBody `json:"body"`
}

type ProgressEndEventBody struct {
	ProgressId string `json:"progressId"`
	Message    string `json:"message,omitempty"`
}

func (e *ProgressEndEvent) GetEvent() *Event { return &e.Event }

// InvalidatedEvent: This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.
// Debug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.
// This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.
type InvalidatedEvent struct {
	Event

	Body InvalidatedEventBody `json:"body"`
}

type InvalidatedEventBody struct {
	Areas        []InvalidatedAreas `json:"areas,omitempty"`
	ThreadId     int                `json:"threadId,omitempty"`
	StackFrameId int                `json:"stackFrameId,omitempty"`
}

func (e *InvalidatedEvent) GetEvent() *Event { return &e.Event }

// MemoryEvent: This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.
// Clients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.
// Debug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.
type MemoryEvent struct {
	Event

	Body MemoryEventBody `json:"body"`
}

type MemoryEventBody struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset"`
	Count           int    `json:"count"`
}

func (e *MemoryEvent) GetEvent() *Event { return &e.Event }

// RunInTerminalRequest: This request is sent from the debug adapter to the client to run a command in a terminal.
// This is typically used to launch the debuggee in a terminal provided by the client.
// This request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.
// Client implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.
// Some users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.
type RunInTerminalRequest struct {
	Request

	Arguments RunInTerminalRequestArguments `json:"arguments"`
}

func (r *RunInTerminalRequest) GetRequest() *Request { return &r.Request }

// RunInTerminalRequestArguments: Arguments for `runInTerminal` request.
type RunInTerminalRequestArguments struct {
	Kind                        string                 `json:"kind,omitempty"`
	Title                       string                 `json:"title,omitempty"`
	Cwd                         string                 `json:"cwd"`
	Args                        []string               `json:"args"`
	Env                         map[string]interface{} `json:"env,omitempty"`
	ArgsCanBeInterpretedByShell bool                   `json:"argsCanBeInterpretedByShell,omitempty"`
}

// RunInTerminalResponse: Response to `runInTerminal` request.
type RunInTerminalResponse struct {
	Response

	Body RunInTerminalResponseBody `json:"body"`
}

type RunInTerminalResponseBody struct {
	ProcessId      int `json:"processId,omitempty"`
	ShellProcessId int `json:"shellProcessId,omitempty"`
}

func (r *RunInTerminalResponse) GetResponse() *Response { return &r.Response }

// StartDebuggingRequest: This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.
// This request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.
// A client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.
type StartDebuggingRequest struct {
	Request

	Arguments StartDebuggingRequestArguments `json:"arguments"`
}

func (r *StartDebuggingRequest) GetRequest() *Request { return &r.Request }

// StartDebuggingRequestArguments: Arguments for `startDebugging` request.
type StartDebuggingRequestArguments struct {
	Configuration map[string]interface{} `json:"configuration"`
	Request       string                 `json:"request"`
}

// StartDebuggingResponse: Response to `startDebugging` request. This is just an acknowledgement, so no body field is required.
type StartDebuggingResponse struct {
	Response
}

func (r *StartDebuggingResponse) GetResponse() *Response { return &r.Response }

// InitializeRequest: The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.
// Until the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.
// In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.
// The `initialize` request may only be sent once.
type InitializeRequest struct {
	Request

	Arguments InitializeRequestArguments `json:"arguments"`
}

func (r *InitializeRequest) GetRequest() *Request { return &r.Request }

// InitializeRequestArguments: Arguments for `initialize` request.
type InitializeRequestArguments struct {
	ClientID                            string `json:"clientID,omitempty"`
	ClientName                          string `json:"clientName,omitempty"`
	AdapterID                           string `json:"adapterID"`
	Locale                              string `json:"locale,omitempty"`
	LinesStartAt1                       bool   `json:"linesStartAt1"`
	ColumnsStartAt1                     bool   `json:"columnsStartAt1"`
	PathFormat                          string `json:"pathFormat,omitempty"`
	SupportsVariableType                bool   `json:"supportsVariableType,omitempty"`
	SupportsVariablePaging              bool   `json:"supportsVariablePaging,omitempty"`
	SupportsRunInTerminalRequest        bool   `json:"supportsRunInTerminalRequest,omitempty"`
	SupportsMemoryReferences            bool   `json:"supportsMemoryReferences,omitempty"`
	SupportsProgressReporting           bool   `json:"supportsProgressReporting,omitempty"`
	SupportsInvalidatedEvent            bool   `json:"supportsInvalidatedEvent,omitempty"`
	SupportsMemoryEvent                 bool   `json:"supportsMemoryEvent,omitempty"`
	SupportsArgsCanBeInterpretedByShell bool   `json:"supportsArgsCanBeInterpretedByShell,omitempty"`
	SupportsStartDebuggingRequest       bool   `json:"supportsStartDebuggingRequest,omitempty"`
}

// InitializeResponse: Response to `initialize` request.
type InitializeResponse struct {
	Response

	Body Capabilities `json:"body,omitempty"`
}

func (r *InitializeResponse) GetResponse() *Response { return &r.Response }

// ConfigurationDoneRequest: This request indicates that the client has finished initialization of the debug adapter.
// So it is the last request in the sequence of configuration requests (which was started by the `initialized` event).
// Clients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.
type ConfigurationDoneRequest struct {
	Request

	Arguments *ConfigurationDoneArguments `json:"arguments,omitempty"`
}

func (r *ConfigurationDoneRequest) GetRequest() *Request { return &r.Request }

// ConfigurationDoneArguments: Arguments for `configurationDone` request.
type ConfigurationDoneArguments struct {
}

// ConfigurationDoneResponse: Response to `configurationDone` request. This is just an acknowledgement, so no body field is required.
type ConfigurationDoneResponse struct {
	Response
}

func (r *ConfigurationDoneResponse) GetResponse() *Response { return &r.Response }

// LaunchRequest: This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).
// Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.
type LaunchRequest struct {
	Request

	Arguments json.RawMessage `json:"arguments"`
}

func (r *LaunchRequest) GetRequest() *Request          { return &r.Request }
func (r *LaunchRequest) GetArguments() json.RawMessage { return r.Arguments }

// LaunchResponse: Response to `launch` request. This is just an acknowledgement, so no body field is required.
type LaunchResponse struct {
	Response
}

func (r *LaunchResponse) GetResponse() *Response { return &r.Response }

// AttachRequest: The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.
// Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification.
type AttachRequest struct {
	Request

	Arguments json.RawMessage `json:"arguments"`
}

func (r *AttachRequest) GetRequest() *Request          { return &r.Request }
func (r *AttachRequest) GetArguments() json.RawMessage { return r.Arguments }

// AttachResponse: Response to `attach` request. This is just an acknowledgement, so no body field is required.
type AttachResponse struct {
	Response
}

func (r *AttachResponse) GetResponse() *Response { return &r.Response }

// RestartRequest: Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.
// If the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew.
type RestartRequest struct {
	Request

	Arguments *RestartArguments `json:"arguments,omitempty"`
}

func (r *RestartRequest) GetRequest() *Request { return &r.Request }

// RestartArguments: Arguments for `restart` request.
type RestartArguments struct {
	Arguments interface{} `json:"arguments,omitempty"`
}

// RestartResponse: Response to `restart` request. This is just an acknowledgement, so no body field is required.
type RestartResponse struct {
	Response
}

func (r *RestartResponse) GetResponse() *Response { return &r.Response }

// DisconnectRequest: The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).
// In addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.
// This implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true).
type DisconnectRequest struct {
	Request

	Arguments *DisconnectArguments `json:"arguments,omitempty"`
}

func (r *DisconnectRequest) GetRequest() *Request { return &r.Request }

// DisconnectArguments: Arguments for `disconnect` request.
type DisconnectArguments struct {
	Restart           bool `json:"restart,omitempty"`
	TerminateDebuggee bool `json:"terminateDebuggee,omitempty"`
	SuspendDebuggee   bool `json:"suspendDebuggee,omitempty"`
}

// DisconnectResponse: Response to `disconnect` request. This is just an acknowledgement, so no body field is required.
type DisconnectResponse struct {
	Response
}

func (r *DisconnectResponse) GetResponse() *Response { return &r.Response }

// TerminateRequest: The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.
// Typically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.
// Please note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.
// Clients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown.
type TerminateRequest struct {
	Request

	Arguments *TerminateArguments `json:"arguments,omitempty"`
}

func (r *TerminateRequest) GetRequest() *Request { return &r.Request }

// TerminateArguments: Arguments for `terminate` request.
type TerminateArguments struct {
	Restart bool `json:"restart,omitempty"`
}

// TerminateResponse: Response to `terminate` request. This is just an acknowledgement, so no body field is required.
type TerminateResponse struct {
	Response
}

func (r *TerminateResponse) GetResponse() *Response { return &r.Response }

// BreakpointLocationsRequest: The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.
// Clients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.
type BreakpointLocationsRequest struct {
	Request

	Arguments *BreakpointLocationsArguments `json:"arguments,omitempty"`
}

func (r *BreakpointLocationsRequest) GetRequest() *Request { return &r.Request }

// BreakpointLocationsArguments: Arguments for `breakpointLocations` request.
type BreakpointLocationsArguments struct {
	Source    Source `json:"source"`
	Line      int    `json:"line"`
	Column    int    `json:"column,omitempty"`
	EndLine   int    `json:"endLine,omitempty"`
	EndColumn int    `json:"endColumn,omitempty"`
}

// BreakpointLocationsResponse: Response to `breakpointLocations` request.
// Contains possible locations for source breakpoints.
type BreakpointLocationsResponse struct {
	Response

	Body BreakpointLocationsResponseBody `json:"body"`
}

type BreakpointLocationsResponseBody struct {
	Breakpoints []BreakpointLocation `json:"breakpoints"`
}

func (r *BreakpointLocationsResponse) GetResponse() *Response { return &r.Response }

// SetBreakpointsRequest: Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
// To clear all breakpoint for a source, specify an empty array.
// When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.
type SetBreakpointsRequest struct {
	Request

	Arguments SetBreakpointsArguments `json:"arguments"`
}

func (r *SetBreakpointsRequest) GetRequest() *Request { return &r.Request }

// SetBreakpointsArguments: Arguments for `setBreakpoints` request.
type SetBreakpointsArguments struct {
	Source         Source             `json:"source"`
	Breakpoints    []SourceBreakpoint `json:"breakpoints,omitempty"`
	Lines          []int              `json:"lines,omitempty"`
	SourceModified bool               `json:"sourceModified,omitempty"`
}

// SetBreakpointsResponse: Response to `setBreakpoints` request.
// Returned is information about each breakpoint created by this request.
// This includes the actual code location and whether the breakpoint could be verified.
// The breakpoints returned are in the same order as the elements of the `breakpoints`
// (or the deprecated `lines`) array in the arguments.
type SetBreakpointsResponse struct {
	Response

	Body SetBreakpointsResponseBody `json:"body"`
}

type SetBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

func (r *SetBreakpointsResponse) GetResponse() *Response { return &r.Response }

// SetFunctionBreakpointsRequest: Replaces all existing function breakpoints with new function breakpoints.
// To clear all function breakpoints, specify an empty array.
// When a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.
// Clients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.
type SetFunctionBreakpointsRequest struct {
	Request

	Arguments SetFunctionBreakpointsArguments `json:"arguments"`
}

func (r *SetFunctionBreakpointsRequest) GetRequest() *Request { return &r.Request }

// SetFunctionBreakpointsArguments: Arguments for `setFunctionBreakpoints` request.
type SetFunctionBreakpointsArguments struct {
	Breakpoints []FunctionBreakpoint `json:"breakpoints"`
}

// SetFunctionBreakpointsResponse: Response to `setFunctionBreakpoints` request.
// Returned is information about each breakpoint created by this request.
type SetFunctionBreakpointsResponse struct {
	Response

	Body SetFunctionBreakpointsResponseBody `json:"body"`
}

type SetFunctionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

func (r *SetFunctionBreakpointsResponse) GetResponse() *Response { return &r.Response }

// SetExceptionBreakpointsRequest: The request configures the debugger's response to thrown exceptions.
// If an exception is configured to break, a `stopped` event is fired (with reason `exception`).
// Clients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.
type SetExceptionBreakpointsRequest struct {
	Request

	Arguments SetExceptionBreakpointsArguments `json:"arguments"`
}

func (r *SetExceptionBreakpointsRequest) GetRequest() *Request { return &r.Request }

// SetExceptionBreakpointsArguments: Arguments for `setExceptionBreakpoints` request.
type SetExceptionBreakpointsArguments struct {
	Filters          []string                 `json:"filters"`
	FilterOptions    []ExceptionFilterOptions `json:"filterOptions,omitempty"`
	ExceptionOptions []ExceptionOptions       `json:"exceptionOptions,omitempty"`
}

// SetExceptionBreakpointsResponse: Response to `setExceptionBreakpoints` request.
// The response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.
// The `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition or hit count expressions are valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.
// For backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.
type SetExceptionBreakpointsResponse struct {
	Response

	Body SetExceptionBreakpointsResponseBody `json:"body,omitempty"`
}

type SetExceptionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints,omitempty"`
}

func (r *SetExceptionBreakpointsResponse) GetResponse() *Response { return &r.Response }

// DataBreakpointInfoRequest: Obtains information on a possible data breakpoint that could be set on an expression or variable.
// Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.
type DataBreakpointInfoRequest struct {
	Request

	Arguments DataBreakpointInfoArguments `json:"arguments"`
}

func (r *DataBreakpointInfoRequest) GetRequest() *Request { return &r.Request }

// DataBreakpointInfoArguments: Arguments for `dataBreakpointInfo` request.
type DataBreakpointInfoArguments struct {
	VariablesReference int    `json:"variablesReference,omitempty"`
	Name               string `json:"name"`
	FrameId            int    `json:"frameId,omitempty"`
}

// DataBreakpointInfoResponse: Response to `dataBreakpointInfo` request.
type DataBreakpointInfoResponse struct {
	Response

	Body DataBreakpointInfoResponseBody `json:"body"`
}

type DataBreakpointInfoResponseBody struct {
	DataId      interface{}                `json:"dataId"`
	Description string                     `json:"description"`
	AccessTypes []DataBreakpointAccessType `json:"accessTypes,omitempty"`
	CanPersist  bool                       `json:"canPersist,omitempty"`
}

func (r *DataBreakpointInfoResponse) GetResponse() *Response { return &r.Response }

// SetDataBreakpointsRequest: Replaces all existing data breakpoints with new data breakpoints.
// To clear all data breakpoints, specify an empty array.
// When a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.
// Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.
type SetDataBreakpointsRequest struct {
	Request

	Arguments SetDataBreakpointsArguments `json:"arguments"`
}

func (r *SetDataBreakpointsRequest) GetRequest() *Request { return &r.Request }

// SetDataBreakpointsArguments: Arguments for `setDataBreakpoints` request.
type SetDataBreakpointsArguments struct {
	Breakpoints []DataBreakpoint `json:"breakpoints"`
}

// SetDataBreakpointsResponse: Response to `setDataBreakpoints` request.
// Returned is information about each breakpoint created by this request.
type SetDataBreakpointsResponse struct {
	Response

	Body SetDataBreakpointsResponseBody `json:"body"`
}

type SetDataBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

func (r *SetDataBreakpointsResponse) GetResponse() *Response { return &r.Response }

// SetInstructionBreakpointsRequest: Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window.
// To clear all instruction breakpoints, specify an empty array.
// When an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.
// Clients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.
type SetInstructionBreakpointsRequest struct {
	Request

	Arguments SetInstructionBreakpointsArguments `json:"arguments"`
}

func (r *SetInstructionBreakpointsRequest) GetRequest() *Request { return &r.Request }

// SetInstructionBreakpointsArguments: Arguments for `setInstructionBreakpoints` request
type SetInstructionBreakpointsArguments struct {
	Breakpoints []InstructionBreakpoint `json:"breakpoints"`
}

// SetInstructionBreakpointsResponse: Response to `setInstructionBreakpoints` request
type SetInstructionBreakpointsResponse struct {
	Response

	Body SetInstructionBreakpointsResponseBody `json:"body"`
}

type SetInstructionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

func (r *SetInstructionBreakpointsResponse) GetResponse() *Response { return &r.Response }

// ContinueRequest: The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.
type ContinueRequest struct {
	Request

	Arguments ContinueArguments `json:"arguments"`
}

func (r *ContinueRequest) GetRequest() *Request { return &r.Request }

// ContinueArguments: Arguments for `continue` request.
type ContinueArguments struct {
	ThreadId     int  `json:"threadId"`
	SingleThread bool `json:"singleThread,omitempty"`
}

// ContinueResponse: Response to `continue` request.
type ContinueResponse struct {
	Response

	Body ContinueResponseBody `json:"body"`
}

type ContinueResponseBody struct {
	AllThreadsContinued bool `json:"allThreadsContinued"`
}

func (r *ContinueResponse) GetResponse() *Response { return &r.Response }

// NextRequest: The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.
// If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.
// The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.
type NextRequest struct {
	Request

	Arguments NextArguments `json:"arguments"`
}

func (r *NextRequest) GetRequest() *Request { return &r.Request }

// NextArguments: Arguments for `next` request.
type NextArguments struct {
	ThreadId     int                 `json:"threadId"`
	SingleThread bool                `json:"singleThread,omitempty"`
	Granularity  SteppingGranularity `json:"granularity,omitempty"`
}

// NextResponse: Response to `next` request. This is just an acknowledgement, so no body field is required.
type NextResponse struct {
	Response
}

func (r *NextResponse) GetResponse() *Response { return &r.Response }

// StepInRequest: The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.
// If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.
// If the request cannot step into a target, `stepIn` behaves like the `next` request.
// The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.
// If there are multiple function/method calls (or other targets) on the source line,
// the argument `targetId` can be used to control into which target the `stepIn` should occur.
// The list of possible targets for a given source line can be retrieved via the `stepInTargets` request.
type StepInRequest struct {
	Request

	Arguments StepInArguments `json:"arguments"`
}

func (r *StepInRequest) GetRequest() *Request { return &r.Request }

// StepInArguments: Arguments for `stepIn` request.
type StepInArguments struct {
	ThreadId     int                 `json:"threadId"`
	SingleThread bool                `json:"singleThread,omitempty"`
	TargetId     int                 `json:"targetId,omitempty"`
	Granularity  SteppingGranularity `json:"granularity,omitempty"`
}

// StepInResponse: Response to `stepIn` request. This is just an acknowledgement, so no body field is required.
type StepInResponse struct {
	Response
}

func (r *StepInResponse) GetResponse() *Response { return &r.Response }

// StepOutRequest: The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.
// If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.
// The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.
type StepOutRequest struct {
	Request

	Arguments StepOutArguments `json:"arguments"`
}

func (r *StepOutRequest) GetRequest() *Request { return &r.Request }

// StepOutArguments: Arguments for `stepOut` request.
type StepOutArguments struct {
	ThreadId     int                 `json:"threadId"`
	SingleThread bool                `json:"singleThread,omitempty"`
	Granularity  SteppingGranularity `json:"granularity,omitempty"`
}

// StepOutResponse: Response to `stepOut` request. This is just an acknowledgement, so no body field is required.
type StepOutResponse struct {
	Response
}

func (r *StepOutResponse) GetResponse() *Response { return &r.Response }

// StepBackRequest: The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.
// If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.
// The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.
// Clients should only call this request if the corresponding capability `supportsStepBack` is true.
type StepBackRequest struct {
	Request

	Arguments StepBackArguments `json:"arguments"`
}

func (r *StepBackRequest) GetRequest() *Request { return &r.Request }

// StepBackArguments: Arguments for `stepBack` request.
type StepBackArguments struct {
	ThreadId     int                 `json:"threadId"`
	SingleThread bool                `json:"singleThread,omitempty"`
	Granularity  SteppingGranularity `json:"granularity,omitempty"`
}

// StepBackResponse: Response to `stepBack` request. This is just an acknowledgement, so no body field is required.
type StepBackResponse struct {
	Response
}

func (r *StepBackResponse) GetResponse() *Response { return &r.Response }

// ReverseContinueRequest: The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.
// Clients should only call this request if the corresponding capability `supportsStepBack` is true.
type ReverseContinueRequest struct {
	Request

	Arguments ReverseContinueArguments `json:"arguments"`
}

func (r *ReverseContinueRequest) GetRequest() *Request { return &r.Request }

// ReverseContinueArguments: Arguments for `reverseContinue` request.
type ReverseContinueArguments struct {
	ThreadId     int  `json:"threadId"`
	SingleThread bool `json:"singleThread,omitempty"`
}

// ReverseContinueResponse: Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required.
type ReverseContinueResponse struct {
	Response
}

func (r *ReverseContinueResponse) GetResponse() *Response { return &r.Response }

// RestartFrameRequest: The request restarts execution of the specified stack frame.
// The debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.
// Clients should only call this request if the corresponding capability `supportsRestartFrame` is true.
type RestartFrameRequest struct {
	Request

	Arguments RestartFrameArguments `json:"arguments"`
}

func (r *RestartFrameRequest) GetRequest() *Request { return &r.Request }

// RestartFrameArguments: Arguments for `restartFrame` request.
type RestartFrameArguments struct {
	FrameId int `json:"frameId"`
}

// RestartFrameResponse: Response to `restartFrame` request. This is just an acknowledgement, so no body field is required.
type RestartFrameResponse struct {
	Response
}

func (r *RestartFrameResponse) GetResponse() *Response { return &r.Response }

// GotoRequest: The request sets the location where the debuggee will continue to run.
// This makes it possible to skip the execution of code or to execute code again.
// The code between the current location and the goto target is not executed but skipped.
// The debug adapter first sends the response and then a `stopped` event with reason `goto`.
// Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).
type GotoRequest struct {
	Request

	Arguments GotoArguments `json:"arguments"`
}

func (r *GotoRequest) GetRequest() *Request { return &r.Request }

// GotoArguments: Arguments for `goto` request.
type GotoArguments struct {
	ThreadId int `json:"threadId"`
	TargetId int `json:"targetId"`
}

// GotoResponse: Response to `goto` request. This is just an acknowledgement, so no body field is required.
type GotoResponse struct {
	Response
}

func (r *GotoResponse) GetResponse() *Response { return &r.Response }

// PauseRequest: The request suspends the debuggee.
// The debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.
type PauseRequest struct {
	Request

	Arguments PauseArguments `json:"arguments"`
}

func (r *PauseRequest) GetRequest() *Request { return &r.Request }

// PauseArguments: Arguments for `pause` request.
type PauseArguments struct {
	ThreadId int `json:"threadId"`
}

// PauseResponse: Response to `pause` request. This is just an acknowledgement, so no body field is required.
type PauseResponse struct {
	Response
}

func (r *PauseResponse) GetResponse() *Response { return &r.Response }

// StackTraceRequest: The request returns a stacktrace from the current execution state of a given thread.
// A client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.
type StackTraceRequest struct {
	Request

	Arguments StackTraceArguments `json:"arguments"`
}

func (r *StackTraceRequest) GetRequest() *Request { return &r.Request }

// StackTraceArguments: Arguments for `stackTrace` request.
type StackTraceArguments struct {
	ThreadId   int               `json:"threadId"`
	StartFrame int               `json:"startFrame,omitempty"`
	Levels     int               `json:"levels,omitempty"`
	Format     *StackFrameFormat `json:"format,omitempty"`
}

// StackTraceResponse: Response to `stackTrace` request.
type StackTraceResponse struct {
	Response

	Body StackTraceResponseBody `json:"body"`
}

type StackTraceResponseBody struct {
	StackFrames []StackFrame `json:"stackFrames"`
	TotalFrames int          `json:"totalFrames,omitempty"`
}

func (r *StackTraceResponse) GetResponse() *Response { return &r.Response }

// ScopesRequest: The request returns the variable scopes for a given stack frame ID.
type ScopesRequest struct {
	Request

	Arguments ScopesArguments `json:"arguments"`
}

func (r *ScopesRequest) GetRequest() *Request { return &r.Request }

// ScopesArguments: Arguments for `scopes` request.
type ScopesArguments struct {
	FrameId int `json:"frameId"`
}

// ScopesResponse: Response to `scopes` request.
type ScopesResponse struct {
	Response

	Body ScopesResponseBody `json:"body"`
}

type ScopesResponseBody struct {
	Scopes []Scope `json:"scopes"`
}

func (r *ScopesResponse) GetResponse() *Response { return &r.Response }

// VariablesRequest: Retrieves all child variables for the given variable reference.
// A filter can be used to limit the fetched children to either named or indexed children.
type VariablesRequest struct {
	Request

	Arguments VariablesArguments `json:"arguments"`
}

func (r *VariablesRequest) GetRequest() *Request { return &r.Request }

// VariablesArguments: Arguments for `variables` request.
type VariablesArguments struct {
	VariablesReference int          `json:"variablesReference"`
	Filter             string       `json:"filter,omitempty"`
	Start              int          `json:"start,omitempty"`
	Count              int          `json:"count,omitempty"`
	Format             *ValueFormat `json:"format,omitempty"`
}

// VariablesResponse: Response to `variables` request.
type VariablesResponse struct {
	Response

	Body VariablesResponseBody `json:"body"`
}

type VariablesResponseBody struct {
	Variables []Variable `json:"variables"`
}

func (r *VariablesResponse) GetResponse() *Response { return &r.Response }

// SetVariableRequest: Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true.
// If a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.
type SetVariableRequest struct {
	Request

	Arguments SetVariableArguments `json:"arguments"`
}

func (r *SetVariableRequest) GetRequest() *Request { return &r.Request }

// SetVariableArguments: Arguments for `setVariable` request.
type SetVariableArguments struct {
	VariablesReference int          `json:"variablesReference"`
	Name               string       `json:"name"`
	Value              string       `json:"value"`
	Format             *ValueFormat `json:"format,omitempty"`
}

// SetVariableResponse: Response to `setVariable` request.
type SetVariableResponse struct {
	Response

	Body SetVariableResponseBody `json:"body"`
}

type SetVariableResponseBody struct {
	Value              string `json:"value"`
	Type               string `json:"type,omitempty"`
	VariablesReference int    `json:"variablesReference,omitempty"`
	NamedVariables     int    `json:"namedVariables,omitempty"`
	IndexedVariables   int    `json:"indexedVariables,omitempty"`
}

func (r *SetVariableResponse) GetResponse() *Response { return &r.Response }

// SourceRequest: The request retrieves the source code for a given source reference.
type SourceRequest struct {
	Request

	Arguments SourceArguments `json:"arguments"`
}

func (r *SourceRequest) GetRequest() *Request { return &r.Request }

// SourceArguments: Arguments for `source` request.
type SourceArguments struct {
	Source          *Source `json:"source,omitempty"`
	SourceReference int     `json:"sourceReference"`
}

// SourceResponse: Response to `source` request.
type SourceResponse struct {
	Response

	Body SourceResponseBody `json:"body"`
}

type SourceResponseBody struct {
	Content  string `json:"content"`
	MimeType string `json:"mimeType,omitempty"`
}

func (r *SourceResponse) GetResponse() *Response { return &r.Response }

// ThreadsRequest: The request retrieves a list of all threads.
type ThreadsRequest struct {
	Request
}

func (r *ThreadsRequest) GetRequest() *Request { return &r.Request }

// ThreadsResponse: Response to `threads` request.
type ThreadsResponse struct {
	Response

	Body ThreadsResponseBody `json:"body"`
}

type ThreadsResponseBody struct {
	Threads []Thread `json:"threads"`
}

func (r *ThreadsResponse) GetResponse() *Response { return &r.Response }

// TerminateThreadsRequest: The request terminates the threads with the given ids.
// Clients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.
type TerminateThreadsRequest struct {
	Request

	Arguments TerminateThreadsArguments `json:"arguments"`
}

func (r *TerminateThreadsRequest) GetRequest() *Request { return &r.Request }

// TerminateThreadsArguments: Arguments for `terminateThreads` request.
type TerminateThreadsArguments struct {
	ThreadIds []int `json:"threadIds,omitempty"`
}

// TerminateThreadsResponse: Response to `terminateThreads` request. This is just an acknowledgement, no body field is required.
type TerminateThreadsResponse struct {
	Response
}

func (r *TerminateThreadsResponse) GetResponse() *Response { return &r.Response }

// ModulesRequest: Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.
// Clients should only call this request if the corresponding capability `supportsModulesRequest` is true.
type ModulesRequest struct {
	Request

	Arguments ModulesArguments `json:"arguments"`
}

func (r *ModulesRequest) GetRequest() *Request { return &r.Request }

// ModulesArguments: Arguments for `modules` request.
type ModulesArguments struct {
	StartModule int `json:"startModule,omitempty"`
	ModuleCount int `json:"moduleCount,omitempty"`
}

// ModulesResponse: Response to `modules` request.
type ModulesResponse struct {
	Response

	Body ModulesResponseBody `json:"body"`
}

type ModulesResponseBody struct {
	Modules      []Module `json:"modules"`
	TotalModules int      `json:"totalModules,omitempty"`
}

func (r *ModulesResponse) GetResponse() *Response { return &r.Response }

// LoadedSourcesRequest: Retrieves the set of all sources currently loaded by the debugged process.
// Clients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.
type LoadedSourcesRequest struct {
	Request

	Arguments *LoadedSourcesArguments `json:"arguments,omitempty"`
}

func (r *LoadedSourcesRequest) GetRequest() *Request { return &r.Request }

// LoadedSourcesArguments: Arguments for `loadedSources` request.
type LoadedSourcesArguments struct {
}

// LoadedSourcesResponse: Response to `loadedSources` request.
type LoadedSourcesResponse struct {
	Response

	Body LoadedSourcesResponseBody `json:"body"`
}

type LoadedSourcesResponseBody struct {
	Sources []Source `json:"sources"`
}

func (r *LoadedSourcesResponse) GetResponse() *Response { return &r.Response }

// EvaluateRequest: Evaluates the given expression in the context of the topmost stack frame.
// The expression has access to any variables and arguments that are in scope.
type EvaluateRequest struct {
	Request

	Arguments EvaluateArguments `json:"arguments"`
}

func (r *EvaluateRequest) GetRequest() *Request { return &r.Request }

// EvaluateArguments: Arguments for `evaluate` request.
type EvaluateArguments struct {
	Expression string       `json:"expression"`
	FrameId    int          `json:"frameId,omitempty"`
	Context    string       `json:"context,omitempty"`
	Format     *ValueFormat `json:"format,omitempty"`
}

// EvaluateResponse: Response to `evaluate` request.
type EvaluateResponse struct {
	Response

	Body EvaluateResponseBody `json:"body"`
}

type EvaluateResponseBody struct {
	Result             string                    `json:"result"`
	Type               string                    `json:"type,omitempty"`
	PresentationHint   *VariablePresentationHint `json:"presentationHint,omitempty"`
	VariablesReference int                       `json:"variablesReference"`
	NamedVariables     int                       `json:"namedVariables,omitempty"`
	IndexedVariables   int                       `json:"indexedVariables,omitempty"`
	MemoryReference    string                    `json:"memoryReference,omitempty"`
}

func (r *EvaluateResponse) GetResponse() *Response { return &r.Response }

// SetExpressionRequest: Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.
// The expressions have access to any variables and arguments that are in scope of the specified frame.
// Clients should only call this request if the corresponding capability `supportsSetExpression` is true.
// If a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.
type SetExpressionRequest struct {
	Request

	Arguments SetExpressionArguments `json:"arguments"`
}

func (r *SetExpressionRequest) GetRequest() *Request { return &r.Request }

// SetExpressionArguments: Arguments for `setExpression` request.
type SetExpressionArguments struct {
	Expression string       `json:"expression"`
	Value      string       `json:"value"`
	FrameId    int          `json:"frameId,omitempty"`
	Format     *ValueFormat `json:"format,omitempty"`
}

// SetExpressionResponse: Response to `setExpression` request.
type SetExpressionResponse struct {
	Response

	Body SetExpressionResponseBody `json:"body"`
}

type SetExpressionResponseBody struct {
	Value              string                    `json:"value"`
	Type               string                    `json:"type,omitempty"`
	PresentationHint   *VariablePresentationHint `json:"presentationHint,omitempty"`
	VariablesReference int                       `json:"variablesReference,omitempty"`
	NamedVariables     int                       `json:"namedVariables,omitempty"`
	IndexedVariables   int                       `json:"indexedVariables,omitempty"`
}

func (r *SetExpressionResponse) GetResponse() *Response { return &r.Response }

// StepInTargetsRequest: This request retrieves the possible step-in targets for the specified stack frame.
// These targets can be used in the `stepIn` request.
// Clients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.
type StepInTargetsRequest struct {
	Request

	Arguments StepInTargetsArguments `json:"arguments"`
}

func (r *StepInTargetsRequest) GetRequest() *Request { return &r.Request }

// StepInTargetsArguments: Arguments for `stepInTargets` request.
type StepInTargetsArguments struct {
	FrameId int `json:"frameId"`
}

// StepInTargetsResponse: Response to `stepInTargets` request.
type StepInTargetsResponse struct {
	Response

	Body StepInTargetsResponseBody `json:"body"`
}

type StepInTargetsResponseBody struct {
	Targets []StepInTarget `json:"targets"`
}

func (r *StepInTargetsResponse) GetResponse() *Response { return &r.Response }

// GotoTargetsRequest: This request retrieves the possible goto targets for the specified source location.
// These targets can be used in the `goto` request.
// Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.
type GotoTargetsRequest struct {
	Request

	Arguments GotoTargetsArguments `json:"arguments"`
}

func (r *GotoTargetsRequest) GetRequest() *Request { return &r.Request }

// GotoTargetsArguments: Arguments for `gotoTargets` request.
type GotoTargetsArguments struct {
	Source Source `json:"source"`
	Line   int    `json:"line"`
	Column int    `json:"column,omitempty"`
}

// GotoTargetsResponse: Response to `gotoTargets` request.
type GotoTargetsResponse struct {
	Response

	Body GotoTargetsResponseBody `json:"body"`
}

type GotoTargetsResponseBody struct {
	Targets []GotoTarget `json:"targets"`
}

func (r *GotoTargetsResponse) GetResponse() *Response { return &r.Response }

// CompletionsRequest: Returns a list of possible completions for a given caret position and text.
// Clients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.
type CompletionsRequest struct {
	Request

	Arguments CompletionsArguments `json:"arguments"`
}

func (r *CompletionsRequest) GetRequest() *Request { return &r.Request }

// CompletionsArguments: Arguments for `completions` request.
type CompletionsArguments struct {
	FrameId int    `json:"frameId,omitempty"`
	Text    string `json:"text"`
	Column  int    `json:"column"`
	Line    int    `json:"line,omitempty"`
}

// CompletionsResponse: Response to `completions` request.
type CompletionsResponse struct {
	Response

	Body CompletionsResponseBody `json:"body"`
}

type CompletionsResponseBody struct {
	Targets []CompletionItem `json:"targets"`
}

func (r *CompletionsResponse) GetResponse() *Response { return &r.Response }

// ExceptionInfoRequest: Retrieves the details of the exception that caused this event to be raised.
// Clients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.
type ExceptionInfoRequest struct {
	Request

	Arguments ExceptionInfoArguments `json:"arguments"`
}

func (r *ExceptionInfoRequest) GetRequest() *Request { return &r.Request }

// ExceptionInfoArguments: Arguments for `exceptionInfo` request.
type ExceptionInfoArguments struct {
	ThreadId int `json:"threadId"`
}

// ExceptionInfoResponse: Response to `exceptionInfo` request.
type ExceptionInfoResponse struct {
	Response

	Body ExceptionInfoResponseBody `json:"body"`
}

type ExceptionInfoResponseBody struct {
	ExceptionId string             `json:"exceptionId"`
	Description string             `json:"description,omitempty"`
	BreakMode   ExceptionBreakMode `json:"breakMode"`
	Details     *ExceptionDetails  `json:"details,omitempty"`
}

func (r *ExceptionInfoResponse) GetResponse() *Response { return &r.Response }

// ReadMemoryRequest: Reads bytes from memory at the provided location.
// Clients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.
type ReadMemoryRequest struct {
	Request

	Arguments ReadMemoryArguments `json:"arguments"`
}

func (r *ReadMemoryRequest) GetRequest() *Request { return &r.Request }

// ReadMemoryArguments: Arguments for `readMemory` request.
type ReadMemoryArguments struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset,omitempty"`
	Count           int    `json:"count"`
}

// ReadMemoryResponse: Response to `readMemory` request.
type ReadMemoryResponse struct {
	Response

	Body ReadMemoryResponseBody `json:"body,omitempty"`
}

type ReadMemoryResponseBody struct {
	Address         string `json:"address"`
	UnreadableBytes int    `json:"unreadableBytes,omitempty"`
	Data            string `json:"data,omitempty"`
}

func (r *ReadMemoryResponse) GetResponse() *Response { return &r.Response }

// WriteMemoryRequest: Writes bytes to memory at the provided location.
// Clients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.
type WriteMemoryRequest struct {
	Request

	Arguments WriteMemoryArguments `json:"arguments"`
}

func (r *WriteMemoryRequest) GetRequest() *Request { return &r.Request }

// WriteMemoryArguments: Arguments for `writeMemory` request.
type WriteMemoryArguments struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset,omitempty"`
	AllowPartial    bool   `json:"allowPartial,omitempty"`
	Data            string `json:"data"`
}

// WriteMemoryResponse: Response to `writeMemory` request.
type WriteMemoryResponse struct {
	Response

	Body WriteMemoryResponseBody `json:"body,omitempty"`
}

type WriteMemoryResponseBody struct {
	Offset       int `json:"offset,omitempty"`
	BytesWritten int `json:"bytesWritten,omitempty"`
}

func (r *WriteMemoryResponse) GetResponse() *Response { return &r.Response }

// DisassembleRequest: Disassembles code stored at the provided location.
// Clients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.
type DisassembleRequest struct {
	Request

	Arguments DisassembleArguments `json:"arguments"`
}

func (r *DisassembleRequest) GetRequest() *Request { return &r.Request }

// DisassembleArguments: Arguments for `disassemble` request.
type DisassembleArguments struct {
	MemoryReference   string `json:"memoryReference"`
	Offset            int    `json:"offset,omitempty"`
	InstructionOffset int    `json:"instructionOffset,omitempty"`
	InstructionCount  int    `json:"instructionCount"`
	ResolveSymbols    bool   `json:"resolveSymbols,omitempty"`
}

// DisassembleResponse: Response to `disassemble` request.
type DisassembleResponse struct {
	Response

	Body DisassembleResponseBody `json:"body,omitempty"`
}

type DisassembleResponseBody struct {
	Instructions []DisassembledInstruction `json:"instructions"`
}

func (r *DisassembleResponse) GetResponse() *Response { return &r.Response }

// Capabilities: Information about the capabilities of a debug adapter.
type Capabilities struct {
	SupportsConfigurationDoneRequest      bool                         `json:"supportsConfigurationDoneRequest,omitempty"`
	SupportsFunctionBreakpoints           bool                         `json:"supportsFunctionBreakpoints,omitempty"`
	SupportsConditionalBreakpoints        bool                         `json:"supportsConditionalBreakpoints,omitempty"`
	SupportsHitConditionalBreakpoints     bool                         `json:"supportsHitConditionalBreakpoints,omitempty"`
	SupportsEvaluateForHovers             bool                         `json:"supportsEvaluateForHovers,omitempty"`
	ExceptionBreakpointFilters            []ExceptionBreakpointsFilter `json:"exceptionBreakpointFilters,omitempty"`
	SupportsStepBack                      bool                         `json:"supportsStepBack,omitempty"`
	SupportsSetVariable                   bool                         `json:"supportsSetVariable,omitempty"`
	SupportsRestartFrame                  bool                         `json:"supportsRestartFrame,omitempty"`
	SupportsGotoTargetsRequest            bool                         `json:"supportsGotoTargetsRequest,omitempty"`
	SupportsStepInTargetsRequest          bool                         `json:"supportsStepInTargetsRequest,omitempty"`
	SupportsCompletionsRequest            bool                         `json:"supportsCompletionsRequest,omitempty"`
	CompletionTriggerCharacters           []string                     `json:"completionTriggerCharacters,omitempty"`
	SupportsModulesRequest                bool                         `json:"supportsModulesRequest,omitempty"`
	AdditionalModuleColumns               []ColumnDescriptor           `json:"additionalModuleColumns,omitempty"`
	SupportedChecksumAlgorithms           []ChecksumAlgorithm          `json:"supportedChecksumAlgorithms,omitempty"`
	SupportsRestartRequest                bool                         `json:"supportsRestartRequest,omitempty"`
	SupportsExceptionOptions              bool                         `json:"supportsExceptionOptions,omitempty"`
	SupportsValueFormattingOptions        bool                         `json:"supportsValueFormattingOptions,omitempty"`
	SupportsExceptionInfoRequest          bool                         `json:"supportsExceptionInfoRequest,omitempty"`
	SupportTerminateDebuggee              bool                         `json:"supportTerminateDebuggee,omitempty"`
	SupportSuspendDebuggee                bool                         `json:"supportSuspendDebuggee,omitempty"`
	SupportsDelayedStackTraceLoading      bool                         `json:"supportsDelayedStackTraceLoading,omitempty"`
	SupportsLoadedSourcesRequest          bool                         `json:"supportsLoadedSourcesRequest,omitempty"`
	SupportsLogPoints                     bool                         `json:"supportsLogPoints,omitempty"`
	SupportsTerminateThreadsRequest       bool                         `json:"supportsTerminateThreadsRequest,omitempty"`
	SupportsSetExpression                 bool                         `json:"supportsSetExpression,omitempty"`
	SupportsTerminateRequest              bool                         `json:"supportsTerminateRequest,omitempty"`
	SupportsDataBreakpoints               bool                         `json:"supportsDataBreakpoints,omitempty"`
	SupportsReadMemoryRequest             bool                         `json:"supportsReadMemoryRequest,omitempty"`
	SupportsWriteMemoryRequest            bool                         `json:"supportsWriteMemoryRequest,omitempty"`
	SupportsDisassembleRequest            bool                         `json:"supportsDisassembleRequest,omitempty"`
	SupportsCancelRequest                 bool                         `json:"supportsCancelRequest,omitempty"`
	SupportsBreakpointLocationsRequest    bool                         `json:"supportsBreakpointLocationsRequest,omitempty"`
	SupportsClipboardContext              bool                         `json:"supportsClipboardContext,omitempty"`
	SupportsSteppingGranularity           bool                         `json:"supportsSteppingGranularity,omitempty"`
	SupportsInstructionBreakpoints        bool                         `json:"supportsInstructionBreakpoints,omitempty"`
	SupportsExceptionFilterOptions        bool                         `json:"supportsExceptionFilterOptions,omitempty"`
	SupportsSingleThreadExecutionRequests bool                         `json:"supportsSingleThreadExecutionRequests,omitempty"`
}

// ExceptionBreakpointsFilter: An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.
type ExceptionBreakpointsFilter struct {
	Filter               string `json:"filter"`
	Label                string `json:"label"`
	Description          string `json:"description,omitempty"`
	Default              bool   `json:"default,omitempty"`
	SupportsCondition    bool   `json:"supportsCondition,omitempty"`
	ConditionDescription string `json:"conditionDescription,omitempty"`
}

// ErrorMessage: A structured message object. Used to return errors from requests.
type ErrorMessage struct {
	Id            int               `json:"id"`
	Format        string            `json:"format"`
	Variables     map[string]string `json:"variables,omitempty"`
	SendTelemetry bool              `json:"sendTelemetry,omitempty"`
	ShowUser      bool              `json:"showUser"`
	Url           string            `json:"url,omitempty"`
	UrlLabel      string            `json:"urlLabel,omitempty"`
}

// Module: A Module object represents a row in the modules view.
// The `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.
// The `name` attribute is used to minimally render the module in the UI.
//
// Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.
//
// To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.
type Module struct {
	Id             interface{} `json:"id"`
	Name           string      `json:"name"`
	Path           string      `json:"path,omitempty"`
	IsOptimized    bool        `json:"isOptimized,omitempty"`
	IsUserCode     bool        `json:"isUserCode,omitempty"`
	Version        string      `json:"version,omitempty"`
	SymbolStatus   string      `json:"symbolStatus,omitempty"`
	SymbolFilePath string      `json:"symbolFilePath,omitempty"`
	DateTimeStamp  string      `json:"dateTimeStamp,omitempty"`
	AddressRange   string      `json:"addressRange,omitempty"`
}

// ColumnDescriptor: A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,
// and what the column's label should be.
// It is only used if the underlying UI actually supports this level of customization.
type ColumnDescriptor struct {
	AttributeName string `json:"attributeName"`
	Label         string `json:"label"`
	Format        string `json:"format,omitempty"`
	Type          string `json:"type,omitempty"`
	Width         int    `json:"width,omitempty"`
}

// ModulesViewDescriptor: The ModulesViewDescriptor is the container for all declarative configuration options of a module view.
// For now it only specifies the columns to be shown in the modules view.
type ModulesViewDescriptor struct {
	Columns []ColumnDescriptor `json:"columns"`
}

// Thread: A Thread
type Thread struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

// Source: A `Source` is a descriptor for source code.
// It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.
type Source struct {
	Name             string      `json:"name,omitempty"`
	Path             string      `json:"path,omitempty"`
	SourceReference  int         `json:"sourceReference,omitempty"`
	PresentationHint string      `json:"presentationHint,omitempty"`
	Origin           string      `json:"origin,omitempty"`
	Sources          []Source    `json:"sources,omitempty"`
	AdapterData      interface{} `json:"adapterData,omitempty"`
	Checksums        []Checksum  `json:"checksums,omitempty"`
}

// StackFrame: A Stackframe contains the source location.
type StackFrame struct {
	Id                          int         `json:"id"`
	Name                        string      `json:"name"`
	Source                      *Source     `json:"source,omitempty"`
	Line                        int         `json:"line"`
	Column                      int         `json:"column"`
	EndLine                     int         `json:"endLine,omitempty"`
	EndColumn                   int         `json:"endColumn,omitempty"`
	CanRestart                  bool        `json:"canRestart,omitempty"`
	InstructionPointerReference string      `json:"instructionPointerReference,omitempty"`
	ModuleId                    interface{} `json:"moduleId,omitempty"`
	PresentationHint            string      `json:"presentationHint,omitempty"`
}

// Scope: A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.
type Scope struct {
	Name               string  `json:"name"`
	PresentationHint   string  `json:"presentationHint,omitempty"`
	VariablesReference int     `json:"variablesReference"`
	NamedVariables     int     `json:"namedVariables,omitempty"`
	IndexedVariables   int     `json:"indexedVariables,omitempty"`
	Expensive          bool    `json:"expensive"`
	Source             *Source `json:"source,omitempty"`
	Line               int     `json:"line,omitempty"`
	Column             int     `json:"column,omitempty"`
	EndLine            int     `json:"endLine,omitempty"`
	EndColumn          int     `json:"endColumn,omitempty"`
}

// Variable: A Variable is a name/value pair.
// The `type` attribute is shown if space permits or when hovering over the variable's name.
// The `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.
// If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.
// If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.
// The client can use this information to present the children in a paged UI and fetch them in chunks.
type Variable struct {
	Name               string                    `json:"name"`
	Value              string                    `json:"value"`
	Type               string                    `json:"type,omitempty"`
	PresentationHint   *VariablePresentationHint `json:"presentationHint,omitempty"`
	EvaluateName       string                    `json:"evaluateName,omitempty"`
	VariablesReference int                       `json:"variablesReference"`
	NamedVariables     int                       `json:"namedVariables,omitempty"`
	IndexedVariables   int                       `json:"indexedVariables,omitempty"`
	MemoryReference    string                    `json:"memoryReference,omitempty"`
}

// VariablePresentationHint: Properties of a variable that can be used to determine how to render the variable in the UI.
type VariablePresentationHint struct {
	Kind       string   `json:"kind,omitempty"`
	Attributes []string `json:"attributes,omitempty"`
	Visibility string   `json:"visibility,omitempty"`
	Lazy       bool     `json:"lazy,omitempty"`
}

// BreakpointLocation: Properties of a breakpoint location returned from the `breakpointLocations` request.
type BreakpointLocation struct {
	Line      int `json:"line"`
	Column    int `json:"column,omitempty"`
	EndLine   int `json:"endLine,omitempty"`
	EndColumn int `json:"endColumn,omitempty"`
}

// SourceBreakpoint: Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.
type SourceBreakpoint struct {
	Line         int    `json:"line"`
	Column       int    `json:"column,omitempty"`
	Condition    string `json:"condition,omitempty"`
	HitCondition string `json:"hitCondition,omitempty"`
	LogMessage   string `json:"logMessage,omitempty"`
}

// FunctionBreakpoint: Properties of a breakpoint passed to the `setFunctionBreakpoints` request.
type FunctionBreakpoint struct {
	Name         string `json:"name"`
	Condition    string `json:"condition,omitempty"`
	HitCondition string `json:"hitCondition,omitempty"`
}

// DataBreakpointAccessType: This enumeration defines all possible access types for data breakpoints.
type DataBreakpointAccessType string

// DataBreakpoint: Properties of a data breakpoint passed to the `setDataBreakpoints` request.
type DataBreakpoint struct {
	DataId       string                   `json:"dataId"`
	AccessType   DataBreakpointAccessType `json:"accessType,omitempty"`
	Condition    string                   `json:"condition,omitempty"`
	HitCondition string                   `json:"hitCondition,omitempty"`
}

// InstructionBreakpoint: Properties of a breakpoint passed to the `setInstructionBreakpoints` request
type InstructionBreakpoint struct {
	InstructionReference string `json:"instructionReference"`
	Offset               int    `json:"offset,omitempty"`
	Condition            string `json:"condition,omitempty"`
	HitCondition         string `json:"hitCondition,omitempty"`
}

// Breakpoint: Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.
type Breakpoint struct {
	Id                   int     `json:"id,omitempty"`
	Verified             bool    `json:"verified"`
	Message              string  `json:"message,omitempty"`
	Source               *Source `json:"source,omitempty"`
	Line                 int     `json:"line,omitempty"`
	Column               int     `json:"column,omitempty"`
	EndLine              int     `json:"endLine,omitempty"`
	EndColumn            int     `json:"endColumn,omitempty"`
	InstructionReference string  `json:"instructionReference,omitempty"`
	Offset               int     `json:"offset,omitempty"`
}

// SteppingGranularity: The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.
type SteppingGranularity string

// StepInTarget: A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.
type StepInTarget struct {
	Id        int    `json:"id"`
	Label     string `json:"label"`
	Line      int    `json:"line,omitempty"`
	Column    int    `json:"column,omitempty"`
	EndLine   int    `json:"endLine,omitempty"`
	EndColumn int    `json:"endColumn,omitempty"`
}

// GotoTarget: A `GotoTarget` describes a code location that can be used as a target in the `goto` request.
// The possible goto targets can be determined via the `gotoTargets` request.
type GotoTarget struct {
	Id                          int    `json:"id"`
	Label                       string `json:"label"`
	Line                        int    `json:"line"`
	Column                      int    `json:"column,omitempty"`
	EndLine                     int    `json:"endLine,omitempty"`
	EndColumn                   int    `json:"endColumn,omitempty"`
	InstructionPointerReference string `json:"instructionPointerReference,omitempty"`
}

// CompletionItem: `CompletionItems` are the suggestions returned from the `completions` request.
type CompletionItem struct {
	Label           string             `json:"label"`
	Text            string             `json:"text,omitempty"`
	SortText        string             `json:"sortText,omitempty"`
	Detail          string             `json:"detail,omitempty"`
	Type            CompletionItemType `json:"type,omitempty"`
	Start           int                `json:"start,omitempty"`
	Length          int                `json:"length,omitempty"`
	SelectionStart  int                `json:"selectionStart,omitempty"`
	SelectionLength int                `json:"selectionLength,omitempty"`
}

// CompletionItemType: Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.
type CompletionItemType string

// ChecksumAlgorithm: Names of checksum algorithms that may be supported by a debug adapter.
type ChecksumAlgorithm string

// Checksum: The checksum of an item calculated by the specified algorithm.
type Checksum struct {
	Algorithm ChecksumAlgorithm `json:"algorithm"`
	Checksum  string            `json:"checksum"`
}

// ValueFormat: Provides formatting information for a value.
type ValueFormat struct {
	Hex bool `json:"hex,omitempty"`
}

// StackFrameFormat: Provides formatting information for a stack frame.
type StackFrameFormat struct {
	ValueFormat

	Parameters      bool `json:"parameters,omitempty"`
	ParameterTypes  bool `json:"parameterTypes,omitempty"`
	ParameterNames  bool `json:"parameterNames,omitempty"`
	ParameterValues bool `json:"parameterValues,omitempty"`
	Line            bool `json:"line,omitempty"`
	Module          bool `json:"module,omitempty"`
	IncludeAll      bool `json:"includeAll,omitempty"`
}

// ExceptionFilterOptions: An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.
type ExceptionFilterOptions struct {
	FilterId  string `json:"filterId"`
	Condition string `json:"condition,omitempty"`
}

// ExceptionOptions: An `ExceptionOptions` assigns configuration options to a set of exceptions.
type ExceptionOptions struct {
	Path      []ExceptionPathSegment `json:"path,omitempty"`
	BreakMode ExceptionBreakMode     `json:"breakMode"`
}

// ExceptionBreakMode: This enumeration defines all possible conditions when a thrown exception should result in a break.
// never: never breaks,
// always: always breaks,
// unhandled: breaks when exception unhandled,
// userUnhandled: breaks if the exception is not handled by user code.
type ExceptionBreakMode string

// ExceptionPathSegment: An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.
// If a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.
type ExceptionPathSegment struct {
	Negate bool     `json:"negate,omitempty"`
	Names  []string `json:"names"`
}

// ExceptionDetails: Detailed information about an exception that has occurred.
type ExceptionDetails struct {
	Message        string             `json:"message,omitempty"`
	TypeName       string             `json:"typeName,omitempty"`
	FullTypeName   string             `json:"fullTypeName,omitempty"`
	EvaluateName   string             `json:"evaluateName,omitempty"`
	StackTrace     string             `json:"stackTrace,omitempty"`
	InnerException []ExceptionDetails `json:"innerException,omitempty"`
}

// DisassembledInstruction: Represents a single disassembled instruction.
type DisassembledInstruction struct {
	Address          string  `json:"address"`
	InstructionBytes string  `json:"instructionBytes,omitempty"`
	Instruction      string  `json:"instruction"`
	Symbol           string  `json:"symbol,omitempty"`
	Location         *Source `json:"location,omitempty"`
	Line             int     `json:"line,omitempty"`
	Column           int     `json:"column,omitempty"`
	EndLine          int     `json:"endLine,omitempty"`
	EndColumn        int     `json:"endColumn,omitempty"`
}

// InvalidatedAreas: Logical areas that can be invalidated by the `invalidated` event.
type InvalidatedAreas string

// Mapping of request commands and corresponding struct constructors that
// can be passed to json.Unmarshal.
var requestCtor = map[string]messageCtor{
	"cancel":         func() Message { return &CancelRequest{} },
	"runInTerminal":  func() Message { return &RunInTerminalRequest{} },
	"startDebugging": func() Message { return &StartDebuggingRequest{} },
	"initialize": func() Message {
		return &InitializeRequest{
			Arguments: InitializeRequestArguments{
				// Set the default values specified here: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Initialize.
				LinesStartAt1:   true,
				ColumnsStartAt1: true,
				PathFormat:      "path",
			},
		}
	},
	"configurationDone":         func() Message { return &ConfigurationDoneRequest{} },
	"launch":                    func() Message { return &LaunchRequest{} },
	"attach":                    func() Message { return &AttachRequest{} },
	"restart":                   func() Message { return &RestartRequest{} },
	"disconnect":                func() Message { return &DisconnectRequest{} },
	"terminate":                 func() Message { return &TerminateRequest{} },
	"breakpointLocations":       func() Message { return &BreakpointLocationsRequest{} },
	"setBreakpoints":            func() Message { return &SetBreakpointsRequest{} },
	"setFunctionBreakpoints":    func() Message { return &SetFunctionBreakpointsRequest{} },
	"setExceptionBreakpoints":   func() Message { return &SetExceptionBreakpointsRequest{} },
	"dataBreakpointInfo":        func() Message { return &DataBreakpointInfoRequest{} },
	"setDataBreakpoints":        func() Message { return &SetDataBreakpointsRequest{} },
	"setInstructionBreakpoints": func() Message { return &SetInstructionBreakpointsRequest{} },
	"continue":                  func() Message { return &ContinueRequest{} },
	"next":                      func() Message { return &NextRequest{} },
	"stepIn":                    func() Message { return &StepInRequest{} },
	"stepOut":                   func() Message { return &StepOutRequest{} },
	"stepBack":                  func() Message { return &StepBackRequest{} },
	"reverseContinue":           func() Message { return &ReverseContinueRequest{} },
	"restartFrame":              func() Message { return &RestartFrameRequest{} },
	"goto":                      func() Message { return &GotoRequest{} },
	"pause":                     func() Message { return &PauseRequest{} },
	"stackTrace":                func() Message { return &StackTraceRequest{} },
	"scopes":                    func() Message { return &ScopesRequest{} },
	"variables":                 func() Message { return &VariablesRequest{} },
	"setVariable":               func() Message { return &SetVariableRequest{} },
	"source":                    func() Message { return &SourceRequest{} },
	"threads":                   func() Message { return &ThreadsRequest{} },
	"terminateThreads":          func() Message { return &TerminateThreadsRequest{} },
	"modules":                   func() Message { return &ModulesRequest{} },
	"loadedSources":             func() Message { return &LoadedSourcesRequest{} },
	"evaluate":                  func() Message { return &EvaluateRequest{} },
	"setExpression":             func() Message { return &SetExpressionRequest{} },
	"stepInTargets":             func() Message { return &StepInTargetsRequest{} },
	"gotoTargets":               func() Message { return &GotoTargetsRequest{} },
	"completions":               func() Message { return &CompletionsRequest{} },
	"exceptionInfo":             func() Message { return &ExceptionInfoRequest{} },
	"readMemory":                func() Message { return &ReadMemoryRequest{} },
	"writeMemory":               func() Message { return &WriteMemoryRequest{} },
	"disassemble":               func() Message { return &DisassembleRequest{} },
}

// Mapping of response commands and corresponding struct constructors that
// can be passed to json.Unmarshal.
var responseCtor = map[string]messageCtor{
	"cancel":                    func() Message { return &CancelResponse{} },
	"runInTerminal":             func() Message { return &RunInTerminalResponse{} },
	"startDebugging":            func() Message { return &StartDebuggingResponse{} },
	"initialize":                func() Message { return &InitializeResponse{} },
	"configurationDone":         func() Message { return &ConfigurationDoneResponse{} },
	"launch":                    func() Message { return &LaunchResponse{} },
	"attach":                    func() Message { return &AttachResponse{} },
	"restart":                   func() Message { return &RestartResponse{} },
	"disconnect":                func() Message { return &DisconnectResponse{} },
	"terminate":                 func() Message { return &TerminateResponse{} },
	"breakpointLocations":       func() Message { return &BreakpointLocationsResponse{} },
	"setBreakpoints":            func() Message { return &SetBreakpointsResponse{} },
	"setFunctionBreakpoints":    func() Message { return &SetFunctionBreakpointsResponse{} },
	"setExceptionBreakpoints":   func() Message { return &SetExceptionBreakpointsResponse{} },
	"dataBreakpointInfo":        func() Message { return &DataBreakpointInfoResponse{} },
	"setDataBreakpoints":        func() Message { return &SetDataBreakpointsResponse{} },
	"setInstructionBreakpoints": func() Message { return &SetInstructionBreakpointsResponse{} },
	"continue":                  func() Message { return &ContinueResponse{} },
	"next":                      func() Message { return &NextResponse{} },
	"stepIn":                    func() Message { return &StepInResponse{} },
	"stepOut":                   func() Message { return &StepOutResponse{} },
	"stepBack":                  func() Message { return &StepBackResponse{} },
	"reverseContinue":           func() Message { return &ReverseContinueResponse{} },
	"restartFrame":              func() Message { return &RestartFrameResponse{} },
	"goto":                      func() Message { return &GotoResponse{} },
	"pause":                     func() Message { return &PauseResponse{} },
	"stackTrace":                func() Message { return &StackTraceResponse{} },
	"scopes":                    func() Message { return &ScopesResponse{} },
	"variables":                 func() Message { return &VariablesResponse{} },
	"setVariable":               func() Message { return &SetVariableResponse{} },
	"source":                    func() Message { return &SourceResponse{} },
	"threads":                   func() Message { return &ThreadsResponse{} },
	"terminateThreads":          func() Message { return &TerminateThreadsResponse{} },
	"modules":                   func() Message { return &ModulesResponse{} },
	"loadedSources":             func() Message { return &LoadedSourcesResponse{} },
	"evaluate":                  func() Message { return &EvaluateResponse{} },
	"setExpression":             func() Message { return &SetExpressionResponse{} },
	"stepInTargets":             func() Message { return &StepInTargetsResponse{} },
	"gotoTargets":               func() Message { return &GotoTargetsResponse{} },
	"completions":               func() Message { return &CompletionsResponse{} },
	"exceptionInfo":             func() Message { return &ExceptionInfoResponse{} },
	"readMemory":                func() Message { return &ReadMemoryResponse{} },
	"writeMemory":               func() Message { return &WriteMemoryResponse{} },
	"disassemble":               func() Message { return &DisassembleResponse{} },
}

// Mapping of event ids and corresponding struct constructors that
// can be passed to json.Unmarshal.
var eventCtor = map[string]messageCtor{
	"initialized":    func() Message { return &InitializedEvent{} },
	"stopped":        func() Message { return &StoppedEvent{} },
	"continued":      func() Message { return &ContinuedEvent{} },
	"exited":         func() Message { return &ExitedEvent{} },
	"terminated":     func() Message { return &TerminatedEvent{} },
	"thread":         func() Message { return &ThreadEvent{} },
	"output":         func() Message { return &OutputEvent{} },
	"breakpoint":     func() Message { return &BreakpointEvent{} },
	"module":         func() Message { return &ModuleEvent{} },
	"loadedSource":   func() Message { return &LoadedSourceEvent{} },
	"process":        func() Message { return &ProcessEvent{} },
	"capabilities":   func() Message { return &CapabilitiesEvent{} },
	"progressStart":  func() Message { return &ProgressStartEvent{} },
	"progressUpdate": func() Message { return &ProgressUpdateEvent{} },
	"progressEnd":    func() Message { return &ProgressEndEvent{} },
	"invalidated":    func() Message { return &InvalidatedEvent{} },
	"memory":         func() Message { return &MemoryEvent{} },
}