Class SearchRequest.EmbeddingSpec.Builder (0.45.0)

public static final class SearchRequest.EmbeddingSpec.Builder extends GeneratedMessageV3.Builder<SearchRequest.EmbeddingSpec.Builder> implements SearchRequest.EmbeddingSpecOrBuilder

The specification that uses customized query embedding vector to do semantic document retrieval.

Protobuf type google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec

Static Methods

getDescriptor()

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

Methods

addAllEmbeddingVectors(Iterable<? extends SearchRequest.EmbeddingSpec.EmbeddingVector> values)

public SearchRequest.EmbeddingSpec.Builder addAllEmbeddingVectors(Iterable<? extends SearchRequest.EmbeddingSpec.EmbeddingVector> values)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector>
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

addEmbeddingVectors(SearchRequest.EmbeddingSpec.EmbeddingVector value)

public SearchRequest.EmbeddingSpec.Builder addEmbeddingVectors(SearchRequest.EmbeddingSpec.EmbeddingVector value)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
value SearchRequest.EmbeddingSpec.EmbeddingVector
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

addEmbeddingVectors(SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

public SearchRequest.EmbeddingSpec.Builder addEmbeddingVectors(SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
builderForValue SearchRequest.EmbeddingSpec.EmbeddingVector.Builder
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

addEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector value)

public SearchRequest.EmbeddingSpec.Builder addEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector value)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameters
Name Description
index int
value SearchRequest.EmbeddingSpec.EmbeddingVector
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

addEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

public SearchRequest.EmbeddingSpec.Builder addEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameters
Name Description
index int
builderForValue SearchRequest.EmbeddingSpec.EmbeddingVector.Builder
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

addEmbeddingVectorsBuilder()

public SearchRequest.EmbeddingSpec.EmbeddingVector.Builder addEmbeddingVectorsBuilder()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
SearchRequest.EmbeddingSpec.EmbeddingVector.Builder

addEmbeddingVectorsBuilder(int index)

public SearchRequest.EmbeddingSpec.EmbeddingVector.Builder addEmbeddingVectorsBuilder(int index)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.EmbeddingSpec.EmbeddingVector.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SearchRequest.EmbeddingSpec build()
Returns
Type Description
SearchRequest.EmbeddingSpec

buildPartial()

public SearchRequest.EmbeddingSpec buildPartial()
Returns
Type Description
SearchRequest.EmbeddingSpec

clear()

public SearchRequest.EmbeddingSpec.Builder clear()
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides

clearEmbeddingVectors()

public SearchRequest.EmbeddingSpec.Builder clearEmbeddingVectors()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

clearField(Descriptors.FieldDescriptor field)

public SearchRequest.EmbeddingSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchRequest.EmbeddingSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides

clone()

public SearchRequest.EmbeddingSpec.Builder clone()
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides

getDefaultInstanceForType()

public SearchRequest.EmbeddingSpec getDefaultInstanceForType()
Returns
Type Description
SearchRequest.EmbeddingSpec

getDescriptorForType()

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

getEmbeddingVectors(int index)

public SearchRequest.EmbeddingSpec.EmbeddingVector getEmbeddingVectors(int index)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.EmbeddingSpec.EmbeddingVector

getEmbeddingVectorsBuilder(int index)

public SearchRequest.EmbeddingSpec.EmbeddingVector.Builder getEmbeddingVectorsBuilder(int index)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.EmbeddingSpec.EmbeddingVector.Builder

getEmbeddingVectorsBuilderList()

public List<SearchRequest.EmbeddingSpec.EmbeddingVector.Builder> getEmbeddingVectorsBuilderList()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
List<Builder>

getEmbeddingVectorsCount()

public int getEmbeddingVectorsCount()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
int

getEmbeddingVectorsList()

public List<SearchRequest.EmbeddingSpec.EmbeddingVector> getEmbeddingVectorsList()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
List<EmbeddingVector>

getEmbeddingVectorsOrBuilder(int index)

public SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder getEmbeddingVectorsOrBuilder(int index)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder

getEmbeddingVectorsOrBuilderList()

public List<? extends SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder> getEmbeddingVectorsOrBuilderList()

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SearchRequest.EmbeddingSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchRequest.EmbeddingSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides

removeEmbeddingVectors(int index)

public SearchRequest.EmbeddingSpec.Builder removeEmbeddingVectors(int index)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameter
Name Description
index int
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

setEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector value)

public SearchRequest.EmbeddingSpec.Builder setEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector value)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameters
Name Description
index int
value SearchRequest.EmbeddingSpec.EmbeddingVector
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

setEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

public SearchRequest.EmbeddingSpec.Builder setEmbeddingVectors(int index, SearchRequest.EmbeddingSpec.EmbeddingVector.Builder builderForValue)

The embedding vector used for retrieval. Limit to 1.

repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1;

Parameters
Name Description
index int
builderForValue SearchRequest.EmbeddingSpec.EmbeddingVector.Builder
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchRequest.EmbeddingSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchRequest.EmbeddingSpec.Builder
Overrides