Class SearchResponse.SearchResult.Builder (0.48.0)

public static final class SearchResponse.SearchResult.Builder extends GeneratedMessageV3.Builder<SearchResponse.SearchResult.Builder> implements SearchResponse.SearchResultOrBuilder

Represents the search results.

Protobuf type google.cloud.discoveryengine.v1.SearchResponse.SearchResult

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.SearchResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

build()

public SearchResponse.SearchResult build()
Returns
Type Description
SearchResponse.SearchResult

buildPartial()

public SearchResponse.SearchResult buildPartial()
Returns
Type Description
SearchResponse.SearchResult

clear()

public SearchResponse.SearchResult.Builder clear()
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

clearChunk()

public SearchResponse.SearchResult.Builder clearChunk()

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Returns
Type Description
SearchResponse.SearchResult.Builder

clearDocument()

public SearchResponse.SearchResult.Builder clearDocument()

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
SearchResponse.SearchResult.Builder

clearField(Descriptors.FieldDescriptor field)

public SearchResponse.SearchResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

clearId()

public SearchResponse.SearchResult.Builder clearId()

Document.id of the searched Document.

string id = 1;

Returns
Type Description
SearchResponse.SearchResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchResponse.SearchResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

clone()

public SearchResponse.SearchResult.Builder clone()
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

getChunk()

public Chunk getChunk()

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Returns
Type Description
Chunk

The chunk.

getChunkBuilder()

public Chunk.Builder getChunkBuilder()

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Returns
Type Description
Chunk.Builder

getChunkOrBuilder()

public ChunkOrBuilder getChunkOrBuilder()

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Returns
Type Description
ChunkOrBuilder

getDefaultInstanceForType()

public SearchResponse.SearchResult getDefaultInstanceForType()
Returns
Type Description
SearchResponse.SearchResult

getDescriptorForType()

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

getDocument()

public Document getDocument()

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
DocumentOrBuilder

getId()

public String getId()

Document.id of the searched Document.

string id = 1;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Document.id of the searched Document.

string id = 1;

Returns
Type Description
ByteString

The bytes for id.

hasChunk()

public boolean hasChunk()

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Returns
Type Description
boolean

Whether the chunk field is set.

hasDocument()

public boolean hasDocument()

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeChunk(Chunk value)

public SearchResponse.SearchResult.Builder mergeChunk(Chunk value)

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Parameter
Name Description
value Chunk
Returns
Type Description
SearchResponse.SearchResult.Builder

mergeDocument(Document value)

public SearchResponse.SearchResult.Builder mergeDocument(Document value)

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Parameter
Name Description
value Document
Returns
Type Description
SearchResponse.SearchResult.Builder

mergeFrom(SearchResponse.SearchResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.SearchResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

setChunk(Chunk value)

public SearchResponse.SearchResult.Builder setChunk(Chunk value)

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Parameter
Name Description
value Chunk
Returns
Type Description
SearchResponse.SearchResult.Builder

setChunk(Chunk.Builder builderForValue)

public SearchResponse.SearchResult.Builder setChunk(Chunk.Builder builderForValue)

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

.google.cloud.discoveryengine.v1.Chunk chunk = 18;

Parameter
Name Description
builderForValue Chunk.Builder
Returns
Type Description
SearchResponse.SearchResult.Builder

setDocument(Document value)

public SearchResponse.SearchResult.Builder setDocument(Document value)

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Parameter
Name Description
value Document
Returns
Type Description
SearchResponse.SearchResult.Builder

setDocument(Document.Builder builderForValue)

public SearchResponse.SearchResult.Builder setDocument(Document.Builder builderForValue)

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

.google.cloud.discoveryengine.v1.Document document = 2;

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
SearchResponse.SearchResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.SearchResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

setId(String value)

public SearchResponse.SearchResult.Builder setId(String value)

Document.id of the searched Document.

string id = 1;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
SearchResponse.SearchResult.Builder

This builder for chaining.

setIdBytes(ByteString value)

public SearchResponse.SearchResult.Builder setIdBytes(ByteString value)

Document.id of the searched Document.

string id = 1;

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
SearchResponse.SearchResult.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SearchResponse.SearchResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.SearchResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchResponse.SearchResult.Builder
Overrides