Record Class ResumeSessionResponse

java.lang.Object
java.lang.Record
com.github.copilot.rpc.ResumeSessionResponse
Record Components:
sessionId - the session ID
workspacePath - the workspace path, or null if infinite sessions are disabled
capabilities - the capabilities reported by the host, or null
openCanvases - the canvas instances open for the session, or null (since 1.0.1)
transcriptRecovery - repair details, or null if no repair was reported

public record ResumeSessionResponse(String sessionId, String workspacePath, SessionCapabilities capabilities, List<OpenCanvasInstance> openCanvases, TranscriptRecoveryReport transcriptRecovery) extends Record
Internal response object from resuming a session.

The openCanvases component was added in 1.0.1.

Since:
1.0.0
  • Constructor Details

    • ResumeSessionResponse

      public ResumeSessionResponse(String sessionId, String workspacePath, SessionCapabilities capabilities, List<OpenCanvasInstance> openCanvases)
      Constructs a response without a transcript recovery report.
      Parameters:
      sessionId - the session ID
      workspacePath - the workspace path, or null
      capabilities - the host capabilities, or null
      openCanvases - the open canvas instances, or null
    • ResumeSessionResponse

      public ResumeSessionResponse(String sessionId, String workspacePath, SessionCapabilities capabilities, List<OpenCanvasInstance> openCanvases, TranscriptRecoveryReport transcriptRecovery)
      Creates an instance of a ResumeSessionResponse record class.
      Parameters:
      sessionId - the value for the sessionId record component
      workspacePath - the value for the workspacePath record component
      capabilities - the value for the capabilities record component
      openCanvases - the value for the openCanvases record component
      transcriptRecovery - the value for the transcriptRecovery record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • workspacePath

      public String workspacePath()
      Returns the value of the workspacePath record component.
      Returns:
      the value of the workspacePath record component
    • capabilities

      public SessionCapabilities capabilities()
      Returns the value of the capabilities record component.
      Returns:
      the value of the capabilities record component
    • openCanvases

      public List<OpenCanvasInstance> openCanvases()
      Returns the value of the openCanvases record component.
      Returns:
      the value of the openCanvases record component
    • transcriptRecovery

      public TranscriptRecoveryReport transcriptRecovery()
      Returns the value of the transcriptRecovery record component.
      Returns:
      the value of the transcriptRecovery record component