Package com.github.copilot.sdk.json
Class PingResponse
java.lang.Object
com.github.copilot.sdk.json.PingResponse
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the echo message from the server.Gets the SDK protocol version supported by the server.longGets the server timestamp.voidsetMessage(String message) Sets the message.voidsetProtocolVersion(Integer protocolVersion) Sets the protocol version.voidsetTimestamp(long timestamp) Sets the timestamp.
-
Constructor Details
-
PingResponse
public PingResponse()
-
-
Method Details
-
getMessage
Gets the echo message from the server.- Returns:
- the message echoed back by the server
-
setMessage
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
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
nullif not reported
-
setProtocolVersion
Sets the protocol version.- Parameters:
protocolVersion- the protocol version
-