-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDeleteSessionResponse.java
More file actions
64 lines (55 loc) · 1.63 KB
/
DeleteSessionResponse.java
File metadata and controls
64 lines (55 loc) · 1.63 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Internal response object from deleting a session.
* <p>
* This is a low-level class for JSON-RPC communication containing the result of
* a session deletion operation.
*
* @see com.github.copilot.sdk.CopilotClient#deleteSession(String)
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public final class DeleteSessionResponse {
@JsonProperty("success")
private boolean success;
@JsonProperty("error")
private String error;
/**
* Returns whether the deletion was successful.
*
* @return {@code true} if the session was deleted successfully
*/
public boolean isSuccess() {
return success;
}
/**
* Sets whether the deletion was successful.
*
* @param success
* {@code true} if successful
*/
public void setSuccess(boolean success) {
this.success = success;
}
/**
* Gets the error message if the deletion failed.
*
* @return the error message, or {@code null} if successful
*/
public String getError() {
return error;
}
/**
* Sets the error message.
*
* @param error
* the error message
*/
public void setError(String error) {
this.error = error;
}
}