Class SearchResponse.SearchResult.Builder (0.29.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.v1alpha.SearchResponse.SearchResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.SearchResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

build()

public SearchResponse.SearchResult build()
Returns
TypeDescription
SearchResponse.SearchResult

buildPartial()

public SearchResponse.SearchResult buildPartial()
Returns
TypeDescription
SearchResponse.SearchResult

clear()

public SearchResponse.SearchResult.Builder clear()
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

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

Returns
TypeDescription
SearchResponse.SearchResult.Builder

clearField(Descriptors.FieldDescriptor field)

public SearchResponse.SearchResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

clearId()

public SearchResponse.SearchResult.Builder clearId()

Document.id of the searched Document.

string id = 1;

Returns
TypeDescription
SearchResponse.SearchResult.Builder

This builder for chaining.

clearModelScores()

public SearchResponse.SearchResult.Builder clearModelScores()
Returns
TypeDescription
SearchResponse.SearchResult.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchResponse.SearchResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

clone()

public SearchResponse.SearchResult.Builder clone()
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

containsModelScores(String key)

public boolean containsModelScores(String key)

Google provided available scores.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public SearchResponse.SearchResult getDefaultInstanceForType()
Returns
TypeDescription
SearchResponse.SearchResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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.v1alpha.Document document = 2;

Returns
TypeDescription
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.v1alpha.Document document = 2;

Returns
TypeDescription
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.v1alpha.Document document = 2;

Returns
TypeDescription
DocumentOrBuilder

getId()

public String getId()

Document.id of the searched Document.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Document.id of the searched Document.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getModelScores() (deprecated)

public Map<String,DoubleList> getModelScores()

Use #getModelScoresMap() instead.

Returns
TypeDescription
Map<String,DoubleList>

getModelScoresCount()

public int getModelScoresCount()

Google provided available scores.

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

Returns
TypeDescription
int

getModelScoresMap()

public Map<String,DoubleList> getModelScoresMap()

Google provided available scores.

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

Returns
TypeDescription
Map<String,DoubleList>

getModelScoresOrDefault(String key, DoubleList defaultValue)

public DoubleList getModelScoresOrDefault(String key, DoubleList defaultValue)

Google provided available scores.

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

Parameters
NameDescription
keyString
defaultValueDoubleList
Returns
TypeDescription
DoubleList

getModelScoresOrThrow(String key)

public DoubleList getModelScoresOrThrow(String key)

Google provided available scores.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
DoubleList

getMutableModelScores() (deprecated)

public Map<String,DoubleList> getMutableModelScores()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,DoubleList>

hasDocument()

public boolean hasDocument()

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

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

Returns
TypeDescription
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

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

Parameter
NameDescription
valueDocument
Returns
TypeDescription
SearchResponse.SearchResult.Builder

mergeFrom(SearchResponse.SearchResult other)

public SearchResponse.SearchResult.Builder mergeFrom(SearchResponse.SearchResult other)
Parameter
NameDescription
otherSearchResponse.SearchResult
Returns
TypeDescription
SearchResponse.SearchResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchResponse.SearchResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SearchResponse.SearchResult.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.SearchResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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.v1alpha.DoubleList> model_scores = 4;

Parameter
NameDescription
valuesMap<String,DoubleList>
Returns
TypeDescription
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.v1alpha.DoubleList> model_scores = 4;

Parameters
NameDescription
keyString
valueDoubleList
Returns
TypeDescription
SearchResponse.SearchResult.Builder

removeModelScores(String key)

public SearchResponse.SearchResult.Builder removeModelScores(String key)

Google provided available scores.

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

Parameter
NameDescription
keyString
Returns
TypeDescription
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.v1alpha.Document document = 2;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
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.v1alpha.Document document = 2;

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
SearchResponse.SearchResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SearchResponse.SearchResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

setId(String value)

public SearchResponse.SearchResult.Builder setId(String value)

Document.id of the searched Document.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchResponse.SearchResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SearchResponse.SearchResult.Builder
Overrides