Class ClientInfo
java.lang.Object
com.github.copilot.rpc.ClientInfo
Identity of the integrating application, declared on the
server.connect handshake.
Declaring it lets the telemetry the runtime emits on the connection be attributed to a single, consistent surface (the application and its Copilot integration) instead of the runtime's own build. All fields are optional; an empty field is omitted from the handshake.
Example Usage
var options = new CopilotClientOptions().setClientInfo(new ClientInfo().setApplicationName("acme-developer-portal")
.setApplicationVersion("2.4.0").setIntegrationName("copilot-assistant").setIntegrationVersion("1.5.0"));
- Since:
- 1.6.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the application using the SDK.Gets the version of the application using the SDK.Gets the optional name of a specific integration within the application, such as an extension or plugin.Gets the optional version of the named integration.booleanisEmpty()Returns whether no field carries a non-empty value, in which case the SDK omitsclientInfofrom the handshake so the runtime keeps its default attribution.setApplicationName(String applicationName) Sets the name of the application using the SDK.setApplicationVersion(String applicationVersion) Sets the version of the application using the SDK.setIntegrationName(String integrationName) Sets the optional name of a specific integration within the application, such as an extension or plugin.setIntegrationVersion(String integrationVersion) Sets the optional version of the named integration.
-
Constructor Details
-
ClientInfo
public ClientInfo()
-
-
Method Details
-
getApplicationName
Gets the name of the application using the SDK.- Returns:
- the application name, or
null
-
setApplicationName
Sets the name of the application using the SDK.- Parameters:
applicationName- the application name- Returns:
- this client info for method chaining
-
getApplicationVersion
Gets the version of the application using the SDK.- Returns:
- the application version, or
null
-
setApplicationVersion
Sets the version of the application using the SDK.- Parameters:
applicationVersion- the application version- Returns:
- this client info for method chaining
-
getIntegrationName
Gets the optional name of a specific integration within the application, such as an extension or plugin.- Returns:
- the integration name, or
null
-
setIntegrationName
Sets the optional name of a specific integration within the application, such as an extension or plugin.- Parameters:
integrationName- the integration name- Returns:
- this client info for method chaining
-
getIntegrationVersion
Gets the optional version of the named integration.- Returns:
- the integration version, or
null
-
setIntegrationVersion
Sets the optional version of the named integration.- Parameters:
integrationVersion- the integration version- Returns:
- this client info for method chaining
-
isEmpty
public boolean isEmpty()Returns whether no field carries a non-empty value, in which case the SDK omitsclientInfofrom the handshake so the runtime keeps its default attribution.- Returns:
truewhen every field isnullor empty
-