forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolExecutionCompleteEvent.java
More file actions
168 lines (124 loc) · 4.17 KB
/
ToolExecutionCompleteEvent.java
File metadata and controls
168 lines (124 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.events;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/**
* Event: tool.execution_complete
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class ToolExecutionCompleteEvent extends AbstractSessionEvent {
@JsonProperty("data")
private ToolExecutionCompleteData data;
@Override
public String getType() {
return "tool.execution_complete";
}
public ToolExecutionCompleteData getData() {
return data;
}
public void setData(ToolExecutionCompleteData data) {
this.data = data;
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static class ToolExecutionCompleteData {
@JsonProperty("toolCallId")
private String toolCallId;
@JsonProperty("success")
private boolean success;
@JsonProperty("isUserRequested")
private Boolean isUserRequested;
@JsonProperty("result")
private Result result;
@JsonProperty("error")
private Error error;
@JsonProperty("toolTelemetry")
private Map<String, Object> toolTelemetry;
@JsonProperty("parentToolCallId")
private String parentToolCallId;
public String getToolCallId() {
return toolCallId;
}
public void setToolCallId(String toolCallId) {
this.toolCallId = toolCallId;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public Boolean getIsUserRequested() {
return isUserRequested;
}
public void setIsUserRequested(Boolean isUserRequested) {
this.isUserRequested = isUserRequested;
}
public Result getResult() {
return result;
}
public void setResult(Result result) {
this.result = result;
}
public Error getError() {
return error;
}
public void setError(Error error) {
this.error = error;
}
public Map<String, Object> getToolTelemetry() {
return toolTelemetry;
}
public void setToolTelemetry(Map<String, Object> toolTelemetry) {
this.toolTelemetry = toolTelemetry;
}
public String getParentToolCallId() {
return parentToolCallId;
}
public void setParentToolCallId(String parentToolCallId) {
this.parentToolCallId = parentToolCallId;
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Result {
@JsonProperty("content")
private String content;
@JsonProperty("detailedContent")
private String detailedContent;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getDetailedContent() {
return detailedContent;
}
public void setDetailedContent(String detailedContent) {
this.detailedContent = detailedContent;
}
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Error {
@JsonProperty("message")
private String message;
@JsonProperty("code")
private String code;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
}
}