Class PingResponse

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

public class PingResponse extends Object
Response from a ping request to the Copilot CLI server.

The ping response confirms connectivity and provides information about the server, including the protocol version.

Since:
1.0.0
See Also:
  • Constructor Details

    • PingResponse

      public PingResponse()
  • Method Details

    • getMessage

      public String getMessage()
      Gets the echo message from the server.
      Returns:
      the message echoed back by the server
    • setMessage

      public void setMessage(String message)
      Sets the message.
      Parameters:
      message - the message
    • getTimestamp

      public long getTimestamp()
      Gets the server timestamp.
      Returns:
      the timestamp in milliseconds since epoch
    • setTimestamp

      public void setTimestamp(long timestamp)
      Sets the timestamp.
      Parameters:
      timestamp - the timestamp
    • getProtocolVersion

      public Integer getProtocolVersion()
      Gets the SDK protocol version supported by the server.

      The SDK validates that this version matches the expected version to ensure compatibility.

      Returns:
      the protocol version, or null if not reported
    • setProtocolVersion

      public void setProtocolVersion(Integer protocolVersion)
      Sets the protocol version.
      Parameters:
      protocolVersion - the protocol version