Class FindNeighborsResponse.Neighbor.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
com.google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor.Builder
All Implemented Interfaces:
FindNeighborsResponse.NeighborOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
FindNeighborsResponse.Neighbor

public static final class FindNeighborsResponse.Neighbor.Builder extends com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder> implements FindNeighborsResponse.NeighborOrBuilder
 A neighbor of the query vector.
 
Protobuf type google.cloud.aiplatform.v1.FindNeighborsResponse.Neighbor
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
    • getDefaultInstanceForType

      public FindNeighborsResponse.Neighbor getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public FindNeighborsResponse.Neighbor buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public FindNeighborsResponse.Neighbor.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
    • mergeFrom

      public FindNeighborsResponse.Neighbor.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FindNeighborsResponse.Neighbor.Builder>
      Throws:
      IOException
    • 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.v1.IndexDatapoint datapoint = 1;
      Specified by:
      hasDatapoint in interface FindNeighborsResponse.NeighborOrBuilder
      Returns:
      Whether the datapoint field is set.
    • 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.v1.IndexDatapoint datapoint = 1;
      Specified by:
      getDatapoint in interface FindNeighborsResponse.NeighborOrBuilder
      Returns:
      The datapoint.
    • setDatapoint

       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.v1.IndexDatapoint datapoint = 1;
    • setDatapoint

      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.v1.IndexDatapoint datapoint = 1;
    • mergeDatapoint

       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.v1.IndexDatapoint datapoint = 1;
    • 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.v1.IndexDatapoint datapoint = 1;
    • 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.v1.IndexDatapoint datapoint = 1;
    • 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.v1.IndexDatapoint datapoint = 1;
      Specified by:
      getDatapointOrBuilder in interface FindNeighborsResponse.NeighborOrBuilder
    • getDistance

      public double getDistance()
       The distance between the neighbor and the dense embedding query.
       
      double distance = 2;
      Specified by:
      getDistance in interface FindNeighborsResponse.NeighborOrBuilder
      Returns:
      The distance.
    • setDistance

      public FindNeighborsResponse.Neighbor.Builder setDistance(double value)
       The distance between the neighbor and the dense embedding query.
       
      double distance = 2;
      Parameters:
      value - The distance to set.
      Returns:
      This builder for chaining.
    • clearDistance

       The distance between the neighbor and the dense embedding query.
       
      double distance = 2;
      Returns:
      This builder for chaining.
    • getSparseDistance

      public double getSparseDistance()
       The distance between the neighbor and the query sparse_embedding.
       
      double sparse_distance = 3;
      Specified by:
      getSparseDistance in interface FindNeighborsResponse.NeighborOrBuilder
      Returns:
      The sparseDistance.
    • setSparseDistance

      public FindNeighborsResponse.Neighbor.Builder setSparseDistance(double value)
       The distance between the neighbor and the query sparse_embedding.
       
      double sparse_distance = 3;
      Parameters:
      value - The sparseDistance to set.
      Returns:
      This builder for chaining.
    • clearSparseDistance

      public FindNeighborsResponse.Neighbor.Builder clearSparseDistance()
       The distance between the neighbor and the query sparse_embedding.
       
      double sparse_distance = 3;
      Returns:
      This builder for chaining.