dap_types/
types.rs

1// This file is autogenerated. Do not edit by hand.
2// To regenerate from schema, run `cargo run -p generator`.
3
4use serde::{Deserialize, Serialize};
5
6/// Arguments for `cancel` request.
7#[derive(Debug, Clone, Deserialize, Serialize)]
8pub struct CancelArguments {
9    /// The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.
10    /// Both a `requestId` and a `progressId` can be specified in one request.
11    #[serde(rename = "requestId")]
12    #[serde(default)]
13    pub request_id: Option<u64>,
14    /// The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.
15    /// Both a `requestId` and a `progressId` can be specified in one request.
16    #[serde(rename = "progressId")]
17    #[serde(default)]
18    pub progress_id: Option<String>,
19}
20
21/// The event indicates that the execution of the debuggee has stopped due to some condition.
22/// This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.
23#[derive(Debug, Clone, Deserialize, Serialize)]
24pub struct StoppedEvent {
25    /// The reason for the event.
26    /// For backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).
27    #[serde(rename = "reason")]
28    pub reason: StoppedEventReason,
29    /// The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated.
30    #[serde(rename = "description")]
31    #[serde(default)]
32    pub description: Option<String>,
33    /// The thread which was stopped.
34    #[serde(rename = "threadId")]
35    #[serde(default)]
36    pub thread_id: Option<u64>,
37    /// A value of true hints to the client that this event should not change the focus.
38    #[serde(rename = "preserveFocusHint")]
39    #[serde(default)]
40    pub preserve_focus_hint: Option<bool>,
41    /// Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI.
42    #[serde(rename = "text")]
43    #[serde(default)]
44    pub text: Option<String>,
45    /// If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.
46    /// - The client should use this information to enable that all threads can be expanded to access their stacktraces.
47    /// - If the attribute is missing or false, only the thread with the given `threadId` can be expanded.
48    #[serde(rename = "allThreadsStopped")]
49    #[serde(default)]
50    pub all_threads_stopped: Option<bool>,
51    /// Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:
52    /// - Different types of breakpoints map to the same location.
53    /// - Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.
54    /// - Multiple function breakpoints with different function names map to the same location.
55    #[serde(rename = "hitBreakpointIds")]
56    #[serde(default)]
57    pub hit_breakpoint_ids: Option<Vec<u64>>,
58}
59
60/// The reason for the event.
61/// For backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).
62#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
63#[non_exhaustive]
64pub enum StoppedEventReason {
65    #[serde(rename = "step")]
66    Step,
67    #[serde(rename = "breakpoint")]
68    Breakpoint,
69    #[serde(rename = "exception")]
70    Exception,
71    #[serde(rename = "pause")]
72    Pause,
73    #[serde(rename = "entry")]
74    Entry,
75    #[serde(rename = "goto")]
76    Goto,
77    #[serde(rename = "function breakpoint")]
78    FunctionBreakpoint,
79    #[serde(rename = "data breakpoint")]
80    DataBreakpoint,
81    #[serde(rename = "instruction breakpoint")]
82    InstructionBreakpoint,
83    #[serde(other)]
84    Unknown,
85}
86
87/// The event indicates that the execution of the debuggee has continued.
88/// 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`.
89/// It is only necessary to send a `continued` event if there was no previous request that implied this.
90#[derive(Debug, Clone, Deserialize, Serialize)]
91pub struct ContinuedEvent {
92    /// The thread which was continued.
93    #[serde(rename = "threadId")]
94    pub thread_id: u64,
95    /// If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued.
96    #[serde(rename = "allThreadsContinued")]
97    #[serde(default)]
98    pub all_threads_continued: Option<bool>,
99}
100
101/// The event indicates that the debuggee has exited and returns its exit code.
102#[derive(Debug, Clone, Deserialize, Serialize)]
103pub struct ExitedEvent {
104    /// The exit code returned from the debuggee.
105    #[serde(rename = "exitCode")]
106    pub exit_code: u64,
107}
108
109/// The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.
110#[derive(Debug, Clone, Deserialize, Serialize)]
111pub struct TerminatedEvent {
112    /// A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.
113    /// The value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.
114    #[serde(rename = "restart")]
115    #[serde(default)]
116    pub restart: Option<serde_json::Value>,
117}
118
119/// The event indicates that a thread has started or exited.
120#[derive(Debug, Clone, Deserialize, Serialize)]
121pub struct ThreadEvent {
122    /// The reason for the event.
123    #[serde(rename = "reason")]
124    pub reason: ThreadEventReason,
125    /// The identifier of the thread.
126    #[serde(rename = "threadId")]
127    pub thread_id: u64,
128}
129
130/// The reason for the event.
131#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
132#[non_exhaustive]
133pub enum ThreadEventReason {
134    #[serde(rename = "started")]
135    Started,
136    #[serde(rename = "exited")]
137    Exited,
138    #[serde(other)]
139    Unknown,
140}
141
142/// The event indicates that the target has produced some output.
143#[derive(Debug, Clone, Deserialize, Serialize)]
144pub struct OutputEvent {
145    /// The output category. If not specified or if the category is not understood by the client, `console` is assumed.
146    #[serde(rename = "category")]
147    #[serde(default)]
148    pub category: Option<OutputEventCategory>,
149    /// The output to report.
150    #[serde(rename = "output")]
151    pub output: String,
152    /// Support for keeping an output log organized by grouping related messages.
153    #[serde(rename = "group")]
154    #[serde(default)]
155    pub group: Option<OutputEventGroup>,
156    /// If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
157    #[serde(rename = "variablesReference")]
158    #[serde(default)]
159    pub variables_reference: Option<u64>,
160    /// The source location where the output was produced.
161    #[serde(rename = "source")]
162    #[serde(default)]
163    pub source: Option<Source>,
164    /// The source location's line where the output was produced.
165    #[serde(rename = "line")]
166    #[serde(default)]
167    pub line: Option<u64>,
168    /// The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
169    #[serde(rename = "column")]
170    #[serde(default)]
171    pub column: Option<u64>,
172    /// Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format.
173    #[serde(rename = "data")]
174    #[serde(default)]
175    pub data: Option<serde_json::Value>,
176}
177
178/// The output category. If not specified or if the category is not understood by the client, `console` is assumed.
179#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
180#[non_exhaustive]
181pub enum OutputEventCategory {
182    /// Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).
183    #[serde(rename = "console")]
184    Console,
185    /// A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.
186    #[serde(rename = "important")]
187    Important,
188    /// Show the output as normal program output from the debuggee.
189    #[serde(rename = "stdout")]
190    Stdout,
191    /// Show the output as error program output from the debuggee.
192    #[serde(rename = "stderr")]
193    Stderr,
194    /// Send the output to telemetry instead of showing it to the user.
195    #[serde(rename = "telemetry")]
196    Telemetry,
197    #[serde(other)]
198    Unknown,
199}
200
201/// Support for keeping an output log organized by grouping related messages.
202#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
203pub enum OutputEventGroup {
204    /// Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.
205    /// The `output` attribute becomes the name of the group and is not indented.
206    #[serde(rename = "start")]
207    Start,
208    /// Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).
209    /// The `output` attribute becomes the name of the group and is not indented.
210    #[serde(rename = "startCollapsed")]
211    StartCollapsed,
212    /// End the current group and decrease the indentation of subsequent output events.
213    /// A non-empty `output` attribute is shown as the unindented end of the group.
214    #[serde(rename = "end")]
215    End,
216}
217
218/// The event indicates that some information about a breakpoint has changed.
219#[derive(Debug, Clone, Deserialize, Serialize)]
220pub struct BreakpointEvent {
221    /// The reason for the event.
222    #[serde(rename = "reason")]
223    pub reason: BreakpointEventReason,
224    /// The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values.
225    #[serde(rename = "breakpoint")]
226    pub breakpoint: Breakpoint,
227}
228
229/// The reason for the event.
230#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
231#[non_exhaustive]
232pub enum BreakpointEventReason {
233    #[serde(rename = "changed")]
234    Changed,
235    #[serde(rename = "new")]
236    New,
237    #[serde(rename = "removed")]
238    Removed,
239    #[serde(other)]
240    Unknown,
241}
242
243/// The event indicates that some information about a module has changed.
244#[derive(Debug, Clone, Deserialize, Serialize)]
245pub struct ModuleEvent {
246    /// The reason for the event.
247    #[serde(rename = "reason")]
248    pub reason: ModuleEventReason,
249    /// The new, changed, or removed module. In case of `removed` only the module id is used.
250    #[serde(rename = "module")]
251    pub module: Module,
252}
253
254/// The reason for the event.
255#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
256pub enum ModuleEventReason {
257    #[serde(rename = "new")]
258    New,
259    #[serde(rename = "changed")]
260    Changed,
261    #[serde(rename = "removed")]
262    Removed,
263}
264
265/// The event indicates that some source has been added, changed, or removed from the set of all loaded sources.
266#[derive(Debug, Clone, Deserialize, Serialize)]
267pub struct LoadedSourceEvent {
268    /// The reason for the event.
269    #[serde(rename = "reason")]
270    pub reason: LoadedSourceEventReason,
271    /// The new, changed, or removed source.
272    #[serde(rename = "source")]
273    pub source: Source,
274}
275
276/// The reason for the event.
277#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
278pub enum LoadedSourceEventReason {
279    #[serde(rename = "new")]
280    New,
281    #[serde(rename = "changed")]
282    Changed,
283    #[serde(rename = "removed")]
284    Removed,
285}
286
287/// 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.
288#[derive(Debug, Clone, Deserialize, Serialize)]
289pub struct ProcessEvent {
290    /// The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.
291    #[serde(rename = "name")]
292    pub name: String,
293    /// The system process id of the debugged process. This property is missing for non-system processes.
294    #[serde(rename = "systemProcessId")]
295    #[serde(default)]
296    pub system_process_id: Option<u64>,
297    /// If true, the process is running on the same computer as the debug adapter.
298    #[serde(rename = "isLocalProcess")]
299    #[serde(default)]
300    pub is_local_process: Option<bool>,
301    /// Describes how the debug engine started debugging this process.
302    #[serde(rename = "startMethod")]
303    #[serde(default)]
304    pub start_method: Option<ProcessEventStartMethod>,
305    /// The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.
306    #[serde(rename = "pointerSize")]
307    #[serde(default)]
308    pub pointer_size: Option<u64>,
309}
310
311/// Describes how the debug engine started debugging this process.
312#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
313pub enum ProcessEventStartMethod {
314    /// Process was launched under the debugger.
315    #[serde(rename = "launch")]
316    Launch,
317    /// Debugger attached to an existing process.
318    #[serde(rename = "attach")]
319    Attach,
320    /// A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.
321    #[serde(rename = "attachForSuspendedLaunch")]
322    AttachForSuspendedLaunch,
323}
324
325/// The event indicates that one or more capabilities have changed.
326/// 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).
327/// 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.
328/// Only changed capabilities need to be included, all other capabilities keep their values.
329#[derive(Debug, Clone, Deserialize, Serialize)]
330pub struct CapabilitiesEvent {
331    /// The set of updated capabilities.
332    #[serde(rename = "capabilities")]
333    pub capabilities: Capabilities,
334}
335
336/// 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.
337/// The client is free to delay the showing of the UI in order to reduce flicker.
338/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
339#[derive(Debug, Clone, Deserialize, Serialize)]
340pub struct ProgressStartEvent {
341    /// An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.
342    /// IDs must be unique within a debug session.
343    #[serde(rename = "progressId")]
344    pub progress_id: String,
345    /// Short title of the progress reporting. Shown in the UI to describe the long running operation.
346    #[serde(rename = "title")]
347    pub title: String,
348    /// The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.
349    /// If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.
350    #[serde(rename = "requestId")]
351    #[serde(default)]
352    pub request_id: Option<u64>,
353    /// If true, the request that reports progress may be cancelled with a `cancel` request.
354    /// So this property basically controls whether the client should use UX that supports cancellation.
355    /// Clients that don't support cancellation are allowed to ignore the setting.
356    #[serde(rename = "cancellable")]
357    #[serde(default)]
358    pub cancellable: Option<bool>,
359    /// More detailed progress message.
360    #[serde(rename = "message")]
361    #[serde(default)]
362    pub message: Option<String>,
363    /// Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.
364    #[serde(rename = "percentage")]
365    #[serde(default)]
366    pub percentage: Option<u64>,
367}
368
369/// The event signals that the progress reporting needs to be updated with a new message and/or percentage.
370/// The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.
371/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
372#[derive(Debug, Clone, Deserialize, Serialize)]
373pub struct ProgressUpdateEvent {
374    /// The ID that was introduced in the initial `progressStart` event.
375    #[serde(rename = "progressId")]
376    pub progress_id: String,
377    /// More detailed progress message. If omitted, the previous message (if any) is used.
378    #[serde(rename = "message")]
379    #[serde(default)]
380    pub message: Option<String>,
381    /// Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.
382    #[serde(rename = "percentage")]
383    #[serde(default)]
384    pub percentage: Option<u64>,
385}
386
387/// The event signals the end of the progress reporting with a final message.
388/// This event should only be sent if the corresponding capability `supportsProgressReporting` is true.
389#[derive(Debug, Clone, Deserialize, Serialize)]
390pub struct ProgressEndEvent {
391    /// The ID that was introduced in the initial `ProgressStartEvent`.
392    #[serde(rename = "progressId")]
393    pub progress_id: String,
394    /// More detailed progress message. If omitted, the previous message (if any) is used.
395    #[serde(rename = "message")]
396    #[serde(default)]
397    pub message: Option<String>,
398}
399
400/// 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.
401/// 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.
402/// This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.
403#[derive(Debug, Clone, Deserialize, Serialize)]
404pub struct InvalidatedEvent {
405    /// Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.
406    #[serde(rename = "areas")]
407    #[serde(default)]
408    pub areas: Option<Vec<InvalidatedAreas>>,
409    /// If specified, the client only needs to refetch data related to this thread.
410    #[serde(rename = "threadId")]
411    #[serde(default)]
412    pub thread_id: Option<u64>,
413    /// If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored).
414    #[serde(rename = "stackFrameId")]
415    #[serde(default)]
416    pub stack_frame_id: Option<u64>,
417}
418
419/// This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.
420/// 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.
421/// 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.
422#[derive(Debug, Clone, Deserialize, Serialize)]
423pub struct MemoryEvent {
424    /// Memory reference of a memory range that has been updated.
425    #[serde(rename = "memoryReference")]
426    pub memory_reference: String,
427    /// Starting offset in bytes where memory has been updated. Can be negative.
428    #[serde(rename = "offset")]
429    pub offset: u64,
430    /// Number of bytes updated.
431    #[serde(rename = "count")]
432    pub count: u64,
433}
434
435/// Arguments for `runInTerminal` request.
436#[derive(Debug, Clone, Deserialize, Serialize)]
437pub struct RunInTerminalRequestArguments {
438    /// What kind of terminal to launch. Defaults to `integrated` if not specified.
439    #[serde(rename = "kind")]
440    #[serde(default)]
441    pub kind: Option<RunInTerminalRequestArgumentsKind>,
442    /// Title of the terminal.
443    #[serde(rename = "title")]
444    #[serde(default)]
445    pub title: Option<String>,
446    /// Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command.
447    #[serde(rename = "cwd")]
448    pub cwd: String,
449    /// List of arguments. The first argument is the command to run.
450    #[serde(rename = "args")]
451    pub args: Vec<String>,
452    /// Environment key-value pairs that are added to or removed from the default environment.
453    #[serde(rename = "env")]
454    #[serde(default)]
455    pub env: Option<serde_json::Value>,
456    /// This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells.
457    #[serde(rename = "argsCanBeInterpretedByShell")]
458    #[serde(default)]
459    pub args_can_be_interpreted_by_shell: Option<bool>,
460}
461
462/// What kind of terminal to launch. Defaults to `integrated` if not specified.
463#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
464pub enum RunInTerminalRequestArgumentsKind {
465    #[serde(rename = "integrated")]
466    Integrated,
467    #[serde(rename = "external")]
468    External,
469}
470
471/// Response to `runInTerminal` request.
472#[derive(Debug, Clone, Deserialize, Serialize)]
473pub struct RunInTerminalResponse {
474    /// The process ID. The value should be less than or equal to 2147483647 (2^31-1).
475    #[serde(rename = "processId")]
476    #[serde(default)]
477    pub process_id: Option<u64>,
478    /// The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1).
479    #[serde(rename = "shellProcessId")]
480    #[serde(default)]
481    pub shell_process_id: Option<u64>,
482}
483
484/// Arguments for `startDebugging` request.
485#[derive(Debug, Clone, Deserialize, Serialize)]
486pub struct StartDebuggingRequestArguments {
487    /// Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables').
488    #[serde(rename = "configuration")]
489    pub configuration: serde_json::Value,
490    /// Indicates whether the new debug session should be started with a `launch` or `attach` request.
491    #[serde(rename = "request")]
492    pub request: StartDebuggingRequestArgumentsRequest,
493}
494
495/// Indicates whether the new debug session should be started with a `launch` or `attach` request.
496#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
497pub enum StartDebuggingRequestArgumentsRequest {
498    #[serde(rename = "launch")]
499    Launch,
500    #[serde(rename = "attach")]
501    Attach,
502}
503
504/// Arguments for `initialize` request.
505#[derive(Debug, Clone, Deserialize, Serialize)]
506pub struct InitializeRequestArguments {
507    /// The ID of the client using this adapter.
508    #[serde(rename = "clientID")]
509    #[serde(default)]
510    pub client_id: Option<String>,
511    /// The human-readable name of the client using this adapter.
512    #[serde(rename = "clientName")]
513    #[serde(default)]
514    pub client_name: Option<String>,
515    /// The ID of the debug adapter.
516    #[serde(rename = "adapterID")]
517    pub adapter_id: String,
518    /// The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH.
519    #[serde(rename = "locale")]
520    #[serde(default)]
521    pub locale: Option<String>,
522    /// If true all line numbers are 1-based (default).
523    #[serde(rename = "linesStartAt1")]
524    #[serde(default)]
525    pub lines_start_at1: Option<bool>,
526    /// If true all column numbers are 1-based (default).
527    #[serde(rename = "columnsStartAt1")]
528    #[serde(default)]
529    pub columns_start_at1: Option<bool>,
530    /// Determines in what format paths are specified. The default is `path`, which is the native format.
531    #[serde(rename = "pathFormat")]
532    #[serde(default)]
533    pub path_format: Option<InitializeRequestArgumentsPathFormat>,
534    /// Client supports the `type` attribute for variables.
535    #[serde(rename = "supportsVariableType")]
536    #[serde(default)]
537    pub supports_variable_type: Option<bool>,
538    /// Client supports the paging of variables.
539    #[serde(rename = "supportsVariablePaging")]
540    #[serde(default)]
541    pub supports_variable_paging: Option<bool>,
542    /// Client supports the `runInTerminal` request.
543    #[serde(rename = "supportsRunInTerminalRequest")]
544    #[serde(default)]
545    pub supports_run_in_terminal_request: Option<bool>,
546    /// Client supports memory references.
547    #[serde(rename = "supportsMemoryReferences")]
548    #[serde(default)]
549    pub supports_memory_references: Option<bool>,
550    /// Client supports progress reporting.
551    #[serde(rename = "supportsProgressReporting")]
552    #[serde(default)]
553    pub supports_progress_reporting: Option<bool>,
554    /// Client supports the `invalidated` event.
555    #[serde(rename = "supportsInvalidatedEvent")]
556    #[serde(default)]
557    pub supports_invalidated_event: Option<bool>,
558    /// Client supports the `memory` event.
559    #[serde(rename = "supportsMemoryEvent")]
560    #[serde(default)]
561    pub supports_memory_event: Option<bool>,
562    /// Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request.
563    #[serde(rename = "supportsArgsCanBeInterpretedByShell")]
564    #[serde(default)]
565    pub supports_args_can_be_interpreted_by_shell: Option<bool>,
566    /// Client supports the `startDebugging` request.
567    #[serde(rename = "supportsStartDebuggingRequest")]
568    #[serde(default)]
569    pub supports_start_debugging_request: Option<bool>,
570}
571
572/// Determines in what format paths are specified. The default is `path`, which is the native format.
573#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
574#[non_exhaustive]
575pub enum InitializeRequestArgumentsPathFormat {
576    #[serde(rename = "path")]
577    Path,
578    #[serde(rename = "uri")]
579    Uri,
580    #[serde(other)]
581    Unknown,
582}
583
584/// Arguments for `configurationDone` request.
585#[derive(Debug, Clone, Deserialize, Serialize)]
586pub struct ConfigurationDoneArguments;
587
588/// Arguments for `disconnect` request.
589#[derive(Debug, Clone, Deserialize, Serialize)]
590pub struct DisconnectArguments {
591    /// A value of true indicates that this `disconnect` request is part of a restart sequence.
592    #[serde(rename = "restart")]
593    #[serde(default)]
594    pub restart: Option<bool>,
595    /// Indicates whether the debuggee should be terminated when the debugger is disconnected.
596    /// If unspecified, the debug adapter is free to do whatever it thinks is best.
597    /// The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true.
598    #[serde(rename = "terminateDebuggee")]
599    #[serde(default)]
600    pub terminate_debuggee: Option<bool>,
601    /// Indicates whether the debuggee should stay suspended when the debugger is disconnected.
602    /// If unspecified, the debuggee should resume execution.
603    /// The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true.
604    #[serde(rename = "suspendDebuggee")]
605    #[serde(default)]
606    pub suspend_debuggee: Option<bool>,
607}
608
609/// Arguments for `terminate` request.
610#[derive(Debug, Clone, Deserialize, Serialize)]
611pub struct TerminateArguments {
612    /// A value of true indicates that this `terminate` request is part of a restart sequence.
613    #[serde(rename = "restart")]
614    #[serde(default)]
615    pub restart: Option<bool>,
616}
617
618/// Arguments for `breakpointLocations` request.
619#[derive(Debug, Clone, Deserialize, Serialize)]
620pub struct BreakpointLocationsArguments {
621    /// The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.
622    #[serde(rename = "source")]
623    pub source: Source,
624    /// Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
625    #[serde(rename = "line")]
626    pub line: u64,
627    /// Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed.
628    #[serde(rename = "column")]
629    #[serde(default)]
630    pub column: Option<u64>,
631    /// End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.
632    #[serde(rename = "endLine")]
633    #[serde(default)]
634    pub end_line: Option<u64>,
635    /// End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed.
636    #[serde(rename = "endColumn")]
637    #[serde(default)]
638    pub end_column: Option<u64>,
639}
640
641/// Response to `breakpointLocations` request.
642/// Contains possible locations for source breakpoints.
643#[derive(Debug, Clone, Deserialize, Serialize)]
644pub struct BreakpointLocationsResponse {
645    /// Sorted set of possible breakpoint locations.
646    #[serde(rename = "breakpoints")]
647    pub breakpoints: Vec<BreakpointLocation>,
648}
649
650/// Arguments for `setBreakpoints` request.
651#[derive(Debug, Clone, Deserialize, Serialize)]
652pub struct SetBreakpointsArguments {
653    /// The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified.
654    #[serde(rename = "source")]
655    pub source: Source,
656    /// The code locations of the breakpoints.
657    #[serde(rename = "breakpoints")]
658    #[serde(default)]
659    pub breakpoints: Option<Vec<SourceBreakpoint>>,
660    /// Deprecated: The code locations of the breakpoints.
661    #[serde(rename = "lines")]
662    #[serde(default)]
663    pub lines: Option<Vec<u64>>,
664    /// A value of true indicates that the underlying source has been modified which results in new breakpoint locations.
665    #[serde(rename = "sourceModified")]
666    #[serde(default)]
667    pub source_modified: Option<bool>,
668}
669
670/// Response to `setBreakpoints` request.
671/// Returned is information about each breakpoint created by this request.
672/// This includes the actual code location and whether the breakpoint could be verified.
673/// The breakpoints returned are in the same order as the elements of the `breakpoints`
674/// (or the deprecated `lines`) array in the arguments.
675#[derive(Debug, Clone, Deserialize, Serialize)]
676pub struct SetBreakpointsResponse {
677    /// Information about the breakpoints.
678    /// The array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.
679    #[serde(rename = "breakpoints")]
680    pub breakpoints: Vec<Breakpoint>,
681}
682
683/// Arguments for `setFunctionBreakpoints` request.
684#[derive(Debug, Clone, Deserialize, Serialize)]
685pub struct SetFunctionBreakpointsArguments {
686    /// The function names of the breakpoints.
687    #[serde(rename = "breakpoints")]
688    pub breakpoints: Vec<FunctionBreakpoint>,
689}
690
691/// Response to `setFunctionBreakpoints` request.
692/// Returned is information about each breakpoint created by this request.
693#[derive(Debug, Clone, Deserialize, Serialize)]
694pub struct SetFunctionBreakpointsResponse {
695    /// Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.
696    #[serde(rename = "breakpoints")]
697    pub breakpoints: Vec<Breakpoint>,
698}
699
700/// Arguments for `setExceptionBreakpoints` request.
701#[derive(Debug, Clone, Deserialize, Serialize)]
702pub struct SetExceptionBreakpointsArguments {
703    /// Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive.
704    #[serde(rename = "filters")]
705    pub filters: Vec<String>,
706    /// Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive.
707    #[serde(rename = "filterOptions")]
708    #[serde(default)]
709    pub filter_options: Option<Vec<ExceptionFilterOptions>>,
710    /// Configuration options for selected exceptions.
711    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true.
712    #[serde(rename = "exceptionOptions")]
713    #[serde(default)]
714    pub exception_options: Option<Vec<ExceptionOptions>>,
715}
716
717/// Response to `setExceptionBreakpoints` request.
718/// 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.
719/// The `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is 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.
720/// 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.
721#[derive(Debug, Clone, Deserialize, Serialize)]
722pub struct SetExceptionBreakpointsResponse {
723    /// Information about the exception breakpoints or filters.
724    /// The breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.
725    #[serde(rename = "breakpoints")]
726    #[serde(default)]
727    pub breakpoints: Option<Vec<Breakpoint>>,
728}
729
730/// Arguments for `dataBreakpointInfo` request.
731#[derive(Debug, Clone, Deserialize, Serialize)]
732pub struct DataBreakpointInfoArguments {
733    /// Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.
734    #[serde(rename = "variablesReference")]
735    #[serde(default)]
736    pub variables_reference: Option<u64>,
737    /// The name of the variable's child to obtain data breakpoint information for.
738    /// If `variablesReference` isn't specified, this can be an expression.
739    #[serde(rename = "name")]
740    pub name: String,
741    /// When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect.
742    #[serde(rename = "frameId")]
743    #[serde(default)]
744    pub frame_id: Option<u64>,
745    /// The mode of the desired breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`.
746    #[serde(rename = "mode")]
747    #[serde(default)]
748    pub mode: Option<String>,
749}
750
751/// Response to `dataBreakpointInfo` request.
752#[derive(Debug, Clone, Deserialize, Serialize)]
753pub struct DataBreakpointInfoResponse {
754    /// An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`.
755    #[serde(rename = "dataId")]
756    pub data_id: Option<String>,
757    /// UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.
758    #[serde(rename = "description")]
759    pub description: String,
760    /// Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information.
761    #[serde(rename = "accessTypes")]
762    #[serde(default)]
763    pub access_types: Option<Vec<DataBreakpointAccessType>>,
764    /// Attribute indicates that a potential data breakpoint could be persisted across sessions.
765    #[serde(rename = "canPersist")]
766    #[serde(default)]
767    pub can_persist: Option<bool>,
768}
769
770/// Arguments for `setDataBreakpoints` request.
771#[derive(Debug, Clone, Deserialize, Serialize)]
772pub struct SetDataBreakpointsArguments {
773    /// The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints.
774    #[serde(rename = "breakpoints")]
775    pub breakpoints: Vec<DataBreakpoint>,
776}
777
778/// Response to `setDataBreakpoints` request.
779/// Returned is information about each breakpoint created by this request.
780#[derive(Debug, Clone, Deserialize, Serialize)]
781pub struct SetDataBreakpointsResponse {
782    /// Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array.
783    #[serde(rename = "breakpoints")]
784    pub breakpoints: Vec<Breakpoint>,
785}
786
787/// Arguments for `setInstructionBreakpoints` request
788#[derive(Debug, Clone, Deserialize, Serialize)]
789pub struct SetInstructionBreakpointsArguments {
790    /// The instruction references of the breakpoints
791    #[serde(rename = "breakpoints")]
792    pub breakpoints: Vec<InstructionBreakpoint>,
793}
794
795/// Response to `setInstructionBreakpoints` request
796#[derive(Debug, Clone, Deserialize, Serialize)]
797pub struct SetInstructionBreakpointsResponse {
798    /// Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array.
799    #[serde(rename = "breakpoints")]
800    pub breakpoints: Vec<Breakpoint>,
801}
802
803/// Arguments for `continue` request.
804#[derive(Debug, Clone, Deserialize, Serialize)]
805pub struct ContinueArguments {
806    /// Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed.
807    #[serde(rename = "threadId")]
808    pub thread_id: u64,
809    /// If this flag is true, execution is resumed only for the thread with given `threadId`.
810    #[serde(rename = "singleThread")]
811    #[serde(default)]
812    pub single_thread: Option<bool>,
813}
814
815/// Response to `continue` request.
816#[derive(Debug, Clone, Deserialize, Serialize)]
817pub struct ContinueResponse {
818    /// The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed.
819    #[serde(rename = "allThreadsContinued")]
820    #[serde(default)]
821    pub all_threads_continued: Option<bool>,
822}
823
824/// Arguments for `next` request.
825#[derive(Debug, Clone, Deserialize, Serialize)]
826pub struct NextArguments {
827    /// Specifies the thread for which to resume execution for one step (of the given granularity).
828    #[serde(rename = "threadId")]
829    pub thread_id: u64,
830    /// If this flag is true, all other suspended threads are not resumed.
831    #[serde(rename = "singleThread")]
832    #[serde(default)]
833    pub single_thread: Option<bool>,
834    /// Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.
835    #[serde(rename = "granularity")]
836    #[serde(default)]
837    pub granularity: Option<SteppingGranularity>,
838}
839
840/// Arguments for `stepIn` request.
841#[derive(Debug, Clone, Deserialize, Serialize)]
842pub struct StepInArguments {
843    /// Specifies the thread for which to resume execution for one step-into (of the given granularity).
844    #[serde(rename = "threadId")]
845    pub thread_id: u64,
846    /// If this flag is true, all other suspended threads are not resumed.
847    #[serde(rename = "singleThread")]
848    #[serde(default)]
849    pub single_thread: Option<bool>,
850    /// Id of the target to step into.
851    #[serde(rename = "targetId")]
852    #[serde(default)]
853    pub target_id: Option<u64>,
854    /// Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.
855    #[serde(rename = "granularity")]
856    #[serde(default)]
857    pub granularity: Option<SteppingGranularity>,
858}
859
860/// Arguments for `stepOut` request.
861#[derive(Debug, Clone, Deserialize, Serialize)]
862pub struct StepOutArguments {
863    /// Specifies the thread for which to resume execution for one step-out (of the given granularity).
864    #[serde(rename = "threadId")]
865    pub thread_id: u64,
866    /// If this flag is true, all other suspended threads are not resumed.
867    #[serde(rename = "singleThread")]
868    #[serde(default)]
869    pub single_thread: Option<bool>,
870    /// Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed.
871    #[serde(rename = "granularity")]
872    #[serde(default)]
873    pub granularity: Option<SteppingGranularity>,
874}
875
876/// Arguments for `stepBack` request.
877#[derive(Debug, Clone, Deserialize, Serialize)]
878pub struct StepBackArguments {
879    /// Specifies the thread for which to resume execution for one step backwards (of the given granularity).
880    #[serde(rename = "threadId")]
881    pub thread_id: u64,
882    /// If this flag is true, all other suspended threads are not resumed.
883    #[serde(rename = "singleThread")]
884    #[serde(default)]
885    pub single_thread: Option<bool>,
886    /// Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed.
887    #[serde(rename = "granularity")]
888    #[serde(default)]
889    pub granularity: Option<SteppingGranularity>,
890}
891
892/// Arguments for `reverseContinue` request.
893#[derive(Debug, Clone, Deserialize, Serialize)]
894pub struct ReverseContinueArguments {
895    /// Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed.
896    #[serde(rename = "threadId")]
897    pub thread_id: u64,
898    /// If this flag is true, backward execution is resumed only for the thread with given `threadId`.
899    #[serde(rename = "singleThread")]
900    #[serde(default)]
901    pub single_thread: Option<bool>,
902}
903
904/// Arguments for `restartFrame` request.
905#[derive(Debug, Clone, Deserialize, Serialize)]
906pub struct RestartFrameArguments {
907    /// Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.
908    #[serde(rename = "frameId")]
909    pub frame_id: u64,
910}
911
912/// Arguments for `goto` request.
913#[derive(Debug, Clone, Deserialize, Serialize)]
914pub struct GotoArguments {
915    /// Set the goto target for this thread.
916    #[serde(rename = "threadId")]
917    pub thread_id: u64,
918    /// The location where the debuggee will continue to run.
919    #[serde(rename = "targetId")]
920    pub target_id: u64,
921}
922
923/// Arguments for `pause` request.
924#[derive(Debug, Clone, Deserialize, Serialize)]
925pub struct PauseArguments {
926    /// Pause execution for this thread.
927    #[serde(rename = "threadId")]
928    pub thread_id: u64,
929}
930
931/// Arguments for `stackTrace` request.
932#[derive(Debug, Clone, Deserialize, Serialize)]
933pub struct StackTraceArguments {
934    /// Retrieve the stacktrace for this thread.
935    #[serde(rename = "threadId")]
936    pub thread_id: u64,
937    /// The index of the first frame to return; if omitted frames start at 0.
938    #[serde(rename = "startFrame")]
939    #[serde(default)]
940    pub start_frame: Option<u64>,
941    /// The maximum number of frames to return. If levels is not specified or 0, all frames are returned.
942    #[serde(rename = "levels")]
943    #[serde(default)]
944    pub levels: Option<u64>,
945    /// Specifies details on how to format the stack frames.
946    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.
947    #[serde(rename = "format")]
948    #[serde(default)]
949    pub format: Option<StackFrameFormat>,
950}
951
952/// Response to `stackTrace` request.
953#[derive(Debug, Clone, Deserialize, Serialize)]
954pub struct StackTraceResponse {
955    /// The frames of the stack frame. If the array has length zero, there are no stack frames available.
956    /// This means that there is no location information available.
957    #[serde(rename = "stackFrames")]
958    pub stack_frames: Vec<StackFrame>,
959    /// The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client.
960    #[serde(rename = "totalFrames")]
961    #[serde(default)]
962    pub total_frames: Option<u64>,
963}
964
965/// Arguments for `scopes` request.
966#[derive(Debug, Clone, Deserialize, Serialize)]
967pub struct ScopesArguments {
968    /// Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.
969    #[serde(rename = "frameId")]
970    pub frame_id: u64,
971}
972
973/// Response to `scopes` request.
974#[derive(Debug, Clone, Deserialize, Serialize)]
975pub struct ScopesResponse {
976    /// The scopes of the stack frame. If the array has length zero, there are no scopes available.
977    #[serde(rename = "scopes")]
978    pub scopes: Vec<Scope>,
979}
980
981/// Arguments for `variables` request.
982#[derive(Debug, Clone, Deserialize, Serialize)]
983pub struct VariablesArguments {
984    /// The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.
985    #[serde(rename = "variablesReference")]
986    pub variables_reference: u64,
987    /// Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.
988    #[serde(rename = "filter")]
989    #[serde(default)]
990    pub filter: Option<VariablesArgumentsFilter>,
991    /// The index of the first variable to return; if omitted children start at 0.
992    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.
993    #[serde(rename = "start")]
994    #[serde(default)]
995    pub start: Option<u64>,
996    /// The number of variables to return. If count is missing or 0, all variables are returned.
997    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.
998    #[serde(rename = "count")]
999    #[serde(default)]
1000    pub count: Option<u64>,
1001    /// Specifies details on how to format the Variable values.
1002    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.
1003    #[serde(rename = "format")]
1004    #[serde(default)]
1005    pub format: Option<ValueFormat>,
1006}
1007
1008/// Filter to limit the child variables to either named or indexed. If omitted, both types are fetched.
1009#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
1010pub enum VariablesArgumentsFilter {
1011    #[serde(rename = "indexed")]
1012    Indexed,
1013    #[serde(rename = "named")]
1014    Named,
1015}
1016
1017/// Response to `variables` request.
1018#[derive(Debug, Clone, Deserialize, Serialize)]
1019pub struct VariablesResponse {
1020    /// All (or a range) of variables for the given variable reference.
1021    #[serde(rename = "variables")]
1022    pub variables: Vec<Variable>,
1023}
1024
1025/// Arguments for `setVariable` request.
1026#[derive(Debug, Clone, Deserialize, Serialize)]
1027pub struct SetVariableArguments {
1028    /// The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details.
1029    #[serde(rename = "variablesReference")]
1030    pub variables_reference: u64,
1031    /// The name of the variable in the container.
1032    #[serde(rename = "name")]
1033    pub name: String,
1034    /// The value of the variable.
1035    #[serde(rename = "value")]
1036    pub value: String,
1037    /// Specifies details on how to format the response value.
1038    #[serde(rename = "format")]
1039    #[serde(default)]
1040    pub format: Option<ValueFormat>,
1041}
1042
1043/// Response to `setVariable` request.
1044#[derive(Debug, Clone, Deserialize, Serialize)]
1045pub struct SetVariableResponse {
1046    /// The new value of the variable.
1047    #[serde(rename = "value")]
1048    pub value: String,
1049    /// The type of the new value. Typically shown in the UI when hovering over the value.
1050    #[serde(rename = "type")]
1051    #[serde(default)]
1052    pub type_: Option<String>,
1053    /// If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
1054    #[serde(rename = "variablesReference")]
1055    #[serde(default)]
1056    pub variables_reference: Option<u64>,
1057    /// The number of named child variables.
1058    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1059    /// The value should be less than or equal to 2147483647 (2^31-1).
1060    #[serde(rename = "namedVariables")]
1061    #[serde(default)]
1062    pub named_variables: Option<u64>,
1063    /// The number of indexed child variables.
1064    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1065    /// The value should be less than or equal to 2147483647 (2^31-1).
1066    #[serde(rename = "indexedVariables")]
1067    #[serde(default)]
1068    pub indexed_variables: Option<u64>,
1069    /// A memory reference to a location appropriate for this result.
1070    /// For pointer type eval results, this is generally a reference to the memory address contained in the pointer.
1071    /// This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.
1072    #[serde(rename = "memoryReference")]
1073    #[serde(default)]
1074    pub memory_reference: Option<String>,
1075}
1076
1077/// Arguments for `source` request.
1078#[derive(Debug, Clone, Deserialize, Serialize)]
1079pub struct SourceArguments {
1080    /// Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified.
1081    #[serde(rename = "source")]
1082    #[serde(default)]
1083    pub source: Option<Source>,
1084    /// The reference to the source. This is the same as `source.sourceReference`.
1085    /// This is provided for backward compatibility since old clients do not understand the `source` attribute.
1086    #[serde(rename = "sourceReference")]
1087    pub source_reference: u64,
1088}
1089
1090/// Response to `source` request.
1091#[derive(Debug, Clone, Deserialize, Serialize)]
1092pub struct SourceResponse {
1093    /// Content of the source reference.
1094    #[serde(rename = "content")]
1095    pub content: String,
1096    /// Content type (MIME type) of the source.
1097    #[serde(rename = "mimeType")]
1098    #[serde(default)]
1099    pub mime_type: Option<String>,
1100}
1101
1102/// Response to `threads` request.
1103#[derive(Debug, Clone, Deserialize, Serialize)]
1104pub struct ThreadsResponse {
1105    /// All threads.
1106    #[serde(rename = "threads")]
1107    pub threads: Vec<Thread>,
1108}
1109
1110/// Arguments for `terminateThreads` request.
1111#[derive(Debug, Clone, Deserialize, Serialize)]
1112pub struct TerminateThreadsArguments {
1113    /// Ids of threads to be terminated.
1114    #[serde(rename = "threadIds")]
1115    #[serde(default)]
1116    pub thread_ids: Option<Vec<u64>>,
1117}
1118
1119/// Arguments for `modules` request.
1120#[derive(Debug, Clone, Deserialize, Serialize)]
1121pub struct ModulesArguments {
1122    /// The index of the first module to return; if omitted modules start at 0.
1123    #[serde(rename = "startModule")]
1124    #[serde(default)]
1125    pub start_module: Option<u64>,
1126    /// The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned.
1127    #[serde(rename = "moduleCount")]
1128    #[serde(default)]
1129    pub module_count: Option<u64>,
1130}
1131
1132/// Response to `modules` request.
1133#[derive(Debug, Clone, Deserialize, Serialize)]
1134pub struct ModulesResponse {
1135    /// All modules or range of modules.
1136    #[serde(rename = "modules")]
1137    pub modules: Vec<Module>,
1138    /// The total number of modules available.
1139    #[serde(rename = "totalModules")]
1140    #[serde(default)]
1141    pub total_modules: Option<u64>,
1142}
1143
1144/// Arguments for `loadedSources` request.
1145#[derive(Debug, Clone, Deserialize, Serialize)]
1146pub struct LoadedSourcesArguments;
1147
1148/// Response to `loadedSources` request.
1149#[derive(Debug, Clone, Deserialize, Serialize)]
1150pub struct LoadedSourcesResponse {
1151    /// Set of loaded sources.
1152    #[serde(rename = "sources")]
1153    pub sources: Vec<Source>,
1154}
1155
1156/// Arguments for `evaluate` request.
1157#[derive(Debug, Clone, Deserialize, Serialize)]
1158pub struct EvaluateArguments {
1159    /// The expression to evaluate.
1160    #[serde(rename = "expression")]
1161    pub expression: String,
1162    /// Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope.
1163    #[serde(rename = "frameId")]
1164    #[serde(default)]
1165    pub frame_id: Option<u64>,
1166    /// The context in which the evaluate request is used.
1167    #[serde(rename = "context")]
1168    #[serde(default)]
1169    pub context: Option<EvaluateArgumentsContext>,
1170    /// Specifies details on how to format the result.
1171    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.
1172    #[serde(rename = "format")]
1173    #[serde(default)]
1174    pub format: Option<ValueFormat>,
1175}
1176
1177/// The context in which the evaluate request is used.
1178#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
1179#[non_exhaustive]
1180pub enum EvaluateArgumentsContext {
1181    /// evaluate is called from a watch view context.
1182    #[serde(rename = "watch")]
1183    Watch,
1184    /// evaluate is called from a REPL context.
1185    #[serde(rename = "repl")]
1186    Repl,
1187    /// evaluate is called to generate the debug hover contents.
1188    /// This value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.
1189    #[serde(rename = "hover")]
1190    Hover,
1191    /// evaluate is called to generate clipboard contents.
1192    /// This value should only be used if the corresponding capability `supportsClipboardContext` is true.
1193    #[serde(rename = "clipboard")]
1194    Clipboard,
1195    /// evaluate is called from a variables view context.
1196    #[serde(rename = "variables")]
1197    Variables,
1198    #[serde(other)]
1199    Unknown,
1200}
1201
1202/// Response to `evaluate` request.
1203#[derive(Debug, Clone, Deserialize, Serialize)]
1204pub struct EvaluateResponse {
1205    /// The result of the evaluate request.
1206    #[serde(rename = "result")]
1207    pub result: String,
1208    /// The type of the evaluate result.
1209    /// This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.
1210    #[serde(rename = "type")]
1211    #[serde(default)]
1212    pub type_: Option<String>,
1213    /// Properties of an evaluate result that can be used to determine how to render the result in the UI.
1214    #[serde(rename = "presentationHint")]
1215    #[serde(default)]
1216    pub presentation_hint: Option<VariablePresentationHint>,
1217    /// If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
1218    #[serde(rename = "variablesReference")]
1219    pub variables_reference: u64,
1220    /// The number of named child variables.
1221    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1222    /// The value should be less than or equal to 2147483647 (2^31-1).
1223    #[serde(rename = "namedVariables")]
1224    #[serde(default)]
1225    pub named_variables: Option<u64>,
1226    /// The number of indexed child variables.
1227    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1228    /// The value should be less than or equal to 2147483647 (2^31-1).
1229    #[serde(rename = "indexedVariables")]
1230    #[serde(default)]
1231    pub indexed_variables: Option<u64>,
1232    /// A memory reference to a location appropriate for this result.
1233    /// For pointer type eval results, this is generally a reference to the memory address contained in the pointer.
1234    /// This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.
1235    #[serde(rename = "memoryReference")]
1236    #[serde(default)]
1237    pub memory_reference: Option<String>,
1238}
1239
1240/// Arguments for `setExpression` request.
1241#[derive(Debug, Clone, Deserialize, Serialize)]
1242pub struct SetExpressionArguments {
1243    /// The l-value expression to assign to.
1244    #[serde(rename = "expression")]
1245    pub expression: String,
1246    /// The value expression to assign to the l-value expression.
1247    #[serde(rename = "value")]
1248    pub value: String,
1249    /// Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope.
1250    #[serde(rename = "frameId")]
1251    #[serde(default)]
1252    pub frame_id: Option<u64>,
1253    /// Specifies how the resulting value should be formatted.
1254    #[serde(rename = "format")]
1255    #[serde(default)]
1256    pub format: Option<ValueFormat>,
1257}
1258
1259/// Response to `setExpression` request.
1260#[derive(Debug, Clone, Deserialize, Serialize)]
1261pub struct SetExpressionResponse {
1262    /// The new value of the expression.
1263    #[serde(rename = "value")]
1264    pub value: String,
1265    /// The type of the value.
1266    /// This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.
1267    #[serde(rename = "type")]
1268    #[serde(default)]
1269    pub type_: Option<String>,
1270    /// Properties of a value that can be used to determine how to render the result in the UI.
1271    #[serde(rename = "presentationHint")]
1272    #[serde(default)]
1273    pub presentation_hint: Option<VariablePresentationHint>,
1274    /// If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
1275    #[serde(rename = "variablesReference")]
1276    #[serde(default)]
1277    pub variables_reference: Option<u64>,
1278    /// The number of named child variables.
1279    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1280    /// The value should be less than or equal to 2147483647 (2^31-1).
1281    #[serde(rename = "namedVariables")]
1282    #[serde(default)]
1283    pub named_variables: Option<u64>,
1284    /// The number of indexed child variables.
1285    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1286    /// The value should be less than or equal to 2147483647 (2^31-1).
1287    #[serde(rename = "indexedVariables")]
1288    #[serde(default)]
1289    pub indexed_variables: Option<u64>,
1290    /// A memory reference to a location appropriate for this result.
1291    /// For pointer type eval results, this is generally a reference to the memory address contained in the pointer.
1292    /// This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.
1293    #[serde(rename = "memoryReference")]
1294    #[serde(default)]
1295    pub memory_reference: Option<String>,
1296}
1297
1298/// Arguments for `stepInTargets` request.
1299#[derive(Debug, Clone, Deserialize, Serialize)]
1300pub struct StepInTargetsArguments {
1301    /// The stack frame for which to retrieve the possible step-in targets.
1302    #[serde(rename = "frameId")]
1303    pub frame_id: u64,
1304}
1305
1306/// Response to `stepInTargets` request.
1307#[derive(Debug, Clone, Deserialize, Serialize)]
1308pub struct StepInTargetsResponse {
1309    /// The possible step-in targets of the specified source location.
1310    #[serde(rename = "targets")]
1311    pub targets: Vec<StepInTarget>,
1312}
1313
1314/// Arguments for `gotoTargets` request.
1315#[derive(Debug, Clone, Deserialize, Serialize)]
1316pub struct GotoTargetsArguments {
1317    /// The source location for which the goto targets are determined.
1318    #[serde(rename = "source")]
1319    pub source: Source,
1320    /// The line location for which the goto targets are determined.
1321    #[serde(rename = "line")]
1322    pub line: u64,
1323    /// The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
1324    #[serde(rename = "column")]
1325    #[serde(default)]
1326    pub column: Option<u64>,
1327}
1328
1329/// Response to `gotoTargets` request.
1330#[derive(Debug, Clone, Deserialize, Serialize)]
1331pub struct GotoTargetsResponse {
1332    /// The possible goto targets of the specified location.
1333    #[serde(rename = "targets")]
1334    pub targets: Vec<GotoTarget>,
1335}
1336
1337/// Arguments for `completions` request.
1338#[derive(Debug, Clone, Deserialize, Serialize)]
1339pub struct CompletionsArguments {
1340    /// Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope.
1341    #[serde(rename = "frameId")]
1342    #[serde(default)]
1343    pub frame_id: Option<u64>,
1344    /// One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion.
1345    #[serde(rename = "text")]
1346    pub text: String,
1347    /// The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
1348    #[serde(rename = "column")]
1349    pub column: u64,
1350    /// A line for which to determine the completion proposals. If missing the first line of the text is assumed.
1351    #[serde(rename = "line")]
1352    #[serde(default)]
1353    pub line: Option<u64>,
1354}
1355
1356/// Response to `completions` request.
1357#[derive(Debug, Clone, Deserialize, Serialize)]
1358pub struct CompletionsResponse {
1359    /// The possible completions for .
1360    #[serde(rename = "targets")]
1361    pub targets: Vec<CompletionItem>,
1362}
1363
1364/// Arguments for `exceptionInfo` request.
1365#[derive(Debug, Clone, Deserialize, Serialize)]
1366pub struct ExceptionInfoArguments {
1367    /// Thread for which exception information should be retrieved.
1368    #[serde(rename = "threadId")]
1369    pub thread_id: u64,
1370}
1371
1372/// Response to `exceptionInfo` request.
1373#[derive(Debug, Clone, Deserialize, Serialize)]
1374pub struct ExceptionInfoResponse {
1375    /// ID of the exception that was thrown.
1376    #[serde(rename = "exceptionId")]
1377    pub exception_id: String,
1378    /// Descriptive text for the exception.
1379    #[serde(rename = "description")]
1380    #[serde(default)]
1381    pub description: Option<String>,
1382    /// Mode that caused the exception notification to be raised.
1383    #[serde(rename = "breakMode")]
1384    pub break_mode: ExceptionBreakMode,
1385    /// Detailed information about the exception.
1386    #[serde(rename = "details")]
1387    #[serde(default)]
1388    pub details: Option<ExceptionDetails>,
1389}
1390
1391/// Arguments for `readMemory` request.
1392#[derive(Debug, Clone, Deserialize, Serialize)]
1393pub struct ReadMemoryArguments {
1394    /// Memory reference to the base location from which data should be read.
1395    #[serde(rename = "memoryReference")]
1396    pub memory_reference: String,
1397    /// Offset (in bytes) to be applied to the reference location before reading data. Can be negative.
1398    #[serde(rename = "offset")]
1399    #[serde(default)]
1400    pub offset: Option<u64>,
1401    /// Number of bytes to read at the specified location and offset.
1402    #[serde(rename = "count")]
1403    pub count: u64,
1404}
1405
1406/// Response to `readMemory` request.
1407#[derive(Debug, Clone, Deserialize, Serialize)]
1408pub struct ReadMemoryResponse {
1409    /// The address of the first byte of data returned.
1410    /// Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.
1411    #[serde(rename = "address")]
1412    pub address: String,
1413    /// The number of unreadable bytes encountered after the last successfully read byte.
1414    /// This can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.
1415    #[serde(rename = "unreadableBytes")]
1416    #[serde(default)]
1417    pub unreadable_bytes: Option<u64>,
1418    /// The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory.
1419    #[serde(rename = "data")]
1420    #[serde(default)]
1421    pub data: Option<String>,
1422}
1423
1424/// Arguments for `writeMemory` request.
1425#[derive(Debug, Clone, Deserialize, Serialize)]
1426pub struct WriteMemoryArguments {
1427    /// Memory reference to the base location to which data should be written.
1428    #[serde(rename = "memoryReference")]
1429    pub memory_reference: String,
1430    /// Offset (in bytes) to be applied to the reference location before writing data. Can be negative.
1431    #[serde(rename = "offset")]
1432    #[serde(default)]
1433    pub offset: Option<u64>,
1434    /// Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.
1435    /// If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.
1436    #[serde(rename = "allowPartial")]
1437    #[serde(default)]
1438    pub allow_partial: Option<bool>,
1439    /// Bytes to write, encoded using base64.
1440    #[serde(rename = "data")]
1441    pub data: String,
1442}
1443
1444/// Response to `writeMemory` request.
1445#[derive(Debug, Clone, Deserialize, Serialize)]
1446pub struct WriteMemoryResponse {
1447    /// Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative.
1448    #[serde(rename = "offset")]
1449    #[serde(default)]
1450    pub offset: Option<u64>,
1451    /// Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written.
1452    #[serde(rename = "bytesWritten")]
1453    #[serde(default)]
1454    pub bytes_written: Option<u64>,
1455}
1456
1457/// Arguments for `disassemble` request.
1458#[derive(Debug, Clone, Deserialize, Serialize)]
1459pub struct DisassembleArguments {
1460    /// Memory reference to the base location containing the instructions to disassemble.
1461    #[serde(rename = "memoryReference")]
1462    pub memory_reference: String,
1463    /// Offset (in bytes) to be applied to the reference location before disassembling. Can be negative.
1464    #[serde(rename = "offset")]
1465    #[serde(default)]
1466    pub offset: Option<u64>,
1467    /// Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative.
1468    #[serde(rename = "instructionOffset")]
1469    #[serde(default)]
1470    pub instruction_offset: Option<u64>,
1471    /// Number of instructions to disassemble starting at the specified location and offset.
1472    /// An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.
1473    #[serde(rename = "instructionCount")]
1474    pub instruction_count: u64,
1475    /// If true, the adapter should attempt to resolve memory addresses and other values to symbolic names.
1476    #[serde(rename = "resolveSymbols")]
1477    #[serde(default)]
1478    pub resolve_symbols: Option<bool>,
1479}
1480
1481/// Response to `disassemble` request.
1482#[derive(Debug, Clone, Deserialize, Serialize)]
1483pub struct DisassembleResponse {
1484    /// The list of disassembled instructions.
1485    #[serde(rename = "instructions")]
1486    pub instructions: Vec<DisassembledInstruction>,
1487}
1488
1489/// Information about the capabilities of a debug adapter.
1490#[derive(Debug, Clone, Deserialize, Serialize)]
1491pub struct Capabilities {
1492    /// The debug adapter supports the `configurationDone` request.
1493    #[serde(rename = "supportsConfigurationDoneRequest")]
1494    #[serde(default)]
1495    pub supports_configuration_done_request: Option<bool>,
1496    /// The debug adapter supports function breakpoints.
1497    #[serde(rename = "supportsFunctionBreakpoints")]
1498    #[serde(default)]
1499    pub supports_function_breakpoints: Option<bool>,
1500    /// The debug adapter supports conditional breakpoints.
1501    #[serde(rename = "supportsConditionalBreakpoints")]
1502    #[serde(default)]
1503    pub supports_conditional_breakpoints: Option<bool>,
1504    /// The debug adapter supports breakpoints that break execution after a specified number of hits.
1505    #[serde(rename = "supportsHitConditionalBreakpoints")]
1506    #[serde(default)]
1507    pub supports_hit_conditional_breakpoints: Option<bool>,
1508    /// The debug adapter supports a (side effect free) `evaluate` request for data hovers.
1509    #[serde(rename = "supportsEvaluateForHovers")]
1510    #[serde(default)]
1511    pub supports_evaluate_for_hovers: Option<bool>,
1512    /// Available exception filter options for the `setExceptionBreakpoints` request.
1513    #[serde(rename = "exceptionBreakpointFilters")]
1514    #[serde(default)]
1515    pub exception_breakpoint_filters: Option<Vec<ExceptionBreakpointsFilter>>,
1516    /// The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests.
1517    #[serde(rename = "supportsStepBack")]
1518    #[serde(default)]
1519    pub supports_step_back: Option<bool>,
1520    /// The debug adapter supports setting a variable to a value.
1521    #[serde(rename = "supportsSetVariable")]
1522    #[serde(default)]
1523    pub supports_set_variable: Option<bool>,
1524    /// The debug adapter supports restarting a frame.
1525    #[serde(rename = "supportsRestartFrame")]
1526    #[serde(default)]
1527    pub supports_restart_frame: Option<bool>,
1528    /// The debug adapter supports the `gotoTargets` request.
1529    #[serde(rename = "supportsGotoTargetsRequest")]
1530    #[serde(default)]
1531    pub supports_goto_targets_request: Option<bool>,
1532    /// The debug adapter supports the `stepInTargets` request.
1533    #[serde(rename = "supportsStepInTargetsRequest")]
1534    #[serde(default)]
1535    pub supports_step_in_targets_request: Option<bool>,
1536    /// The debug adapter supports the `completions` request.
1537    #[serde(rename = "supportsCompletionsRequest")]
1538    #[serde(default)]
1539    pub supports_completions_request: Option<bool>,
1540    /// The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character.
1541    #[serde(rename = "completionTriggerCharacters")]
1542    #[serde(default)]
1543    pub completion_trigger_characters: Option<Vec<String>>,
1544    /// The debug adapter supports the `modules` request.
1545    #[serde(rename = "supportsModulesRequest")]
1546    #[serde(default)]
1547    pub supports_modules_request: Option<bool>,
1548    /// The set of additional module information exposed by the debug adapter.
1549    #[serde(rename = "additionalModuleColumns")]
1550    #[serde(default)]
1551    pub additional_module_columns: Option<Vec<ColumnDescriptor>>,
1552    /// Checksum algorithms supported by the debug adapter.
1553    #[serde(rename = "supportedChecksumAlgorithms")]
1554    #[serde(default)]
1555    pub supported_checksum_algorithms: Option<Vec<ChecksumAlgorithm>>,
1556    /// The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request.
1557    #[serde(rename = "supportsRestartRequest")]
1558    #[serde(default)]
1559    pub supports_restart_request: Option<bool>,
1560    /// The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request.
1561    #[serde(rename = "supportsExceptionOptions")]
1562    #[serde(default)]
1563    pub supports_exception_options: Option<bool>,
1564    /// The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests.
1565    #[serde(rename = "supportsValueFormattingOptions")]
1566    #[serde(default)]
1567    pub supports_value_formatting_options: Option<bool>,
1568    /// The debug adapter supports the `exceptionInfo` request.
1569    #[serde(rename = "supportsExceptionInfoRequest")]
1570    #[serde(default)]
1571    pub supports_exception_info_request: Option<bool>,
1572    /// The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request.
1573    #[serde(rename = "supportTerminateDebuggee")]
1574    #[serde(default)]
1575    pub support_terminate_debuggee: Option<bool>,
1576    /// The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request.
1577    #[serde(rename = "supportSuspendDebuggee")]
1578    #[serde(default)]
1579    pub support_suspend_debuggee: Option<bool>,
1580    /// The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported.
1581    #[serde(rename = "supportsDelayedStackTraceLoading")]
1582    #[serde(default)]
1583    pub supports_delayed_stack_trace_loading: Option<bool>,
1584    /// The debug adapter supports the `loadedSources` request.
1585    #[serde(rename = "supportsLoadedSourcesRequest")]
1586    #[serde(default)]
1587    pub supports_loaded_sources_request: Option<bool>,
1588    /// The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`.
1589    #[serde(rename = "supportsLogPoints")]
1590    #[serde(default)]
1591    pub supports_log_points: Option<bool>,
1592    /// The debug adapter supports the `terminateThreads` request.
1593    #[serde(rename = "supportsTerminateThreadsRequest")]
1594    #[serde(default)]
1595    pub supports_terminate_threads_request: Option<bool>,
1596    /// The debug adapter supports the `setExpression` request.
1597    #[serde(rename = "supportsSetExpression")]
1598    #[serde(default)]
1599    pub supports_set_expression: Option<bool>,
1600    /// The debug adapter supports the `terminate` request.
1601    #[serde(rename = "supportsTerminateRequest")]
1602    #[serde(default)]
1603    pub supports_terminate_request: Option<bool>,
1604    /// The debug adapter supports data breakpoints.
1605    #[serde(rename = "supportsDataBreakpoints")]
1606    #[serde(default)]
1607    pub supports_data_breakpoints: Option<bool>,
1608    /// The debug adapter supports the `readMemory` request.
1609    #[serde(rename = "supportsReadMemoryRequest")]
1610    #[serde(default)]
1611    pub supports_read_memory_request: Option<bool>,
1612    /// The debug adapter supports the `writeMemory` request.
1613    #[serde(rename = "supportsWriteMemoryRequest")]
1614    #[serde(default)]
1615    pub supports_write_memory_request: Option<bool>,
1616    /// The debug adapter supports the `disassemble` request.
1617    #[serde(rename = "supportsDisassembleRequest")]
1618    #[serde(default)]
1619    pub supports_disassemble_request: Option<bool>,
1620    /// The debug adapter supports the `cancel` request.
1621    #[serde(rename = "supportsCancelRequest")]
1622    #[serde(default)]
1623    pub supports_cancel_request: Option<bool>,
1624    /// The debug adapter supports the `breakpointLocations` request.
1625    #[serde(rename = "supportsBreakpointLocationsRequest")]
1626    #[serde(default)]
1627    pub supports_breakpoint_locations_request: Option<bool>,
1628    /// The debug adapter supports the `clipboard` context value in the `evaluate` request.
1629    #[serde(rename = "supportsClipboardContext")]
1630    #[serde(default)]
1631    pub supports_clipboard_context: Option<bool>,
1632    /// The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests.
1633    #[serde(rename = "supportsSteppingGranularity")]
1634    #[serde(default)]
1635    pub supports_stepping_granularity: Option<bool>,
1636    /// The debug adapter supports adding breakpoints based on instruction references.
1637    #[serde(rename = "supportsInstructionBreakpoints")]
1638    #[serde(default)]
1639    pub supports_instruction_breakpoints: Option<bool>,
1640    /// The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request.
1641    #[serde(rename = "supportsExceptionFilterOptions")]
1642    #[serde(default)]
1643    pub supports_exception_filter_options: Option<bool>,
1644    /// The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`).
1645    #[serde(rename = "supportsSingleThreadExecutionRequests")]
1646    #[serde(default)]
1647    pub supports_single_thread_execution_requests: Option<bool>,
1648    /// Modes of breakpoints supported by the debug adapter, such as 'hardware' or 'software'. If present, the client may allow the user to select a mode and include it in its `setBreakpoints` request.
1649    ///
1650    /// Clients may present the first applicable mode in this array as the 'default' mode in gestures that set breakpoints.
1651    #[serde(rename = "breakpointModes")]
1652    #[serde(default)]
1653    pub breakpoint_modes: Option<Vec<BreakpointMode>>,
1654}
1655
1656/// An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.
1657#[derive(Debug, Clone, Deserialize, Serialize)]
1658pub struct ExceptionBreakpointsFilter {
1659    /// The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request.
1660    #[serde(rename = "filter")]
1661    pub filter: String,
1662    /// The name of the filter option. This is shown in the UI.
1663    #[serde(rename = "label")]
1664    pub label: String,
1665    /// A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated.
1666    #[serde(rename = "description")]
1667    #[serde(default)]
1668    pub description: Option<String>,
1669    /// Initial value of the filter option. If not specified a value false is assumed.
1670    #[serde(rename = "default")]
1671    #[serde(default)]
1672    pub default: Option<bool>,
1673    /// Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set.
1674    #[serde(rename = "supportsCondition")]
1675    #[serde(default)]
1676    pub supports_condition: Option<bool>,
1677    /// A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated.
1678    #[serde(rename = "conditionDescription")]
1679    #[serde(default)]
1680    pub condition_description: Option<String>,
1681}
1682
1683/// A structured message object. Used to return errors from requests.
1684#[derive(Debug, Clone, Deserialize, Serialize)]
1685pub struct Message {
1686    /// Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily.
1687    #[serde(rename = "id")]
1688    pub id: u64,
1689    /// A format string for the message. Embedded variables have the form `{name}`.
1690    /// If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.
1691    #[serde(rename = "format")]
1692    pub format: String,
1693    /// An object used as a dictionary for looking up the variables in the format string.
1694    #[serde(rename = "variables")]
1695    #[serde(default)]
1696    pub variables: Option<serde_json::Value>,
1697    /// If true send to telemetry.
1698    #[serde(rename = "sendTelemetry")]
1699    #[serde(default)]
1700    pub send_telemetry: Option<bool>,
1701    /// If true show user.
1702    #[serde(rename = "showUser")]
1703    #[serde(default)]
1704    pub show_user: Option<bool>,
1705    /// A url where additional information about this message can be found.
1706    #[serde(rename = "url")]
1707    #[serde(default)]
1708    pub url: Option<String>,
1709    /// A label that is presented to the user as the UI for opening the url.
1710    #[serde(rename = "urlLabel")]
1711    #[serde(default)]
1712    pub url_label: Option<String>,
1713}
1714
1715/// A Module object represents a row in the modules view.
1716/// 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.
1717/// The `name` attribute is used to minimally render the module in the UI.
1718///
1719/// Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.
1720///
1721/// 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.
1722#[derive(Debug, Clone, Deserialize, Serialize)]
1723pub struct Module {
1724    /// Unique identifier for the module.
1725    #[serde(rename = "id")]
1726    pub id: ModuleId,
1727    /// A name of the module.
1728    #[serde(rename = "name")]
1729    pub name: String,
1730    /// Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module.
1731    #[serde(rename = "path")]
1732    #[serde(default)]
1733    pub path: Option<String>,
1734    /// True if the module is optimized.
1735    #[serde(rename = "isOptimized")]
1736    #[serde(default)]
1737    pub is_optimized: Option<bool>,
1738    /// True if the module is considered 'user code' by a debugger that supports 'Just My Code'.
1739    #[serde(rename = "isUserCode")]
1740    #[serde(default)]
1741    pub is_user_code: Option<bool>,
1742    /// Version of Module.
1743    #[serde(rename = "version")]
1744    #[serde(default)]
1745    pub version: Option<String>,
1746    /// User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)
1747    #[serde(rename = "symbolStatus")]
1748    #[serde(default)]
1749    pub symbol_status: Option<String>,
1750    /// Logical full path to the symbol file. The exact definition is implementation defined.
1751    #[serde(rename = "symbolFilePath")]
1752    #[serde(default)]
1753    pub symbol_file_path: Option<String>,
1754    /// Module created or modified, encoded as a RFC 3339 timestamp.
1755    #[serde(rename = "dateTimeStamp")]
1756    #[serde(default)]
1757    pub date_time_stamp: Option<String>,
1758    /// Address range covered by this module.
1759    #[serde(rename = "addressRange")]
1760    #[serde(default)]
1761    pub address_range: Option<String>,
1762}
1763
1764/// A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,
1765/// and what the column's label should be.
1766/// It is only used if the underlying UI actually supports this level of customization.
1767#[derive(Debug, Clone, Deserialize, Serialize)]
1768pub struct ColumnDescriptor {
1769    /// Name of the attribute rendered in this column.
1770    #[serde(rename = "attributeName")]
1771    pub attribute_name: String,
1772    /// Header UI label of column.
1773    #[serde(rename = "label")]
1774    pub label: String,
1775    /// Format to use for the rendered values in this column. TBD how the format strings looks like.
1776    #[serde(rename = "format")]
1777    #[serde(default)]
1778    pub format: Option<String>,
1779    /// Datatype of values in this column. Defaults to `string` if not specified.
1780    #[serde(rename = "type")]
1781    #[serde(default)]
1782    pub type_: Option<ColumnDescriptorType>,
1783    /// Width of this column in characters (hint only).
1784    #[serde(rename = "width")]
1785    #[serde(default)]
1786    pub width: Option<u64>,
1787}
1788
1789/// Datatype of values in this column. Defaults to `string` if not specified.
1790#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
1791pub enum ColumnDescriptorType {
1792    #[serde(rename = "string")]
1793    String,
1794    #[serde(rename = "number")]
1795    Number,
1796    #[serde(rename = "boolean")]
1797    Boolean,
1798    #[serde(rename = "unixTimestampUTC")]
1799    UnixTimestampUtc,
1800}
1801
1802/// A Thread
1803#[derive(Debug, Clone, Deserialize, Serialize)]
1804pub struct Thread {
1805    /// Unique identifier for the thread.
1806    #[serde(rename = "id")]
1807    pub id: u64,
1808    /// The name of the thread.
1809    #[serde(rename = "name")]
1810    pub name: String,
1811}
1812
1813/// A `Source` is a descriptor for source code.
1814/// It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.
1815#[derive(Debug, Clone, Deserialize, Serialize)]
1816pub struct Source {
1817    /// The short name of the source. Every source returned from the debug adapter has a name.
1818    /// When sending a source to the debug adapter this name is optional.
1819    #[serde(rename = "name")]
1820    #[serde(default)]
1821    pub name: Option<String>,
1822    /// The path of the source to be shown in the UI.
1823    /// It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).
1824    #[serde(rename = "path")]
1825    #[serde(default)]
1826    pub path: Option<String>,
1827    /// If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).
1828    /// Since a `sourceReference` is only valid for a session, it can not be used to persist a source.
1829    /// The value should be less than or equal to 2147483647 (2^31-1).
1830    #[serde(rename = "sourceReference")]
1831    #[serde(default)]
1832    pub source_reference: Option<u64>,
1833    /// A hint for how to present the source in the UI.
1834    /// A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.
1835    #[serde(rename = "presentationHint")]
1836    #[serde(default)]
1837    pub presentation_hint: Option<SourcePresentationHint>,
1838    /// The origin of this source. For example, 'internal module', 'inlined content from source map', etc.
1839    #[serde(rename = "origin")]
1840    #[serde(default)]
1841    pub origin: Option<String>,
1842    /// A list of sources that are related to this source. These may be the source that generated this source.
1843    #[serde(rename = "sources")]
1844    #[serde(default)]
1845    pub sources: Option<Vec<Source>>,
1846    /// Additional data that a debug adapter might want to loop through the client.
1847    /// The client should leave the data intact and persist it across sessions. The client should not interpret the data.
1848    #[serde(rename = "adapterData")]
1849    #[serde(default)]
1850    pub adapter_data: Option<serde_json::Value>,
1851    /// The checksums associated with this file.
1852    #[serde(rename = "checksums")]
1853    #[serde(default)]
1854    pub checksums: Option<Vec<Checksum>>,
1855}
1856
1857/// A hint for how to present the source in the UI.
1858/// A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.
1859#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
1860pub enum SourcePresentationHint {
1861    #[serde(rename = "normal")]
1862    Normal,
1863    #[serde(rename = "emphasize")]
1864    Emphasize,
1865    #[serde(rename = "deemphasize")]
1866    Deemphasize,
1867}
1868
1869/// A Stackframe contains the source location.
1870#[derive(Debug, Clone, Deserialize, Serialize)]
1871pub struct StackFrame {
1872    /// An identifier for the stack frame. It must be unique across all threads.
1873    /// This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.
1874    #[serde(rename = "id")]
1875    pub id: u64,
1876    /// The name of the stack frame, typically a method name.
1877    #[serde(rename = "name")]
1878    pub name: String,
1879    /// The source of the frame.
1880    #[serde(rename = "source")]
1881    #[serde(default)]
1882    pub source: Option<Source>,
1883    /// The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client.
1884    #[serde(rename = "line")]
1885    pub line: u64,
1886    /// Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client.
1887    #[serde(rename = "column")]
1888    pub column: u64,
1889    /// The end line of the range covered by the stack frame.
1890    #[serde(rename = "endLine")]
1891    #[serde(default)]
1892    pub end_line: Option<u64>,
1893    /// End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
1894    #[serde(rename = "endColumn")]
1895    #[serde(default)]
1896    pub end_column: Option<u64>,
1897    /// Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent.
1898    #[serde(rename = "canRestart")]
1899    #[serde(default)]
1900    pub can_restart: Option<bool>,
1901    /// A memory reference for the current instruction pointer in this frame.
1902    #[serde(rename = "instructionPointerReference")]
1903    #[serde(default)]
1904    pub instruction_pointer_reference: Option<String>,
1905    /// The module associated with this frame, if any.
1906    #[serde(rename = "moduleId")]
1907    #[serde(default)]
1908    pub module_id: Option<ModuleId>,
1909    /// A hint for how to present this frame in the UI.
1910    /// A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.
1911    #[serde(rename = "presentationHint")]
1912    #[serde(default)]
1913    pub presentation_hint: Option<StackFramePresentationHint>,
1914}
1915
1916/// A hint for how to present this frame in the UI.
1917/// A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.
1918#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
1919pub enum StackFramePresentationHint {
1920    #[serde(rename = "normal")]
1921    Normal,
1922    #[serde(rename = "label")]
1923    Label,
1924    #[serde(rename = "subtle")]
1925    Subtle,
1926}
1927
1928/// A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.
1929#[derive(Debug, Clone, Deserialize, Serialize)]
1930pub struct Scope {
1931    /// Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.
1932    #[serde(rename = "name")]
1933    pub name: String,
1934    /// A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.
1935    #[serde(rename = "presentationHint")]
1936    #[serde(default)]
1937    pub presentation_hint: Option<ScopePresentationHint>,
1938    /// The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
1939    #[serde(rename = "variablesReference")]
1940    pub variables_reference: u64,
1941    /// The number of named variables in this scope.
1942    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1943    #[serde(rename = "namedVariables")]
1944    #[serde(default)]
1945    pub named_variables: Option<u64>,
1946    /// The number of indexed variables in this scope.
1947    /// The client can use this information to present the variables in a paged UI and fetch them in chunks.
1948    #[serde(rename = "indexedVariables")]
1949    #[serde(default)]
1950    pub indexed_variables: Option<u64>,
1951    /// If true, the number of variables in this scope is large or expensive to retrieve.
1952    #[serde(rename = "expensive")]
1953    pub expensive: bool,
1954    /// The source for this scope.
1955    #[serde(rename = "source")]
1956    #[serde(default)]
1957    pub source: Option<Source>,
1958    /// The start line of the range covered by this scope.
1959    #[serde(rename = "line")]
1960    #[serde(default)]
1961    pub line: Option<u64>,
1962    /// Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
1963    #[serde(rename = "column")]
1964    #[serde(default)]
1965    pub column: Option<u64>,
1966    /// The end line of the range covered by this scope.
1967    #[serde(rename = "endLine")]
1968    #[serde(default)]
1969    pub end_line: Option<u64>,
1970    /// End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
1971    #[serde(rename = "endColumn")]
1972    #[serde(default)]
1973    pub end_column: Option<u64>,
1974}
1975
1976/// A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.
1977#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
1978#[non_exhaustive]
1979pub enum ScopePresentationHint {
1980    /// Scope contains method arguments.
1981    #[serde(rename = "arguments")]
1982    Arguments,
1983    /// Scope contains local variables.
1984    #[serde(rename = "locals")]
1985    Locals,
1986    /// Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request.
1987    #[serde(rename = "registers")]
1988    Registers,
1989    #[serde(other)]
1990    Unknown,
1991}
1992
1993/// A Variable is a name/value pair.
1994/// The `type` attribute is shown if space permits or when hovering over the variable's name.
1995/// 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.
1996/// If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.
1997/// If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.
1998/// The client can use this information to present the children in a paged UI and fetch them in chunks.
1999#[derive(Debug, Clone, Deserialize, Serialize)]
2000pub struct Variable {
2001    /// The variable's name.
2002    #[serde(rename = "name")]
2003    pub name: String,
2004    /// The variable's value.
2005    /// This can be a multi-line text, e.g. for a function the body of a function.
2006    /// For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.
2007    /// An empty string can be used if no value should be shown in the UI.
2008    #[serde(rename = "value")]
2009    pub value: String,
2010    /// The type of the variable's value. Typically shown in the UI when hovering over the value.
2011    /// This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.
2012    #[serde(rename = "type")]
2013    #[serde(default)]
2014    pub type_: Option<String>,
2015    /// Properties of a variable that can be used to determine how to render the variable in the UI.
2016    #[serde(rename = "presentationHint")]
2017    #[serde(default)]
2018    pub presentation_hint: Option<VariablePresentationHint>,
2019    /// The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value.
2020    #[serde(rename = "evaluateName")]
2021    #[serde(default)]
2022    pub evaluate_name: Option<String>,
2023    /// If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.
2024    #[serde(rename = "variablesReference")]
2025    pub variables_reference: u64,
2026    /// The number of named child variables.
2027    /// The client can use this information to present the children in a paged UI and fetch them in chunks.
2028    #[serde(rename = "namedVariables")]
2029    #[serde(default)]
2030    pub named_variables: Option<u64>,
2031    /// The number of indexed child variables.
2032    /// The client can use this information to present the children in a paged UI and fetch them in chunks.
2033    #[serde(rename = "indexedVariables")]
2034    #[serde(default)]
2035    pub indexed_variables: Option<u64>,
2036    /// A memory reference associated with this variable.
2037    /// For pointer type variables, this is generally a reference to the memory address contained in the pointer.
2038    /// For executable data, this reference may later be used in a `disassemble` request.
2039    /// This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.
2040    #[serde(rename = "memoryReference")]
2041    #[serde(default)]
2042    pub memory_reference: Option<String>,
2043}
2044
2045/// Properties of a variable that can be used to determine how to render the variable in the UI.
2046#[derive(Debug, Clone, Deserialize, Serialize)]
2047pub struct VariablePresentationHint {
2048    /// The kind of variable. Before introducing additional values, try to use the listed values.
2049    #[serde(rename = "kind")]
2050    #[serde(default)]
2051    pub kind: Option<VariablePresentationHintKind>,
2052    /// Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.
2053    #[serde(rename = "attributes")]
2054    #[serde(default)]
2055    pub attributes: Option<Vec<VariablePresentationHintAttributes>>,
2056    /// Visibility of variable. Before introducing additional values, try to use the listed values.
2057    #[serde(rename = "visibility")]
2058    #[serde(default)]
2059    pub visibility: Option<VariablePresentationHintVisibility>,
2060    /// If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.
2061    /// This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.
2062    /// Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.
2063    #[serde(rename = "lazy")]
2064    #[serde(default)]
2065    pub lazy: Option<bool>,
2066}
2067
2068/// The kind of variable. Before introducing additional values, try to use the listed values.
2069#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2070#[non_exhaustive]
2071pub enum VariablePresentationHintKind {
2072    /// Indicates that the object is a property.
2073    #[serde(rename = "property")]
2074    Property,
2075    /// Indicates that the object is a method.
2076    #[serde(rename = "method")]
2077    Method,
2078    /// Indicates that the object is a class.
2079    #[serde(rename = "class")]
2080    Class,
2081    /// Indicates that the object is data.
2082    #[serde(rename = "data")]
2083    Data,
2084    /// Indicates that the object is an event.
2085    #[serde(rename = "event")]
2086    Event,
2087    /// Indicates that the object is a base class.
2088    #[serde(rename = "baseClass")]
2089    BaseClass,
2090    /// Indicates that the object is an inner class.
2091    #[serde(rename = "innerClass")]
2092    InnerClass,
2093    /// Indicates that the object is an interface.
2094    #[serde(rename = "interface")]
2095    Interface,
2096    /// Indicates that the object is the most derived class.
2097    #[serde(rename = "mostDerivedClass")]
2098    MostDerivedClass,
2099    /// Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.
2100    #[serde(rename = "virtual")]
2101    Virtual,
2102    /// Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead.
2103    #[serde(rename = "dataBreakpoint")]
2104    DataBreakpoint,
2105    #[serde(other)]
2106    Unknown,
2107}
2108
2109#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2110#[non_exhaustive]
2111pub enum VariablePresentationHintAttributes {
2112    /// Indicates that the object is static.
2113    #[serde(rename = "static")]
2114    Static,
2115    /// Indicates that the object is a constant.
2116    #[serde(rename = "constant")]
2117    Constant,
2118    /// Indicates that the object is read only.
2119    #[serde(rename = "readOnly")]
2120    ReadOnly,
2121    /// Indicates that the object is a raw string.
2122    #[serde(rename = "rawString")]
2123    RawString,
2124    /// Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.
2125    #[serde(rename = "hasObjectId")]
2126    HasObjectId,
2127    /// Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.
2128    #[serde(rename = "canHaveObjectId")]
2129    CanHaveObjectId,
2130    /// Indicates that the evaluation had side effects.
2131    #[serde(rename = "hasSideEffects")]
2132    HasSideEffects,
2133    /// Indicates that the object has its value tracked by a data breakpoint.
2134    #[serde(rename = "hasDataBreakpoint")]
2135    HasDataBreakpoint,
2136    #[serde(other)]
2137    Unknown,
2138}
2139
2140/// Visibility of variable. Before introducing additional values, try to use the listed values.
2141#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2142#[non_exhaustive]
2143pub enum VariablePresentationHintVisibility {
2144    #[serde(rename = "public")]
2145    Public,
2146    #[serde(rename = "private")]
2147    Private,
2148    #[serde(rename = "protected")]
2149    Protected,
2150    #[serde(rename = "internal")]
2151    Internal,
2152    #[serde(rename = "final")]
2153    Final,
2154    #[serde(other)]
2155    Unknown,
2156}
2157
2158/// Properties of a breakpoint location returned from the `breakpointLocations` request.
2159#[derive(Debug, Clone, Deserialize, Serialize)]
2160pub struct BreakpointLocation {
2161    /// Start line of breakpoint location.
2162    #[serde(rename = "line")]
2163    pub line: u64,
2164    /// The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2165    #[serde(rename = "column")]
2166    #[serde(default)]
2167    pub column: Option<u64>,
2168    /// The end line of breakpoint location if the location covers a range.
2169    #[serde(rename = "endLine")]
2170    #[serde(default)]
2171    pub end_line: Option<u64>,
2172    /// The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2173    #[serde(rename = "endColumn")]
2174    #[serde(default)]
2175    pub end_column: Option<u64>,
2176}
2177
2178/// Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.
2179#[derive(Debug, Clone, Deserialize, Serialize)]
2180pub struct SourceBreakpoint {
2181    /// The source line of the breakpoint or logpoint.
2182    #[serde(rename = "line")]
2183    pub line: u64,
2184    /// Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2185    #[serde(rename = "column")]
2186    #[serde(default)]
2187    pub column: Option<u64>,
2188    /// The expression for conditional breakpoints.
2189    /// It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.
2190    #[serde(rename = "condition")]
2191    #[serde(default)]
2192    pub condition: Option<String>,
2193    /// The expression that controls how many hits of the breakpoint are ignored.
2194    /// The debug adapter is expected to interpret the expression as needed.
2195    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.
2196    /// If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.
2197    #[serde(rename = "hitCondition")]
2198    #[serde(default)]
2199    pub hit_condition: Option<String>,
2200    /// If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)
2201    /// but log the message instead. Expressions within `{}` are interpolated.
2202    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.
2203    /// If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.
2204    #[serde(rename = "logMessage")]
2205    #[serde(default)]
2206    pub log_message: Option<String>,
2207    /// The mode of this breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`.
2208    #[serde(rename = "mode")]
2209    #[serde(default)]
2210    pub mode: Option<String>,
2211}
2212
2213/// Properties of a breakpoint passed to the `setFunctionBreakpoints` request.
2214#[derive(Debug, Clone, Deserialize, Serialize)]
2215pub struct FunctionBreakpoint {
2216    /// The name of the function.
2217    #[serde(rename = "name")]
2218    pub name: String,
2219    /// An expression for conditional breakpoints.
2220    /// It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.
2221    #[serde(rename = "condition")]
2222    #[serde(default)]
2223    pub condition: Option<String>,
2224    /// An expression that controls how many hits of the breakpoint are ignored.
2225    /// The debug adapter is expected to interpret the expression as needed.
2226    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.
2227    #[serde(rename = "hitCondition")]
2228    #[serde(default)]
2229    pub hit_condition: Option<String>,
2230}
2231
2232/// This enumeration defines all possible access types for data breakpoints.
2233#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2234pub enum DataBreakpointAccessType {
2235    #[serde(rename = "read")]
2236    Read,
2237    #[serde(rename = "write")]
2238    Write,
2239    #[serde(rename = "readWrite")]
2240    ReadWrite,
2241}
2242
2243/// Properties of a data breakpoint passed to the `setDataBreakpoints` request.
2244#[derive(Debug, Clone, Deserialize, Serialize)]
2245pub struct DataBreakpoint {
2246    /// An id representing the data. This id is returned from the `dataBreakpointInfo` request.
2247    #[serde(rename = "dataId")]
2248    pub data_id: String,
2249    /// The access type of the data.
2250    #[serde(rename = "accessType")]
2251    #[serde(default)]
2252    pub access_type: Option<DataBreakpointAccessType>,
2253    /// An expression for conditional breakpoints.
2254    #[serde(rename = "condition")]
2255    #[serde(default)]
2256    pub condition: Option<String>,
2257    /// An expression that controls how many hits of the breakpoint are ignored.
2258    /// The debug adapter is expected to interpret the expression as needed.
2259    #[serde(rename = "hitCondition")]
2260    #[serde(default)]
2261    pub hit_condition: Option<String>,
2262}
2263
2264/// Properties of a breakpoint passed to the `setInstructionBreakpoints` request
2265#[derive(Debug, Clone, Deserialize, Serialize)]
2266pub struct InstructionBreakpoint {
2267    /// The instruction reference of the breakpoint.
2268    /// This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.
2269    #[serde(rename = "instructionReference")]
2270    pub instruction_reference: String,
2271    /// The offset from the instruction reference in bytes.
2272    /// This can be negative.
2273    #[serde(rename = "offset")]
2274    #[serde(default)]
2275    pub offset: Option<u64>,
2276    /// An expression for conditional breakpoints.
2277    /// It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.
2278    #[serde(rename = "condition")]
2279    #[serde(default)]
2280    pub condition: Option<String>,
2281    /// An expression that controls how many hits of the breakpoint are ignored.
2282    /// The debug adapter is expected to interpret the expression as needed.
2283    /// The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.
2284    #[serde(rename = "hitCondition")]
2285    #[serde(default)]
2286    pub hit_condition: Option<String>,
2287    /// The mode of this breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`.
2288    #[serde(rename = "mode")]
2289    #[serde(default)]
2290    pub mode: Option<String>,
2291}
2292
2293/// Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.
2294#[derive(Debug, Clone, Deserialize, Serialize)]
2295pub struct Breakpoint {
2296    /// The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.
2297    #[serde(rename = "id")]
2298    #[serde(default)]
2299    pub id: Option<u64>,
2300    /// If true, the breakpoint could be set (but not necessarily at the desired location).
2301    #[serde(rename = "verified")]
2302    pub verified: bool,
2303    /// A message about the state of the breakpoint.
2304    /// This is shown to the user and can be used to explain why a breakpoint could not be verified.
2305    #[serde(rename = "message")]
2306    #[serde(default)]
2307    pub message: Option<String>,
2308    /// The source where the breakpoint is located.
2309    #[serde(rename = "source")]
2310    #[serde(default)]
2311    pub source: Option<Source>,
2312    /// The start line of the actual range covered by the breakpoint.
2313    #[serde(rename = "line")]
2314    #[serde(default)]
2315    pub line: Option<u64>,
2316    /// Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2317    #[serde(rename = "column")]
2318    #[serde(default)]
2319    pub column: Option<u64>,
2320    /// The end line of the actual range covered by the breakpoint.
2321    #[serde(rename = "endLine")]
2322    #[serde(default)]
2323    pub end_line: Option<u64>,
2324    /// End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2325    /// If no end line is given, then the end column is assumed to be in the start line.
2326    #[serde(rename = "endColumn")]
2327    #[serde(default)]
2328    pub end_column: Option<u64>,
2329    /// A memory reference to where the breakpoint is set.
2330    #[serde(rename = "instructionReference")]
2331    #[serde(default)]
2332    pub instruction_reference: Option<String>,
2333    /// The offset from the instruction reference.
2334    /// This can be negative.
2335    #[serde(rename = "offset")]
2336    #[serde(default)]
2337    pub offset: Option<u64>,
2338    /// A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:
2339    ///
2340    /// - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.
2341    ///  - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.
2342    #[serde(rename = "reason")]
2343    #[serde(default)]
2344    pub reason: Option<BreakpointReason>,
2345}
2346
2347/// A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:
2348///
2349/// - `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.
2350///  - `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.
2351#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2352pub enum BreakpointReason {
2353    #[serde(rename = "pending")]
2354    Pending,
2355    #[serde(rename = "failed")]
2356    Failed,
2357}
2358
2359/// The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.
2360#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2361pub enum SteppingGranularity {
2362    /// The step should allow the program to run until the current statement has finished executing.
2363    /// The meaning of a statement is determined by the adapter and it may be considered equivalent to a line.
2364    /// For example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.
2365    #[serde(rename = "statement")]
2366    Statement,
2367    /// The step should allow the program to run until the current source line has executed.
2368    #[serde(rename = "line")]
2369    Line,
2370    /// The step should allow one instruction to execute (e.g. one x86 instruction).
2371    #[serde(rename = "instruction")]
2372    Instruction,
2373}
2374
2375/// A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.
2376#[derive(Debug, Clone, Deserialize, Serialize)]
2377pub struct StepInTarget {
2378    /// Unique identifier for a step-in target.
2379    #[serde(rename = "id")]
2380    pub id: u64,
2381    /// The name of the step-in target (shown in the UI).
2382    #[serde(rename = "label")]
2383    pub label: String,
2384    /// The line of the step-in target.
2385    #[serde(rename = "line")]
2386    #[serde(default)]
2387    pub line: Option<u64>,
2388    /// Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2389    #[serde(rename = "column")]
2390    #[serde(default)]
2391    pub column: Option<u64>,
2392    /// The end line of the range covered by the step-in target.
2393    #[serde(rename = "endLine")]
2394    #[serde(default)]
2395    pub end_line: Option<u64>,
2396    /// End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
2397    #[serde(rename = "endColumn")]
2398    #[serde(default)]
2399    pub end_column: Option<u64>,
2400}
2401
2402/// A `GotoTarget` describes a code location that can be used as a target in the `goto` request.
2403/// The possible goto targets can be determined via the `gotoTargets` request.
2404#[derive(Debug, Clone, Deserialize, Serialize)]
2405pub struct GotoTarget {
2406    /// Unique identifier for a goto target. This is used in the `goto` request.
2407    #[serde(rename = "id")]
2408    pub id: u64,
2409    /// The name of the goto target (shown in the UI).
2410    #[serde(rename = "label")]
2411    pub label: String,
2412    /// The line of the goto target.
2413    #[serde(rename = "line")]
2414    pub line: u64,
2415    /// The column of the goto target.
2416    #[serde(rename = "column")]
2417    #[serde(default)]
2418    pub column: Option<u64>,
2419    /// The end line of the range covered by the goto target.
2420    #[serde(rename = "endLine")]
2421    #[serde(default)]
2422    pub end_line: Option<u64>,
2423    /// The end column of the range covered by the goto target.
2424    #[serde(rename = "endColumn")]
2425    #[serde(default)]
2426    pub end_column: Option<u64>,
2427    /// A memory reference for the instruction pointer value represented by this target.
2428    #[serde(rename = "instructionPointerReference")]
2429    #[serde(default)]
2430    pub instruction_pointer_reference: Option<String>,
2431}
2432
2433/// `CompletionItems` are the suggestions returned from the `completions` request.
2434#[derive(Debug, Clone, Deserialize, Serialize)]
2435pub struct CompletionItem {
2436    /// The label of this completion item. By default this is also the text that is inserted when selecting this completion.
2437    #[serde(rename = "label")]
2438    pub label: String,
2439    /// If text is returned and not an empty string, then it is inserted instead of the label.
2440    #[serde(rename = "text")]
2441    #[serde(default)]
2442    pub text: Option<String>,
2443    /// A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead.
2444    #[serde(rename = "sortText")]
2445    #[serde(default)]
2446    pub sort_text: Option<String>,
2447    /// A human-readable string with additional information about this item, like type or symbol information.
2448    #[serde(rename = "detail")]
2449    #[serde(default)]
2450    pub detail: Option<String>,
2451    /// The item's type. Typically the client uses this information to render the item in the UI with an icon.
2452    #[serde(rename = "type")]
2453    #[serde(default)]
2454    pub type_: Option<CompletionItemType>,
2455    /// Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request.
2456    #[serde(rename = "start")]
2457    #[serde(default)]
2458    pub start: Option<u64>,
2459    /// Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.
2460    #[serde(rename = "length")]
2461    #[serde(default)]
2462    pub length: Option<u64>,
2463    /// Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.
2464    #[serde(rename = "selectionStart")]
2465    #[serde(default)]
2466    pub selection_start: Option<u64>,
2467    /// Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.
2468    #[serde(rename = "selectionLength")]
2469    #[serde(default)]
2470    pub selection_length: Option<u64>,
2471}
2472
2473/// Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.
2474#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2475pub enum CompletionItemType {
2476    #[serde(rename = "method")]
2477    Method,
2478    #[serde(rename = "function")]
2479    Function,
2480    #[serde(rename = "constructor")]
2481    Constructor,
2482    #[serde(rename = "field")]
2483    Field,
2484    #[serde(rename = "variable")]
2485    Variable,
2486    #[serde(rename = "class")]
2487    Class,
2488    #[serde(rename = "interface")]
2489    Interface,
2490    #[serde(rename = "module")]
2491    Module,
2492    #[serde(rename = "property")]
2493    Property,
2494    #[serde(rename = "unit")]
2495    Unit,
2496    #[serde(rename = "value")]
2497    Value,
2498    #[serde(rename = "enum")]
2499    Enum,
2500    #[serde(rename = "keyword")]
2501    Keyword,
2502    #[serde(rename = "snippet")]
2503    Snippet,
2504    #[serde(rename = "text")]
2505    Text,
2506    #[serde(rename = "color")]
2507    Color,
2508    #[serde(rename = "file")]
2509    File,
2510    #[serde(rename = "reference")]
2511    Reference,
2512    #[serde(rename = "customcolor")]
2513    Customcolor,
2514}
2515
2516/// Names of checksum algorithms that may be supported by a debug adapter.
2517#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2518pub enum ChecksumAlgorithm {
2519    #[serde(rename = "MD5")]
2520    Md5,
2521    #[serde(rename = "SHA1")]
2522    Sha1,
2523    #[serde(rename = "SHA256")]
2524    Sha256,
2525    #[serde(rename = "timestamp")]
2526    Timestamp,
2527}
2528
2529/// The checksum of an item calculated by the specified algorithm.
2530#[derive(Debug, Clone, Deserialize, Serialize)]
2531pub struct Checksum {
2532    /// The algorithm used to calculate this checksum.
2533    #[serde(rename = "algorithm")]
2534    pub algorithm: ChecksumAlgorithm,
2535    /// Value of the checksum, encoded as a hexadecimal value.
2536    #[serde(rename = "checksum")]
2537    pub checksum: String,
2538}
2539
2540/// Provides formatting information for a value.
2541#[derive(Debug, Clone, Deserialize, Serialize)]
2542pub struct ValueFormat {
2543    /// Display the value in hex.
2544    #[serde(rename = "hex")]
2545    #[serde(default)]
2546    pub hex: Option<bool>,
2547}
2548
2549/// Provides formatting information for a stack frame.
2550#[derive(Debug, Clone, Deserialize, Serialize)]
2551pub struct StackFrameFormat {
2552    /// Display the value in hex.
2553    #[serde(rename = "hex")]
2554    #[serde(default)]
2555    pub hex: Option<bool>,
2556    /// Displays parameters for the stack frame.
2557    #[serde(rename = "parameters")]
2558    #[serde(default)]
2559    pub parameters: Option<bool>,
2560    /// Displays the types of parameters for the stack frame.
2561    #[serde(rename = "parameterTypes")]
2562    #[serde(default)]
2563    pub parameter_types: Option<bool>,
2564    /// Displays the names of parameters for the stack frame.
2565    #[serde(rename = "parameterNames")]
2566    #[serde(default)]
2567    pub parameter_names: Option<bool>,
2568    /// Displays the values of parameters for the stack frame.
2569    #[serde(rename = "parameterValues")]
2570    #[serde(default)]
2571    pub parameter_values: Option<bool>,
2572    /// Displays the line number of the stack frame.
2573    #[serde(rename = "line")]
2574    #[serde(default)]
2575    pub line: Option<bool>,
2576    /// Displays the module of the stack frame.
2577    #[serde(rename = "module")]
2578    #[serde(default)]
2579    pub module: Option<bool>,
2580    /// Includes all stack frames, including those the debug adapter might otherwise hide.
2581    #[serde(rename = "includeAll")]
2582    #[serde(default)]
2583    pub include_all: Option<bool>,
2584}
2585
2586/// An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.
2587#[derive(Debug, Clone, Deserialize, Serialize)]
2588pub struct ExceptionFilterOptions {
2589    /// ID of an exception filter returned by the `exceptionBreakpointFilters` capability.
2590    #[serde(rename = "filterId")]
2591    pub filter_id: String,
2592    /// An expression for conditional exceptions.
2593    /// The exception breaks into the debugger if the result of the condition is true.
2594    #[serde(rename = "condition")]
2595    #[serde(default)]
2596    pub condition: Option<String>,
2597    /// The mode of this exception breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`.
2598    #[serde(rename = "mode")]
2599    #[serde(default)]
2600    pub mode: Option<String>,
2601}
2602
2603/// An `ExceptionOptions` assigns configuration options to a set of exceptions.
2604#[derive(Debug, Clone, Deserialize, Serialize)]
2605pub struct ExceptionOptions {
2606    /// A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.
2607    /// By convention the first segment of the path is a category that is used to group exceptions in the UI.
2608    #[serde(rename = "path")]
2609    #[serde(default)]
2610    pub path: Option<Vec<ExceptionPathSegment>>,
2611    /// Condition when a thrown exception should result in a break.
2612    #[serde(rename = "breakMode")]
2613    pub break_mode: ExceptionBreakMode,
2614}
2615
2616/// This enumeration defines all possible conditions when a thrown exception should result in a break.
2617/// never: never breaks,
2618/// always: always breaks,
2619/// unhandled: breaks when exception unhandled,
2620/// userUnhandled: breaks if the exception is not handled by user code.
2621#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2622pub enum ExceptionBreakMode {
2623    #[serde(rename = "never")]
2624    Never,
2625    #[serde(rename = "always")]
2626    Always,
2627    #[serde(rename = "unhandled")]
2628    Unhandled,
2629    #[serde(rename = "userUnhandled")]
2630    UserUnhandled,
2631}
2632
2633/// An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.
2634/// 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.
2635#[derive(Debug, Clone, Deserialize, Serialize)]
2636pub struct ExceptionPathSegment {
2637    /// If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.
2638    #[serde(rename = "negate")]
2639    #[serde(default)]
2640    pub negate: Option<bool>,
2641    /// Depending on the value of `negate` the names that should match or not match.
2642    #[serde(rename = "names")]
2643    pub names: Vec<String>,
2644}
2645
2646/// Detailed information about an exception that has occurred.
2647#[derive(Debug, Clone, Deserialize, Serialize)]
2648pub struct ExceptionDetails {
2649    /// Message contained in the exception.
2650    #[serde(rename = "message")]
2651    #[serde(default)]
2652    pub message: Option<String>,
2653    /// Short type name of the exception object.
2654    #[serde(rename = "typeName")]
2655    #[serde(default)]
2656    pub type_name: Option<String>,
2657    /// Fully-qualified type name of the exception object.
2658    #[serde(rename = "fullTypeName")]
2659    #[serde(default)]
2660    pub full_type_name: Option<String>,
2661    /// An expression that can be evaluated in the current scope to obtain the exception object.
2662    #[serde(rename = "evaluateName")]
2663    #[serde(default)]
2664    pub evaluate_name: Option<String>,
2665    /// Stack trace at the time the exception was thrown.
2666    #[serde(rename = "stackTrace")]
2667    #[serde(default)]
2668    pub stack_trace: Option<String>,
2669    /// Details of the exception contained by this exception, if any.
2670    #[serde(rename = "innerException")]
2671    #[serde(default)]
2672    pub inner_exception: Option<Vec<ExceptionDetails>>,
2673}
2674
2675/// Represents a single disassembled instruction.
2676#[derive(Debug, Clone, Deserialize, Serialize)]
2677pub struct DisassembledInstruction {
2678    /// The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.
2679    #[serde(rename = "address")]
2680    pub address: String,
2681    /// Raw bytes representing the instruction and its operands, in an implementation-defined format.
2682    #[serde(rename = "instructionBytes")]
2683    #[serde(default)]
2684    pub instruction_bytes: Option<String>,
2685    /// Text representing the instruction and its operands, in an implementation-defined format.
2686    #[serde(rename = "instruction")]
2687    pub instruction: String,
2688    /// Name of the symbol that corresponds with the location of this instruction, if any.
2689    #[serde(rename = "symbol")]
2690    #[serde(default)]
2691    pub symbol: Option<String>,
2692    /// Source location that corresponds to this instruction, if any.
2693    /// Should always be set (if available) on the first instruction returned,
2694    /// but can be omitted afterwards if this instruction maps to the same source file as the previous instruction.
2695    #[serde(rename = "location")]
2696    #[serde(default)]
2697    pub location: Option<Source>,
2698    /// The line within the source location that corresponds to this instruction, if any.
2699    #[serde(rename = "line")]
2700    #[serde(default)]
2701    pub line: Option<u64>,
2702    /// The column within the line that corresponds to this instruction, if any.
2703    #[serde(rename = "column")]
2704    #[serde(default)]
2705    pub column: Option<u64>,
2706    /// The end line of the range that corresponds to this instruction, if any.
2707    #[serde(rename = "endLine")]
2708    #[serde(default)]
2709    pub end_line: Option<u64>,
2710    /// The end column of the range that corresponds to this instruction, if any.
2711    #[serde(rename = "endColumn")]
2712    #[serde(default)]
2713    pub end_column: Option<u64>,
2714    /// A hint for how to present the instruction in the UI.
2715    ///
2716    /// A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'
2717    #[serde(rename = "presentationHint")]
2718    #[serde(default)]
2719    pub presentation_hint: Option<DisassembledInstructionPresentationHint>,
2720}
2721
2722/// A hint for how to present the instruction in the UI.
2723///
2724/// A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'
2725#[derive(PartialEq, Eq, Debug, Hash, Clone, Copy, Deserialize, Serialize)]
2726pub enum DisassembledInstructionPresentationHint {
2727    #[serde(rename = "normal")]
2728    Normal,
2729    #[serde(rename = "invalid")]
2730    Invalid,
2731}
2732
2733/// Logical areas that can be invalidated by the `invalidated` event.
2734#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2735#[non_exhaustive]
2736pub enum InvalidatedAreas {
2737    /// All previously fetched data has become invalid and needs to be refetched.
2738    #[serde(rename = "all")]
2739    All,
2740    /// Previously fetched stack related data has become invalid and needs to be refetched.
2741    #[serde(rename = "stacks")]
2742    Stacks,
2743    /// Previously fetched thread related data has become invalid and needs to be refetched.
2744    #[serde(rename = "threads")]
2745    Threads,
2746    /// Previously fetched variable data has become invalid and needs to be refetched.
2747    #[serde(rename = "variables")]
2748    Variables,
2749    #[serde(other)]
2750    Unknown,
2751}
2752
2753/// A `BreakpointMode` is provided as a option when setting breakpoints on sources or instructions.
2754#[derive(Debug, Clone, Deserialize, Serialize)]
2755pub struct BreakpointMode {
2756    /// The internal ID of the mode. This value is passed to the `setBreakpoints` request.
2757    #[serde(rename = "mode")]
2758    pub mode: String,
2759    /// The name of the breakpoint mode. This is shown in the UI.
2760    #[serde(rename = "label")]
2761    pub label: String,
2762    /// A help text providing additional information about the breakpoint mode. This string is typically shown as a hover and can be translated.
2763    #[serde(rename = "description")]
2764    #[serde(default)]
2765    pub description: Option<String>,
2766    /// Describes one or more type of breakpoint this mode applies to.
2767    #[serde(rename = "appliesTo")]
2768    pub applies_to: Vec<BreakpointModeApplicability>,
2769}
2770
2771/// Describes one or more type of breakpoint a `BreakpointMode` applies to. This is a non-exhaustive enumeration and may expand as future breakpoint types are added.
2772#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2773#[non_exhaustive]
2774pub enum BreakpointModeApplicability {
2775    /// In `SourceBreakpoint`s
2776    #[serde(rename = "source")]
2777    Source,
2778    /// In exception breakpoints applied in the `ExceptionFilterOptions`
2779    #[serde(rename = "exception")]
2780    Exception,
2781    /// In data breakpoints requested in the the `DataBreakpointInfo` request
2782    #[serde(rename = "data")]
2783    Data,
2784    /// In `InstructionBreakpoint`s
2785    #[serde(rename = "instruction")]
2786    Instruction,
2787    #[serde(other)]
2788    Unknown,
2789}
2790
2791#[derive(PartialEq, Eq, Debug, Hash, Clone, Deserialize, Serialize)]
2792#[serde(untagged)]
2793pub enum ModuleId {
2794    Number(u32),
2795    String(String),
2796}
2797
2798#[derive(Debug, Clone, Deserialize, Serialize)]
2799#[serde(transparent)]
2800pub struct AttachRequestArguments {
2801    pub raw: serde_json::Value,
2802}
2803
2804#[derive(Debug, Clone, Deserialize, Serialize)]
2805#[serde(transparent)]
2806pub struct LaunchRequestArguments {
2807    pub raw: serde_json::Value,
2808}
2809
2810#[derive(Debug, Clone, Deserialize, Serialize)]
2811#[serde(transparent)]
2812pub struct RestartArguments {
2813    pub raw: serde_json::Value,
2814}