Class VertexRanker.Builder (0.1.0)

public static final class VertexRanker.Builder extends GeneratedMessageV3.Builder<VertexRanker.Builder> implements VertexRankerOrBuilder

Defines a ranker using the Vertex AI ranking service. See https://cloud.google.com/generative-ai-app-builder/docs/ranking for details.

Protobuf type google.cloud.vectorsearch.v1beta.VertexRanker

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public VertexRanker build()
Returns
Type Description
VertexRanker

buildPartial()

public VertexRanker buildPartial()
Returns
Type Description
VertexRanker

clear()

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

clearContentTemplate()

public VertexRanker.Builder clearContentTemplate()

Optional. The template used to generate the record's content.

string content_template = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearModel()

public VertexRanker.Builder clearModel()

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

string model = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQuery()

public VertexRanker.Builder clearQuery()

Required. The query against which the records are ranked and scored.

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

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

clearTitleTemplate()

public VertexRanker.Builder clearTitleTemplate()

Optional. The template used to generate the record's title.

string title_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

clone()

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

getContentTemplate()

public String getContentTemplate()

Optional. The template used to generate the record's content.

string content_template = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The contentTemplate.

getContentTemplateBytes()

public ByteString getContentTemplateBytes()

Optional. The template used to generate the record's content.

string content_template = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for contentTemplate.

getDefaultInstanceForType()

public VertexRanker getDefaultInstanceForType()
Returns
Type Description
VertexRanker

getDescriptorForType()

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

getModel()

public String getModel()

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

string model = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

string model = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for model.

getQuery()

public String getQuery()

Required. The query against which the records are ranked and scored.

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

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Required. The query against which the records are ranked and scored.

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

Returns
Type Description
ByteString

The bytes for query.

getTitleTemplate()

public String getTitleTemplate()

Optional. The template used to generate the record's title.

string title_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The titleTemplate.

getTitleTemplateBytes()

public ByteString getTitleTemplateBytes()

Optional. The template used to generate the record's title.

string title_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for titleTemplate.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(VertexRanker other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContentTemplate(String value)

public VertexRanker.Builder setContentTemplate(String value)

Optional. The template used to generate the record's content.

string content_template = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The contentTemplate to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setContentTemplateBytes(ByteString value)

public VertexRanker.Builder setContentTemplateBytes(ByteString value)

Optional. The template used to generate the record's content.

string content_template = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for contentTemplate to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setModel(String value)

public VertexRanker.Builder setModel(String value)

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

string model = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The model to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setModelBytes(ByteString value)

public VertexRanker.Builder setModelBytes(ByteString value)

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

string model = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for model to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setQuery(String value)

public VertexRanker.Builder setQuery(String value)

Required. The query against which the records are ranked and scored.

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

Parameter
Name Description
value String

The query to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public VertexRanker.Builder setQueryBytes(ByteString value)

Required. The query against which the records are ranked and scored.

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

Parameter
Name Description
value ByteString

The bytes for query to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

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

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

setTitleTemplate(String value)

public VertexRanker.Builder setTitleTemplate(String value)

Optional. The template used to generate the record's title.

string title_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The titleTemplate to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setTitleTemplateBytes(ByteString value)

public VertexRanker.Builder setTitleTemplateBytes(ByteString value)

Optional. The template used to generate the record's title.

string title_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for titleTemplate to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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