Record Class McpServer
java.lang.Object
java.lang.Record
com.github.copilot.generated.rpc.McpServer
@Generated("copilot-sdk-codegen")
public record McpServer(String name, McpServerStatus status, McpServerSource source, String url, String sourcePlugin, String sourcePluginVersion, String displayName, String error, McpServerMetadata serverMetadata, McpServerOwnership owned)
extends Record
MCP server status entry, including config source/plugin source and any connection error.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionMcpServer(String name, McpServerStatus status, McpServerSource source, String sourcePlugin, String sourcePluginVersion, String displayName, String error, McpServerMetadata serverMetadata) Creates a record with the components it had before later optional fields were added.McpServer(String name, McpServerStatus status, McpServerSource source, String url, String sourcePlugin, String sourcePluginVersion, String displayName, String error, McpServerMetadata serverMetadata, McpServerOwnership owned) Creates an instance of aMcpServerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.owned()Returns the value of theownedrecord component.Returns the value of theserverMetadatarecord component.source()Returns the value of thesourcerecord component.Returns the value of thesourcePluginrecord component.Returns the value of thesourcePluginVersionrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
McpServer
public McpServer(String name, McpServerStatus status, McpServerSource source, String sourcePlugin, String sourcePluginVersion, String displayName, String error, McpServerMetadata serverMetadata) Creates a record with the components it had before later optional fields were added.- Parameters:
name- Server name (config key)status- Connection status: connected, failed, needs-auth, pending, disabled, stopped, or not_configuredsource- Configuration source: user, workspace, plugin, builtin, or managedsourcePlugin- Plugin name that provided this server, when source is plugin.sourcePluginVersion- Plugin version that provided this server, when source is plugin.displayName- Human-readable display name supplied by a managed server catalog.error- Error message if the server failed to connectserverMetadata- Server-advertised metadata for a connected server. Omitted when no live connection metadata is available, including while pending or when failed, disabled, stopped, or not configured.
-
McpServer
public McpServer(String name, McpServerStatus status, McpServerSource source, String url, String sourcePlugin, String sourcePluginVersion, String displayName, String error, McpServerMetadata serverMetadata, McpServerOwnership owned) Creates an instance of aMcpServerrecord class.- Parameters:
name- the value for thenamerecord componentstatus- the value for thestatusrecord componentsource- the value for thesourcerecord componenturl- the value for theurlrecord componentsourcePlugin- the value for thesourcePluginrecord componentsourcePluginVersion- the value for thesourcePluginVersionrecord componentdisplayName- the value for thedisplayNamerecord componenterror- the value for theerrorrecord componentserverMetadata- the value for theserverMetadatarecord componentowned- the value for theownedrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
sourcePlugin
Returns the value of thesourcePluginrecord component.- Returns:
- the value of the
sourcePluginrecord component
-
sourcePluginVersion
Returns the value of thesourcePluginVersionrecord component.- Returns:
- the value of the
sourcePluginVersionrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
serverMetadata
Returns the value of theserverMetadatarecord component.- Returns:
- the value of the
serverMetadatarecord component
-
owned
Returns the value of theownedrecord component.- Returns:
- the value of the
ownedrecord component
-