Class SearchDocumentChunksRequest.Builder (0.1.0)

public static final class SearchDocumentChunksRequest.Builder extends GeneratedMessage.Builder<SearchDocumentChunksRequest.Builder> implements SearchDocumentChunksRequestOrBuilder

Request message for DeveloperKnowledge.SearchDocumentChunks.

Protobuf type google.developers.knowledge.v1.SearchDocumentChunksRequest

Static Methods

getDescriptor()

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

Methods

build()

public SearchDocumentChunksRequest build()
Returns
Type Description
SearchDocumentChunksRequest

buildPartial()

public SearchDocumentChunksRequest buildPartial()
Returns
Type Description
SearchDocumentChunksRequest

clear()

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

clearFilter()

public SearchDocumentChunksRequest.Builder clearFilter()

Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

While SearchDocumentChunks returns DocumentChunks, the filter is applied to DocumentChunk.document fields.

Supported fields for filtering:

  • data_source (STRING): The source of the document, e.g. docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  • update_time (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  • uri (STRING): The document URI, e.g. https://docs.cloud.google.com/bigquery/docs/tables.

    STRING fields support = (equals) and != (not equals) operators for exact match on the whole string. Partial match, prefix match, and regexp match are not supported.

    TIMESTAMP fields support =, <, <=, >, and >= operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z".

    You can combine expressions using AND, OR, and NOT (or -) logical operators. OR has higher precedence than AND. Use parentheses for explicit precedence grouping.

    Examples:

  • data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com"

  • data_source != "firebase.google.com"
  • update_time < "2024-01-01T00:00:00Z"
  • update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")
  • uri = "https://docs.cloud.google.com/release-notes"

    The filter string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT error.

string filter = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

clearPageSize()

public SearchDocumentChunksRequest.Builder clearPageSize()

Optional. Specifies the maximum number of results to return. The service may return fewer than this value.

If unspecified, at most 5 results will be returned.

The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT error.

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

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

clearPageToken()

public SearchDocumentChunksRequest.Builder clearPageToken()

Optional. Contains a page token, received from a previous SearchDocumentChunks call. Provide this to retrieve the subsequent page.

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

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

clearQuery()

public SearchDocumentChunksRequest.Builder clearQuery()

Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

getDefaultInstanceForType()

public SearchDocumentChunksRequest getDefaultInstanceForType()
Returns
Type Description
SearchDocumentChunksRequest

getDescriptorForType()

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

getFilter()

public String getFilter()

Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

While SearchDocumentChunks returns DocumentChunks, the filter is applied to DocumentChunk.document fields.

Supported fields for filtering:

  • data_source (STRING): The source of the document, e.g. docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  • update_time (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  • uri (STRING): The document URI, e.g. https://docs.cloud.google.com/bigquery/docs/tables.

    STRING fields support = (equals) and != (not equals) operators for exact match on the whole string. Partial match, prefix match, and regexp match are not supported.

    TIMESTAMP fields support =, <, <=, >, and >= operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z".

    You can combine expressions using AND, OR, and NOT (or -) logical operators. OR has higher precedence than AND. Use parentheses for explicit precedence grouping.

    Examples:

  • data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com"

  • data_source != "firebase.google.com"
  • update_time < "2024-01-01T00:00:00Z"
  • update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")
  • uri = "https://docs.cloud.google.com/release-notes"

    The filter string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT error.

string filter = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

While SearchDocumentChunks returns DocumentChunks, the filter is applied to DocumentChunk.document fields.

Supported fields for filtering:

  • data_source (STRING): The source of the document, e.g. docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  • update_time (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  • uri (STRING): The document URI, e.g. https://docs.cloud.google.com/bigquery/docs/tables.

    STRING fields support = (equals) and != (not equals) operators for exact match on the whole string. Partial match, prefix match, and regexp match are not supported.

    TIMESTAMP fields support =, <, <=, >, and >= operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z".

    You can combine expressions using AND, OR, and NOT (or -) logical operators. OR has higher precedence than AND. Use parentheses for explicit precedence grouping.

    Examples:

  • data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com"

  • data_source != "firebase.google.com"
  • update_time < "2024-01-01T00:00:00Z"
  • update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")
  • uri = "https://docs.cloud.google.com/release-notes"

    The filter string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT error.

string filter = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for filter.

getPageSize()

public int getPageSize()

Optional. Specifies the maximum number of results to return. The service may return fewer than this value.

If unspecified, at most 5 results will be returned.

The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT error.

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

Returns
Type Description
int

The pageSize.

getPageToken()

public String getPageToken()

Optional. Contains a page token, received from a previous SearchDocumentChunks call. Provide this to retrieve the subsequent page.

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

Returns
Type Description
String

The pageToken.

getPageTokenBytes()

public ByteString getPageTokenBytes()

Optional. Contains a page token, received from a previous SearchDocumentChunks call. Provide this to retrieve the subsequent page.

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

Returns
Type Description
ByteString

The bytes for pageToken.

getQuery()

public String getQuery()

Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for query.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchDocumentChunksRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setFilter(String value)

public SearchDocumentChunksRequest.Builder setFilter(String value)

Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

While SearchDocumentChunks returns DocumentChunks, the filter is applied to DocumentChunk.document fields.

Supported fields for filtering:

  • data_source (STRING): The source of the document, e.g. docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  • update_time (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  • uri (STRING): The document URI, e.g. https://docs.cloud.google.com/bigquery/docs/tables.

    STRING fields support = (equals) and != (not equals) operators for exact match on the whole string. Partial match, prefix match, and regexp match are not supported.

    TIMESTAMP fields support =, <, <=, >, and >= operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z".

    You can combine expressions using AND, OR, and NOT (or -) logical operators. OR has higher precedence than AND. Use parentheses for explicit precedence grouping.

    Examples:

  • data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com"

  • data_source != "firebase.google.com"
  • update_time < "2024-01-01T00:00:00Z"
  • update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")
  • uri = "https://docs.cloud.google.com/release-notes"

    The filter string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT error.

string filter = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The filter to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setFilterBytes(ByteString value)

public SearchDocumentChunksRequest.Builder setFilterBytes(ByteString value)

Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

While SearchDocumentChunks returns DocumentChunks, the filter is applied to DocumentChunk.document fields.

Supported fields for filtering:

  • data_source (STRING): The source of the document, e.g. docs.cloud.google.com. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  • update_time (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  • uri (STRING): The document URI, e.g. https://docs.cloud.google.com/bigquery/docs/tables.

    STRING fields support = (equals) and != (not equals) operators for exact match on the whole string. Partial match, prefix match, and regexp match are not supported.

    TIMESTAMP fields support =, <, <=, >, and >= operators. Timestamps must be in RFC-3339 format, e.g., "2025-01-01T00:00:00Z".

    You can combine expressions using AND, OR, and NOT (or -) logical operators. OR has higher precedence than AND. Use parentheses for explicit precedence grouping.

    Examples:

  • data_source = "docs.cloud.google.com" OR data_source = "firebase.google.com"

  • data_source != "firebase.google.com"
  • update_time < "2024-01-01T00:00:00Z"
  • update_time >= "2025-01-22T00:00:00Z" AND (data_source = "developer.chrome.com" OR data_source = "web.dev")
  • uri = "https://docs.cloud.google.com/release-notes"

    The filter string must not exceed 500 characters; values longer than 500 characters will result in an INVALID_ARGUMENT error.

string filter = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for filter to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setPageSize(int value)

public SearchDocumentChunksRequest.Builder setPageSize(int value)

Optional. Specifies the maximum number of results to return. The service may return fewer than this value.

If unspecified, at most 5 results will be returned.

The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT error.

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

Parameter
Name Description
value int

The pageSize to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setPageToken(String value)

public SearchDocumentChunksRequest.Builder setPageToken(String value)

Optional. Contains a page token, received from a previous SearchDocumentChunks call. Provide this to retrieve the subsequent page.

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

Parameter
Name Description
value String

The pageToken to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setPageTokenBytes(ByteString value)

public SearchDocumentChunksRequest.Builder setPageTokenBytes(ByteString value)

Optional. Contains a page token, received from a previous SearchDocumentChunks call. Provide this to retrieve the subsequent page.

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

Parameter
Name Description
value ByteString

The bytes for pageToken to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setQuery(String value)

public SearchDocumentChunksRequest.Builder setQuery(String value)

Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The query to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public SearchDocumentChunksRequest.Builder setQueryBytes(ByteString value)

Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?".

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for query to set.

Returns
Type Description
SearchDocumentChunksRequest.Builder

This builder for chaining.