Class SessionMetadata

java.lang.Object
com.github.copilot.sdk.json.SessionMetadata

public class SessionMetadata extends Object
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());
 }
 
See Also:
  • Constructor Details

    • SessionMetadata

      public SessionMetadata()
  • Method Details

    • getSessionId

      public String getSessionId()
      Gets the unique identifier for this session.
      Returns:
      the session ID
    • setSessionId

      public void setSessionId(String sessionId)
      Sets the session identifier.
      Parameters:
      sessionId - the session ID
    • getStartTime

      public String getStartTime()
      Gets the timestamp when the session was created.
      Returns:
      the start time as an ISO 8601 formatted string
    • setStartTime

      public void setStartTime(String startTime)
      Sets the session start time.
      Parameters:
      startTime - the start time as an ISO 8601 formatted string
    • getModifiedTime

      public String getModifiedTime()
      Gets the timestamp when the session was last modified.
      Returns:
      the modified time as an ISO 8601 formatted string
    • setModifiedTime

      public void setModifiedTime(String modifiedTime)
      Sets the session modified time.
      Parameters:
      modifiedTime - the modified time as an ISO 8601 formatted string
    • getSummary

      public 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 null if not available
    • setSummary

      public void setSummary(String summary)
      Sets the session summary.
      Parameters:
      summary - the session summary
    • isRemote

      public boolean isRemote()
      Returns whether this session is stored remotely.
      Returns:
      true if the session is stored on the server, false if it's stored locally
    • setRemote

      public void setRemote(boolean remote)
      Sets whether this session is stored remotely.
      Parameters:
      remote - true if stored remotely