Class SearchMcpServersRequest.Builder (0.2.0)

public static final class SearchMcpServersRequest.Builder extends GeneratedMessage.Builder<SearchMcpServersRequest.Builder> implements SearchMcpServersRequestOrBuilder

Message for searching MCP Servers

Protobuf type google.cloud.agentregistry.v1.SearchMcpServersRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public SearchMcpServersRequest build()
Returns
Type Description
SearchMcpServersRequest

buildPartial()

public SearchMcpServersRequest buildPartial()
Returns
Type Description
SearchMcpServersRequest

clear()

public SearchMcpServersRequest.Builder clear()
Returns
Type Description
SearchMcpServersRequest.Builder
Overrides

clearPageSize()

public SearchMcpServersRequest.Builder clearPageSize()

Optional. The maximum number of search results to return per page. The page size is capped at 100, even if a larger value is specified. A negative value will result in an INVALID_ARGUMENT error. If unspecified or set to 0, a default value of 20 will be used. The server may return fewer results than requested.

int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

clearPageToken()

public SearchMcpServersRequest.Builder clearPageToken()

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

string page_token = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

clearParent()

public SearchMcpServersRequest.Builder clearParent()

Required. Parent value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

clearSearchString()

public SearchMcpServersRequest.Builder clearSearchString()

Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

Allowed operators: =, :, NOT, AND, OR, and ().

Searchable fields:

Field = : * Keyword Search
mcpServerId Yes Yes Yes Included
name No Yes Yes Included
displayName No Yes Yes Included

Examples:

  • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
  • name:important to find MCP Servers whose name contains important as a word.
  • displayName:works* to find MCP Servers whose display name contains words that start with works.
  • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
  • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.

string search_string = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

getDefaultInstanceForType()

public SearchMcpServersRequest getDefaultInstanceForType()
Returns
Type Description
SearchMcpServersRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPageSize()

public int getPageSize()

Optional. The maximum number of search results to return per page. The page size is capped at 100, even if a larger value is specified. A negative value will result in an INVALID_ARGUMENT error. If unspecified or set to 0, a default value of 20 will be used. The server may return fewer results than requested.

int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The pageSize.

getPageToken()

public String getPageToken()

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

string page_token = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The pageToken.

getPageTokenBytes()

public ByteString getPageTokenBytes()

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

string page_token = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for pageToken.

getParent()

public String getParent()

Required. Parent value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. Parent value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getSearchString()

public String getSearchString()

Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

Allowed operators: =, :, NOT, AND, OR, and ().

Searchable fields:

Field = : * Keyword Search
mcpServerId Yes Yes Yes Included
name No Yes Yes Included
displayName No Yes Yes Included

Examples:

  • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
  • name:important to find MCP Servers whose name contains important as a word.
  • displayName:works* to find MCP Servers whose display name contains words that start with works.
  • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
  • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.

string search_string = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The searchString.

getSearchStringBytes()

public ByteString getSearchStringBytes()

Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

Allowed operators: =, :, NOT, AND, OR, and ().

Searchable fields:

Field = : * Keyword Search
mcpServerId Yes Yes Yes Included
name No Yes Yes Included
displayName No Yes Yes Included

Examples:

  • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
  • name:important to find MCP Servers whose name contains important as a word.
  • displayName:works* to find MCP Servers whose display name contains words that start with works.
  • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
  • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.

string search_string = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for searchString.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchMcpServersRequest other)

public SearchMcpServersRequest.Builder mergeFrom(SearchMcpServersRequest other)
Parameter
Name Description
other SearchMcpServersRequest
Returns
Type Description
SearchMcpServersRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchMcpServersRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchMcpServersRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SearchMcpServersRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SearchMcpServersRequest.Builder
Overrides

setPageSize(int value)

public SearchMcpServersRequest.Builder setPageSize(int value)

Optional. The maximum number of search results to return per page. The page size is capped at 100, even if a larger value is specified. A negative value will result in an INVALID_ARGUMENT error. If unspecified or set to 0, a default value of 20 will be used. The server may return fewer results than requested.

int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The pageSize to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setPageToken(String value)

public SearchMcpServersRequest.Builder setPageToken(String value)

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

string page_token = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The pageToken to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setPageTokenBytes(ByteString value)

public SearchMcpServersRequest.Builder setPageTokenBytes(ByteString value)

Optional. If present, retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of all other method parameters, must be identical to those in the previous call.

string page_token = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for pageToken to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setParent(String value)

public SearchMcpServersRequest.Builder setParent(String value)

Required. Parent value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public SearchMcpServersRequest.Builder setParentBytes(ByteString value)

Required. Parent value for SearchMcpServersRequest. Format: projects/{project}/locations/{location}.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setSearchString(String value)

public SearchMcpServersRequest.Builder setSearchString(String value)

Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

Allowed operators: =, :, NOT, AND, OR, and ().

Searchable fields:

Field = : * Keyword Search
mcpServerId Yes Yes Yes Included
name No Yes Yes Included
displayName No Yes Yes Included

Examples:

  • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
  • name:important to find MCP Servers whose name contains important as a word.
  • displayName:works* to find MCP Servers whose display name contains words that start with works.
  • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
  • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.

string search_string = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The searchString to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.

setSearchStringBytes(ByteString value)

public SearchMcpServersRequest.Builder setSearchStringBytes(ByteString value)

Optional. Search criteria used to select the MCP Servers to return. If no search criteria is specified then all accessible MCP Servers will be returned.

Search expressions can be used to restrict results based upon searchable fields, where the operators can be used along with the suffix wildcard symbol *. See instructions for more details.

Allowed operators: =, :, NOT, AND, OR, and ().

Searchable fields:

Field = : * Keyword Search
mcpServerId Yes Yes Yes Included
name No Yes Yes Included
displayName No Yes Yes Included

Examples:

  • mcpServerId="urn:mcp:projects-123:projects:123:locations:us-central1:agentregistry:services:service-id" to find the MCP Server with the specified MCP Server ID.
  • name:important to find MCP Servers whose name contains important as a word.
  • displayName:works* to find MCP Servers whose display name contains words that start with works.
  • planner OR booking to find MCP Servers whose metadata contains the words planner or booking.
  • mcpServerId:service-id AND (displayName:planner OR displayName:booking) to find MCP Servers whose MCP Server ID contains service-id and whose display name contains planner or booking.

string search_string = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for searchString to set.

Returns
Type Description
SearchMcpServersRequest.Builder

This builder for chaining.