Class NearestNeighbors.Neighbor.Builder (3.48.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public NearestNeighbors.Neighbor build()
Returns
Type Description
NearestNeighbors.Neighbor

buildPartial()

public NearestNeighbors.Neighbor buildPartial()
Returns
Type Description
NearestNeighbors.Neighbor

clear()

public NearestNeighbors.Neighbor.Builder clear()
Returns
Type Description
NearestNeighbors.Neighbor.Builder
Overrides

clearDistance()

public NearestNeighbors.Neighbor.Builder clearDistance()

The distance between the neighbor and the query vector.

double distance = 2;

Returns
Type Description
NearestNeighbors.Neighbor.Builder

This builder for chaining.

clearEntityId()

public NearestNeighbors.Neighbor.Builder clearEntityId()

The id of the similar entity.

string entity_id = 1;

Returns
Type Description
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
Type Description
NearestNeighbors.Neighbor.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public NearestNeighbors.Neighbor.Builder clone()
Returns
Type Description
NearestNeighbors.Neighbor.Builder
Overrides

getDefaultInstanceForType()

public NearestNeighbors.Neighbor getDefaultInstanceForType()
Returns
Type Description
NearestNeighbors.Neighbor

getDescriptorForType()

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

getDistance()

public double getDistance()

The distance between the neighbor and the query vector.

double distance = 2;

Returns
Type Description
double

The distance.

getEntityId()

public String getEntityId()

The id of the similar entity.

string entity_id = 1;

Returns
Type Description
String

The entityId.

getEntityIdBytes()

public ByteString getEntityIdBytes()

The id of the similar entity.

string entity_id = 1;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the entityKeyValues field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value FetchFeatureValuesResponse
Returns
Type Description
NearestNeighbors.Neighbor.Builder

mergeFrom(NearestNeighbors.Neighbor other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighbors.Neighbor.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value double

The distance to set.

Returns
Type Description
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
Name Description
value String

The entityId to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for entityId to set.

Returns
Type Description
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
Name Description
value FetchFeatureValuesResponse
Returns
Type Description
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
Name Description
builderForValue FetchFeatureValuesResponse.Builder
Returns
Type Description
NearestNeighbors.Neighbor.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighbors.Neighbor.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
NearestNeighbors.Neighbor.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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