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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
    • clear

      public McpServer.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<McpServer.Builder>
    • getDefaultInstanceForType

      public McpServer getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public McpServer build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public McpServer buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public McpServer.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<McpServer.Builder>
    • mergeFrom

      public McpServer.Builder mergeFrom(McpServer other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<McpServer.Builder>
      Throws:
      IOException
    • getName

      public String 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
       2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface McpServerOrBuilder
      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
       2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface McpServerOrBuilder
      Returns:
      The bytes for name.
    • setName

      public McpServer.Builder setName(String value)
       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
       2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public McpServer.Builder 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
       2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public McpServer.Builder setNameBytes(com.google.protobuf.ByteString value)
       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
       2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Optional. A human readable name for the MCP server.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayName in interface McpServerOrBuilder
      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:
      getDisplayNameBytes in interface McpServerOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public McpServer.Builder setDisplayName(String value)
       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

      public McpServer.Builder 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

      public McpServer.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       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

      public String getDescription()
       Optional. A human-readable description of the MCP Server's functionality.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface McpServerOrBuilder
      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:
      getDescriptionBytes in interface McpServerOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public McpServer.Builder setDescription(String value)
       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

      public McpServer.Builder 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

      public McpServer.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       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:
      getUrlsList in interface McpServerOrBuilder
      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:
      getUrlsCount in interface McpServerOrBuilder
      Returns:
      The count of urls.
    • getUrls

      public String getUrls(int index)
       The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
       
      repeated string urls = 4;
      Specified by:
      getUrls in interface McpServerOrBuilder
      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:
      getUrlsBytes in interface McpServerOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the urls at the given index.
    • setUrls

      public McpServer.Builder setUrls(int index, String value)
       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

      public McpServer.Builder addUrls(String value)
       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

      public McpServer.Builder addAllUrls(Iterable<String> values)
       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

      public McpServer.Builder clearUrls()
       The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp].
       
      repeated string urls = 4;
      Returns:
      This builder for chaining.
    • addUrlsBytes

      public McpServer.Builder addUrlsBytes(com.google.protobuf.ByteString value)
       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:
      hasCapabilities in interface McpServerOrBuilder
      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:
      getCapabilities in interface McpServerOrBuilder
      Returns:
      The capabilities.
    • setCapabilities

      public McpServer.Builder setCapabilities(com.google.protobuf.Struct value)
       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

      public McpServer.Builder setCapabilities(com.google.protobuf.Struct.Builder builderForValue)
       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

      public McpServer.Builder mergeCapabilities(com.google.protobuf.Struct value)
       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

      public McpServer.Builder 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:
      getCapabilitiesOrBuilder in interface McpServerOrBuilder
    • 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:
      getStateValue in interface McpServerOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public McpServer.Builder setStateValue(int value)
       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

      public State getState()
       Output only. The state of the MCP Server.
       
      .google.cloud.apiregistry.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface McpServerOrBuilder
      Returns:
      The state.
    • setState

      public McpServer.Builder setState(State value)
       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

      public McpServer.Builder 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.