forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPermissionRequest.java
More file actions
89 lines (76 loc) · 2.18 KB
/
PermissionRequest.java
File metadata and controls
89 lines (76 loc) · 2.18 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Represents a permission request from the AI assistant.
* <p>
* When the assistant needs permission to perform certain actions, this object
* contains the details of the request, including the kind of permission and any
* associated tool call.
*
* @see PermissionHandler
* @since 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PermissionRequest {
@JsonProperty("kind")
private String kind;
@JsonProperty("toolCallId")
private String toolCallId;
private Map<String, Object> extensionData;
/**
* Gets the kind of permission being requested.
*
* @return the permission kind
*/
public String getKind() {
return kind;
}
/**
* Sets the permission kind.
*
* @param kind
* the permission kind
*/
public void setKind(String kind) {
this.kind = kind;
}
/**
* Gets the associated tool call ID, if applicable.
*
* @return the tool call ID, or {@code null} if not a tool-related request
*/
public String getToolCallId() {
return toolCallId;
}
/**
* Sets the tool call ID.
*
* @param toolCallId
* the tool call ID
*/
public void setToolCallId(String toolCallId) {
this.toolCallId = toolCallId;
}
/**
* Gets additional extension data for the request.
*
* @return the extension data map
*/
public Map<String, Object> getExtensionData() {
return extensionData;
}
/**
* Sets additional extension data for the request.
*
* @param extensionData
* the extension data map
*/
public void setExtensionData(Map<String, Object> extensionData) {
this.extensionData = extensionData;
}
}