Class NearestNeighbors.Neighbor (3.41.0)

public static final class NearestNeighbors.Neighbor extends GeneratedMessageV3 implements NearestNeighbors.NeighborOrBuilder

A neighbor of the query vector.

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

Static Fields

DISTANCE_FIELD_NUMBER

public static final int DISTANCE_FIELD_NUMBER
Field Value
TypeDescription
int

ENTITY_ID_FIELD_NUMBER

public static final int ENTITY_ID_FIELD_NUMBER
Field Value
TypeDescription
int

ENTITY_KEY_VALUES_FIELD_NUMBER

public static final int ENTITY_KEY_VALUES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NearestNeighbors.Neighbor getDefaultInstance()
Returns
TypeDescription
NearestNeighbors.Neighbor

getDescriptor()

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

newBuilder()

public static NearestNeighbors.Neighbor.Builder newBuilder()
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

newBuilder(NearestNeighbors.Neighbor prototype)

public static NearestNeighbors.Neighbor.Builder newBuilder(NearestNeighbors.Neighbor prototype)
Parameter
NameDescription
prototypeNearestNeighbors.Neighbor
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

parseDelimitedFrom(InputStream input)

public static NearestNeighbors.Neighbor parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static NearestNeighbors.Neighbor parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NearestNeighbors.Neighbor parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NearestNeighbors.Neighbor parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static NearestNeighbors.Neighbor parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static NearestNeighbors.Neighbor parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NearestNeighbors.Neighbor parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Neighbor
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<NearestNeighbors.Neighbor> parser()
Returns
TypeDescription
Parser<Neighbor>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

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

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

Returns
TypeDescription
FetchFeatureValuesResponse

The entityKeyValues.

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
TypeDescription
FetchFeatureValuesResponseOrBuilder

getParserForType()

public Parser<NearestNeighbors.Neighbor> getParserForType()
Returns
TypeDescription
Parser<Neighbor>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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
TypeDescription
boolean

Whether the entityKeyValues field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public NearestNeighbors.Neighbor.Builder newBuilderForType()
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected NearestNeighbors.Neighbor.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public NearestNeighbors.Neighbor.Builder toBuilder()
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException