-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathUserInputResponse.java
More file actions
63 lines (54 loc) · 1.52 KB
/
UserInputResponse.java
File metadata and controls
63 lines (54 loc) · 1.52 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Response to a user input request.
*
* @since 1.0.6
*/
public class UserInputResponse {
@JsonProperty("answer")
private String answer;
@JsonProperty("wasFreeform")
private boolean wasFreeform;
/**
* Gets the user's answer.
*
* @return the answer text
*/
public String getAnswer() {
return answer;
}
/**
* Sets the user's answer.
*
* @param answer
* the answer text
* @return this instance for method chaining
*/
public UserInputResponse setAnswer(String answer) {
this.answer = answer;
return this;
}
/**
* Returns whether the answer was freeform (not from the provided choices).
*
* @return {@code true} if the answer was freeform
*/
public boolean isWasFreeform() {
return wasFreeform;
}
/**
* Sets whether the answer was freeform.
*
* @param wasFreeform
* {@code true} if the answer was freeform
* @return this instance for method chaining
*/
public UserInputResponse setWasFreeform(boolean wasFreeform) {
this.wasFreeform = wasFreeform;
return this;
}
}