Class NearestNeighbors.Neighbor.Builder (3.84.0)

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

A neighbor of the query vector.

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

Static Methods

getDescriptor()

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

Methods

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.v1beta1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
Type Description
NearestNeighbors.Neighbor.Builder

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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.FetchFeatureValuesResponse entity_key_values = 3;

Returns
Type Description
boolean

Whether the entityKeyValues field is set.

internalGetFieldAccessorTable()

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

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.v1beta1.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.v1beta1.FetchFeatureValuesResponse entity_key_values = 3;

Parameter
Name Description
builderForValue FetchFeatureValuesResponse.Builder
Returns
Type Description
NearestNeighbors.Neighbor.Builder