forked from github/copilot-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElicitationSchema.java
More file actions
92 lines (79 loc) · 2.29 KB
/
ElicitationSchema.java
File metadata and controls
92 lines (79 loc) · 2.29 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* JSON Schema describing the form fields to present for an elicitation dialog.
*
* @since 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ElicitationSchema {
@JsonProperty("type")
private String type = "object";
@JsonProperty("properties")
private Map<String, Object> properties;
@JsonProperty("required")
private List<String> required;
/**
* Gets the schema type indicator (always {@code "object"}).
*
* @return the type
*/
public String getType() {
return type;
}
/**
* Sets the schema type indicator.
*
* @param type
* the type (typically {@code "object"})
* @return this instance for method chaining
*/
public ElicitationSchema setType(String type) {
this.type = type;
return this;
}
/**
* Gets the form field definitions, keyed by field name.
*
* @return the properties map
*/
public Map<String, Object> getProperties() {
return properties;
}
/**
* Sets the form field definitions, keyed by field name.
*
* @param properties
* the properties map
* @return this instance for method chaining
*/
public ElicitationSchema setProperties(Map<String, Object> properties) {
this.properties = properties;
return this;
}
/**
* Gets the list of required field names.
*
* @return the required field names, or {@code null}
*/
public List<String> getRequired() {
return required;
}
/**
* Sets the list of required field names.
*
* @param required
* the required field names
* @return this instance for method chaining
*/
public ElicitationSchema setRequired(List<String> required) {
this.required = required;
return this;
}
}