Class SearchResponse.SearchResult.Builder (0.51.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.v1beta.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.v1beta.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.v1beta.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.

clearModelScores()

public SearchResponse.SearchResult.Builder clearModelScores()
Returns
Type Description
SearchResponse.SearchResult.Builder

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

containsModelScores(String key)

public boolean containsModelScores(String key)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.

getModelScores() (deprecated)

public Map<String,DoubleList> getModelScores()

Use #getModelScoresMap() instead.

Returns
Type Description
Map<String,DoubleList>

getModelScoresCount()

public int getModelScoresCount()

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Returns
Type Description
int

getModelScoresMap()

public Map<String,DoubleList> getModelScoresMap()

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Returns
Type Description
Map<String,DoubleList>

getModelScoresOrDefault(String key, DoubleList defaultValue)

public DoubleList getModelScoresOrDefault(String key, DoubleList defaultValue)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameters
Name Description
key String
defaultValue DoubleList
Returns
Type Description
DoubleList

getModelScoresOrThrow(String key)

public DoubleList getModelScoresOrThrow(String key)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameter
Name Description
key String
Returns
Type Description
DoubleList

getMutableModelScores() (deprecated)

public Map<String,DoubleList> getMutableModelScores()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,DoubleList>

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.v1beta.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.v1beta.Document document = 2;

Returns
Type Description
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

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.v1beta.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.v1beta.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

putAllModelScores(Map<String,DoubleList> values)

public SearchResponse.SearchResult.Builder putAllModelScores(Map<String,DoubleList> values)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameter
Name Description
values Map<String,DoubleList>
Returns
Type Description
SearchResponse.SearchResult.Builder

putModelScores(String key, DoubleList value)

public SearchResponse.SearchResult.Builder putModelScores(String key, DoubleList value)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameters
Name Description
key String
value DoubleList
Returns
Type Description
SearchResponse.SearchResult.Builder

putModelScoresBuilderIfAbsent(String key)

public DoubleList.Builder putModelScoresBuilderIfAbsent(String key)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameter
Name Description
key String
Returns
Type Description
DoubleList.Builder

removeModelScores(String key)

public SearchResponse.SearchResult.Builder removeModelScores(String key)

Google provided available scores.

map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4;

Parameter
Name Description
key String
Returns
Type Description
SearchResponse.SearchResult.Builder

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.v1beta.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.v1beta.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.v1beta.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.v1beta.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