Class FindNeighborsResponse.Neighbor.Builder (3.31.0)

public static final class FindNeighborsResponse.Neighbor.Builder extends GeneratedMessageV3.Builder<FindNeighborsResponse.Neighbor.Builder> implements FindNeighborsResponse.NeighborOrBuilder

A neighbor of the query vector.

Protobuf type google.cloud.aiplatform.v1beta1.FindNeighborsResponse.Neighbor

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FindNeighborsResponse.Neighbor build()
Returns
TypeDescription
FindNeighborsResponse.Neighbor

buildPartial()

public FindNeighborsResponse.Neighbor buildPartial()
Returns
TypeDescription
FindNeighborsResponse.Neighbor

clear()

public FindNeighborsResponse.Neighbor.Builder clear()
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

clearDatapoint()

public FindNeighborsResponse.Neighbor.Builder clearDatapoint()

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

clearDistance()

public FindNeighborsResponse.Neighbor.Builder clearDistance()

The distance between the neighbor and the query vector.

double distance = 2;

Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FindNeighborsResponse.Neighbor.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public FindNeighborsResponse.Neighbor.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

clone()

public FindNeighborsResponse.Neighbor.Builder clone()
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

getDatapoint()

public IndexDatapoint getDatapoint()

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Returns
TypeDescription
IndexDatapoint

The datapoint.

getDatapointBuilder()

public IndexDatapoint.Builder getDatapointBuilder()

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Returns
TypeDescription
IndexDatapoint.Builder

getDatapointOrBuilder()

public IndexDatapointOrBuilder getDatapointOrBuilder()

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Returns
TypeDescription
IndexDatapointOrBuilder

getDefaultInstanceForType()

public FindNeighborsResponse.Neighbor getDefaultInstanceForType()
Returns
TypeDescription
FindNeighborsResponse.Neighbor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDistance()

public double getDistance()

The distance between the neighbor and the query vector.

double distance = 2;

Returns
TypeDescription
double

The distance.

hasDatapoint()

public boolean hasDatapoint()

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Returns
TypeDescription
boolean

Whether the datapoint field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDatapoint(IndexDatapoint value)

public FindNeighborsResponse.Neighbor.Builder mergeDatapoint(IndexDatapoint value)

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Parameter
NameDescription
valueIndexDatapoint
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

mergeFrom(FindNeighborsResponse.Neighbor other)

public FindNeighborsResponse.Neighbor.Builder mergeFrom(FindNeighborsResponse.Neighbor other)
Parameter
NameDescription
otherFindNeighborsResponse.Neighbor
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public FindNeighborsResponse.Neighbor.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FindNeighborsResponse.Neighbor.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

setDatapoint(IndexDatapoint value)

public FindNeighborsResponse.Neighbor.Builder setDatapoint(IndexDatapoint value)

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Parameter
NameDescription
valueIndexDatapoint
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

setDatapoint(IndexDatapoint.Builder builderForValue)

public FindNeighborsResponse.Neighbor.Builder setDatapoint(IndexDatapoint.Builder builderForValue)

The datapoint of the neighbor. Note that full datapoints are returned only when "return_full_datapoint" is set to true. Otherwise, only the "datapoint_id" and "crowding_tag" fields are populated.

.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1;

Parameter
NameDescription
builderForValueIndexDatapoint.Builder
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

setDistance(double value)

public FindNeighborsResponse.Neighbor.Builder setDistance(double value)

The distance between the neighbor and the query vector.

double distance = 2;

Parameter
NameDescription
valuedouble

The distance to set.

Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public FindNeighborsResponse.Neighbor.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final FindNeighborsResponse.Neighbor.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FindNeighborsResponse.Neighbor.Builder
Overrides