Class VertexEmbeddingConfig.Builder (0.1.0)

public static final class VertexEmbeddingConfig.Builder extends GeneratedMessageV3.Builder<VertexEmbeddingConfig.Builder> implements VertexEmbeddingConfigOrBuilder

Message describing the configuration for generating embeddings for a vector field using Vertex AI embeddings API.

Protobuf type google.cloud.vectorsearch.v1beta.VertexEmbeddingConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public VertexEmbeddingConfig build()
Returns
Type Description
VertexEmbeddingConfig

buildPartial()

public VertexEmbeddingConfig buildPartial()
Returns
Type Description
VertexEmbeddingConfig

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearModelId()

public VertexEmbeddingConfig.Builder clearModelId()

Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.

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

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTaskType()

public VertexEmbeddingConfig.Builder clearTaskType()

Required. Required: Task type for the embeddings.

.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

clearTextTemplate()

public VertexEmbeddingConfig.Builder clearTextTemplate()

Required. Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}"".

string text_template = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

clone()

public VertexEmbeddingConfig.Builder clone()
Returns
Type Description
VertexEmbeddingConfig.Builder
Overrides

getDefaultInstanceForType()

public VertexEmbeddingConfig getDefaultInstanceForType()
Returns
Type Description
VertexEmbeddingConfig

getDescriptorForType()

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

getModelId()

public String getModelId()

Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.

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

Returns
Type Description
String

The modelId.

getModelIdBytes()

public ByteString getModelIdBytes()

Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.

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

Returns
Type Description
ByteString

The bytes for modelId.

getTaskType()

public EmbeddingTaskType getTaskType()

Required. Required: Task type for the embeddings.

.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
EmbeddingTaskType

The taskType.

getTaskTypeValue()

public int getTaskTypeValue()

Required. Required: Task type for the embeddings.

.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for taskType.

getTextTemplate()

public String getTextTemplate()

Required. Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}"".

string text_template = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The textTemplate.

getTextTemplateBytes()

public ByteString getTextTemplateBytes()

Required. Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}"".

string text_template = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for textTemplate.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(VertexEmbeddingConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setModelId(String value)

public VertexEmbeddingConfig.Builder setModelId(String value)

Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.

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

Parameter
Name Description
value String

The modelId to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

setModelIdBytes(ByteString value)

public VertexEmbeddingConfig.Builder setModelIdBytes(ByteString value)

Required. Required: ID of the embedding model to use. See https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models for the list of supported models.

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

Parameter
Name Description
value ByteString

The bytes for modelId to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

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

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

setTaskType(EmbeddingTaskType value)

public VertexEmbeddingConfig.Builder setTaskType(EmbeddingTaskType value)

Required. Required: Task type for the embeddings.

.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value EmbeddingTaskType

The taskType to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

setTaskTypeValue(int value)

public VertexEmbeddingConfig.Builder setTaskTypeValue(int value)

Required. Required: Task type for the embeddings.

.google.cloud.vectorsearch.v1beta.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for taskType to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

setTextTemplate(String value)

public VertexEmbeddingConfig.Builder setTextTemplate(String value)

Required. Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}"".

string text_template = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The textTemplate to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

setTextTemplateBytes(ByteString value)

public VertexEmbeddingConfig.Builder setTextTemplateBytes(ByteString value)

Required. Required: Text template for the input to the model. The template must contain one or more references to fields in the DataObject, e.g.: "Movie Title: {title} ---- Movie Plot: {plot}"".

string text_template = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for textTemplate to set.

Returns
Type Description
VertexEmbeddingConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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