Class NearestNeighbors.Neighbor.Builder (3.41.0)

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

A neighbor of the query vector.

Protobuf type google.cloud.aiplatform.v1.NearestNeighbors.Neighbor

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

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

clearDistance()

public NearestNeighbors.Neighbor.Builder clearDistance()

The distance between the neighbor and the query vector.

double distance = 2;

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

This builder for chaining.

clearEntityId()

public NearestNeighbors.Neighbor.Builder clearEntityId()

The id of the similar entity.

string entity_id = 1;

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

This builder for chaining.

clearEntityKeyValues()

public NearestNeighbors.Neighbor.Builder clearEntityKeyValues()

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public NearestNeighbors.Neighbor getDefaultInstanceForType()
Returns
TypeDescription
NearestNeighbors.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.

getEntityId()

public String getEntityId()

The id of the similar entity.

string entity_id = 1;

Returns
TypeDescription
String

The entityId.

getEntityIdBytes()

public ByteString getEntityIdBytes()

The id of the similar entity.

string entity_id = 1;

Returns
TypeDescription
ByteString

The bytes for entityId.

getEntityKeyValues()

public FetchFeatureValuesResponse getEntityKeyValues()

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
TypeDescription
FetchFeatureValuesResponse

The entityKeyValues.

getEntityKeyValuesBuilder()

public FetchFeatureValuesResponse.Builder getEntityKeyValuesBuilder()

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
TypeDescription
FetchFeatureValuesResponse.Builder

getEntityKeyValuesOrBuilder()

public FetchFeatureValuesResponseOrBuilder getEntityKeyValuesOrBuilder()

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
TypeDescription
FetchFeatureValuesResponseOrBuilder

hasEntityKeyValues()

public boolean hasEntityKeyValues()

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
TypeDescription
boolean

Whether the entityKeyValues field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeEntityKeyValues(FetchFeatureValuesResponse value)

public NearestNeighbors.Neighbor.Builder mergeEntityKeyValues(FetchFeatureValuesResponse value)

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Parameter
NameDescription
valueFetchFeatureValuesResponse
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

mergeFrom(NearestNeighbors.Neighbor other)

public NearestNeighbors.Neighbor.Builder mergeFrom(NearestNeighbors.Neighbor other)
Parameter
NameDescription
otherNearestNeighbors.Neighbor
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDistance(double value)

public NearestNeighbors.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
NearestNeighbors.Neighbor.Builder

This builder for chaining.

setEntityId(String value)

public NearestNeighbors.Neighbor.Builder setEntityId(String value)

The id of the similar entity.

string entity_id = 1;

Parameter
NameDescription
valueString

The entityId to set.

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

This builder for chaining.

setEntityIdBytes(ByteString value)

public NearestNeighbors.Neighbor.Builder setEntityIdBytes(ByteString value)

The id of the similar entity.

string entity_id = 1;

Parameter
NameDescription
valueByteString

The bytes for entityId to set.

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

This builder for chaining.

setEntityKeyValues(FetchFeatureValuesResponse value)

public NearestNeighbors.Neighbor.Builder setEntityKeyValues(FetchFeatureValuesResponse value)

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Parameter
NameDescription
valueFetchFeatureValuesResponse
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

setEntityKeyValues(FetchFeatureValuesResponse.Builder builderForValue)

public NearestNeighbors.Neighbor.Builder setEntityKeyValues(FetchFeatureValuesResponse.Builder builderForValue)

The attributes of the neighbor, e.g. filters, crowding and metadata Note that full entities are returned only when "return_full_entity" is set to true. Otherwise, only the "entity_id" and "distance" fields are populated.

.google.cloud.aiplatform.v1.FetchFeatureValuesResponse entity_key_values = 3;

Parameter
NameDescription
builderForValueFetchFeatureValuesResponse.Builder
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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