Class VertexRanker.Builder (0.15.0)

public static final class VertexRanker.Builder extends GeneratedMessage.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

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

clearModel()

public VertexRanker.Builder clearModel()

Required. The model used for ranking documents. The list of available models is described in https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models. Currently, only semantic-ranker-fast@latest is supported.

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

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

clearRecordSpec()

public VertexRanker.Builder clearRecordSpec()
Returns
Type Description
VertexRanker.Builder

clearTextRecordSpec()

public VertexRanker.Builder clearTextRecordSpec()

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Returns
Type Description
VertexRanker.Builder

clearTopN()

public VertexRanker.Builder clearTopN()

Required. The number of documents to be processed for ranking.

int32 top_n = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
VertexRanker.Builder

This builder for chaining.

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. The list of available models is described in https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models. Currently, only semantic-ranker-fast@latest is supported.

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. The list of available models is described in https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models. Currently, only semantic-ranker-fast@latest is supported.

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

Returns
Type Description
ByteString

The bytes for model.

getRecordSpecCase()

public VertexRanker.RecordSpecCase getRecordSpecCase()
Returns
Type Description
VertexRanker.RecordSpecCase

getTextRecordSpec()

public VertexRanker.TextRecordSpec getTextRecordSpec()

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Returns
Type Description
VertexRanker.TextRecordSpec

The textRecordSpec.

getTextRecordSpecBuilder()

public VertexRanker.TextRecordSpec.Builder getTextRecordSpecBuilder()

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Returns
Type Description
VertexRanker.TextRecordSpec.Builder

getTextRecordSpecOrBuilder()

public VertexRanker.TextRecordSpecOrBuilder getTextRecordSpecOrBuilder()

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Returns
Type Description
VertexRanker.TextRecordSpecOrBuilder

getTopN()

public int getTopN()

Required. The number of documents to be processed for ranking.

int32 top_n = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The topN.

hasTextRecordSpec()

public boolean hasTextRecordSpec()

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Returns
Type Description
boolean

Whether the textRecordSpec field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.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

mergeTextRecordSpec(VertexRanker.TextRecordSpec value)

public VertexRanker.Builder mergeTextRecordSpec(VertexRanker.TextRecordSpec value)

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Parameter
Name Description
value VertexRanker.TextRecordSpec
Returns
Type Description
VertexRanker.Builder

setModel(String value)

public VertexRanker.Builder setModel(String value)

Required. The model used for ranking documents. The list of available models is described in https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models. Currently, only semantic-ranker-fast@latest is supported.

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. The list of available models is described in https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models. Currently, only semantic-ranker-fast@latest is supported.

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.

setTextRecordSpec(VertexRanker.TextRecordSpec value)

public VertexRanker.Builder setTextRecordSpec(VertexRanker.TextRecordSpec value)

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Parameter
Name Description
value VertexRanker.TextRecordSpec
Returns
Type Description
VertexRanker.Builder

setTextRecordSpec(VertexRanker.TextRecordSpec.Builder builderForValue)

public VertexRanker.Builder setTextRecordSpec(VertexRanker.TextRecordSpec.Builder builderForValue)

The record spec for text search.

.google.cloud.vectorsearch.v1beta.VertexRanker.TextRecordSpec text_record_spec = 6;

Parameter
Name Description
builderForValue VertexRanker.TextRecordSpec.Builder
Returns
Type Description
VertexRanker.Builder

setTopN(int value)

public VertexRanker.Builder setTopN(int value)

Required. The number of documents to be processed for ranking.

int32 top_n = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The topN to set.

Returns
Type Description
VertexRanker.Builder

This builder for chaining.