Class ClientInfo

java.lang.Object
com.github.copilot.rpc.ClientInfo

public class ClientInfo extends Object
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 Details

    • ClientInfo

      public ClientInfo()
  • Method Details

    • getApplicationName

      public String getApplicationName()
      Gets the name of the application using the SDK.
      Returns:
      the application name, or null
    • setApplicationName

      public ClientInfo setApplicationName(String applicationName)
      Sets the name of the application using the SDK.
      Parameters:
      applicationName - the application name
      Returns:
      this client info for method chaining
    • getApplicationVersion

      public String getApplicationVersion()
      Gets the version of the application using the SDK.
      Returns:
      the application version, or null
    • setApplicationVersion

      public ClientInfo setApplicationVersion(String applicationVersion)
      Sets the version of the application using the SDK.
      Parameters:
      applicationVersion - the application version
      Returns:
      this client info for method chaining
    • getIntegrationName

      public String 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

      public ClientInfo setIntegrationName(String integrationName)
      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

      public String getIntegrationVersion()
      Gets the optional version of the named integration.
      Returns:
      the integration version, or null
    • setIntegrationVersion

      public ClientInfo setIntegrationVersion(String integrationVersion)
      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 omits clientInfo from the handshake so the runtime keeps its default attribution.
      Returns:
      true when every field is null or empty