Package com.github.copilot.sdk.json
Class SessionMetadata
java.lang.Object
com.github.copilot.sdk.json.SessionMetadata
Metadata about an existing Copilot session.
This class represents session information returned when listing available
sessions via CopilotClient.listSessions(). It
includes timing information, a summary of the conversation, and whether the
session is stored remotely.
Example Usage
var sessions = client.listSessions().get();
for (var meta : sessions) {
System.out.println("Session: " + meta.getSessionId());
System.out.println(" Started: " + meta.getStartTime());
System.out.println(" Summary: " + meta.getSummary());
}
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the timestamp when the session was last modified.Gets the unique identifier for this session.Gets the timestamp when the session was created.Gets a brief summary of the session's conversation.booleanisRemote()Returns whether this session is stored remotely.voidsetModifiedTime(String modifiedTime) Sets the session modified time.voidsetRemote(boolean remote) Sets whether this session is stored remotely.voidsetSessionId(String sessionId) Sets the session identifier.voidsetStartTime(String startTime) Sets the session start time.voidsetSummary(String summary) Sets the session summary.
-
Constructor Details
-
SessionMetadata
public SessionMetadata()
-
-
Method Details
-
getSessionId
Gets the unique identifier for this session.- Returns:
- the session ID
-
setSessionId
Sets the session identifier.- Parameters:
sessionId- the session ID
-
getStartTime
Gets the timestamp when the session was created.- Returns:
- the start time as an ISO 8601 formatted string
-
setStartTime
Sets the session start time.- Parameters:
startTime- the start time as an ISO 8601 formatted string
-
getModifiedTime
Gets the timestamp when the session was last modified.- Returns:
- the modified time as an ISO 8601 formatted string
-
setModifiedTime
Sets the session modified time.- Parameters:
modifiedTime- the modified time as an ISO 8601 formatted string
-
getSummary
Gets a brief summary of the session's conversation.This is typically an AI-generated summary of the session content.
- Returns:
- the session summary, or
nullif not available
-
setSummary
Sets the session summary.- Parameters:
summary- the session summary
-
isRemote
public boolean isRemote()Returns whether this session is stored remotely.- Returns:
trueif the session is stored on the server,falseif it's stored locally
-
setRemote
public void setRemote(boolean remote) Sets whether this session is stored remotely.- Parameters:
remote-trueif stored remotely
-