Class McpServer.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
com.google.cloud.apiregistry.v1beta.McpServer.Builder
- All Implemented Interfaces:
McpServerOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- McpServer
public static final class McpServer.Builder
extends com.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
implements McpServerOrBuilder
Represents an MCP Server. MCP Servers act as endpoints that expose a collection of tools that can be invoked by agents.Protobuf type
google.cloud.apiregistry.v1beta.McpServer-
Method Summary
Modifier and TypeMethodDescriptionaddAllUrls(Iterable<String> values) The base URL of the MCP server.The base URL of the MCP server.addUrlsBytes(com.google.protobuf.ByteString value) The base URL of the MCP server.build()clear()The capabilities that a server may support.Optional.Optional.Identifier.Output only.The base URL of the MCP server.com.google.protobuf.StructThe capabilities that a server may support.com.google.protobuf.Struct.BuilderThe capabilities that a server may support.com.google.protobuf.StructOrBuilderThe capabilities that a server may support.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.getName()Identifier.com.google.protobuf.ByteStringIdentifier.getState()Output only.intOutput only.getUrls(int index) The base URL of the MCP server.com.google.protobuf.ByteStringgetUrlsBytes(int index) The base URL of the MCP server.intThe base URL of the MCP server.com.google.protobuf.ProtocolStringListThe base URL of the MCP server.booleanThe capabilities that a server may support.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCapabilities(com.google.protobuf.Struct value) The capabilities that a server may support.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCapabilities(com.google.protobuf.Struct value) The capabilities that a server may support.setCapabilities(com.google.protobuf.Struct.Builder builderForValue) The capabilities that a server may support.setDescription(String value) Optional.setDescriptionBytes(com.google.protobuf.ByteString value) Optional.setDisplayName(String value) Optional.setDisplayNameBytes(com.google.protobuf.ByteString value) Optional.Identifier.setNameBytes(com.google.protobuf.ByteString value) Identifier.Output only.setStateValue(int value) Output only.The base URL of the MCP server.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<McpServer.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
-
mergeFrom
public McpServer.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<McpServer.Builder>- Throws:
IOException
-
getName
Identifier. The resource name of the MCP Server. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2pstring name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNamein interfaceMcpServerOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Identifier. The resource name of the MCP Server. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2pstring name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Specified by:
getNameBytesin interfaceMcpServerOrBuilder- Returns:
- The bytes for name.
-
setName
Identifier. The resource name of the MCP Server. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2pstring name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Identifier. The resource name of the MCP Server. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2pstring name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Returns:
- This builder for chaining.
-
setNameBytes
Identifier. The resource name of the MCP Server. Format: `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. Example: projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp for 1p projects/12345/locations/us-central1/mcpServers/apphub:starbucks for 2pstring name = 1 [(.google.api.field_behavior) = IDENTIFIER];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDisplayName
Optional. A human readable name for the MCP server.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDisplayNamein interfaceMcpServerOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()Optional. A human readable name for the MCP server.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDisplayNameBytesin interfaceMcpServerOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
Optional. A human readable name for the MCP server.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
Optional. A human readable name for the MCP server.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setDisplayNameBytes
Optional. A human readable name for the MCP server.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getDescription
Optional. A human-readable description of the MCP Server's functionality.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDescriptionin interfaceMcpServerOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Optional. A human-readable description of the MCP Server's functionality.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDescriptionBytesin interfaceMcpServerOrBuilder- Returns:
- The bytes for description.
-
setDescription
Optional. A human-readable description of the MCP Server's functionality.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
Optional. A human-readable description of the MCP Server's functionality.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setDescriptionBytes
Optional. A human-readable description of the MCP Server's functionality.
string description = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getUrlsList
public com.google.protobuf.ProtocolStringList getUrlsList()The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Specified by:
getUrlsListin interfaceMcpServerOrBuilder- Returns:
- A list containing the urls.
-
getUrlsCount
public int getUrlsCount()The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Specified by:
getUrlsCountin interfaceMcpServerOrBuilder- Returns:
- The count of urls.
-
getUrls
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Specified by:
getUrlsin interfaceMcpServerOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The urls at the given index.
-
getUrlsBytes
public com.google.protobuf.ByteString getUrlsBytes(int index) The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Specified by:
getUrlsBytesin interfaceMcpServerOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the urls at the given index.
-
setUrls
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Parameters:
index- The index to set the value at.value- The urls to set.- Returns:
- This builder for chaining.
-
addUrls
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Parameters:
value- The urls to add.- Returns:
- This builder for chaining.
-
addAllUrls
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Parameters:
values- The urls to add.- Returns:
- This builder for chaining.
-
clearUrls
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Returns:
- This builder for chaining.
-
addUrlsBytes
The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
repeated string urls = 4;- Parameters:
value- The bytes of the urls to add.- Returns:
- This builder for chaining.
-
hasCapabilities
public boolean hasCapabilities()The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6;- Specified by:
hasCapabilitiesin interfaceMcpServerOrBuilder- Returns:
- Whether the capabilities field is set.
-
getCapabilities
public com.google.protobuf.Struct getCapabilities()The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6;- Specified by:
getCapabilitiesin interfaceMcpServerOrBuilder- Returns:
- The capabilities.
-
setCapabilities
The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6; -
setCapabilities
The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6; -
mergeCapabilities
The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6; -
clearCapabilities
The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6; -
getCapabilitiesBuilder
public com.google.protobuf.Struct.Builder getCapabilitiesBuilder()The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6; -
getCapabilitiesOrBuilder
public com.google.protobuf.StructOrBuilder getCapabilitiesOrBuilder()The capabilities that a server may support. Known capabilities defined in https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities and additional capabilities defined by the servers.
.google.protobuf.Struct capabilities = 6;- Specified by:
getCapabilitiesOrBuilderin interfaceMcpServerOrBuilder
-
getStateValue
public int getStateValue()Output only. The state of the MCP Server.
.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStateValuein interfaceMcpServerOrBuilder- Returns:
- The enum numeric value on the wire for state.
-
setStateValue
Output only. The state of the MCP Server.
.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The enum numeric value on the wire for state to set.- Returns:
- This builder for chaining.
-
getState
Output only. The state of the MCP Server.
.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getStatein interfaceMcpServerOrBuilder- Returns:
- The state.
-
setState
Output only. The state of the MCP Server.
.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The state to set.- Returns:
- This builder for chaining.
-
clearState
Output only. The state of the MCP Server.
.google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-