Class NearestNeighborQuery

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.NearestNeighborQuery
All Implemented Interfaces:
NearestNeighborQueryOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class NearestNeighborQuery extends com.google.protobuf.GeneratedMessage implements NearestNeighborQueryOrBuilder
 A query to find a number of similar entities.
 
Protobuf type google.cloud.aiplatform.v1.NearestNeighborQuery
See Also:
  • Field Details

    • ENTITY_ID_FIELD_NUMBER

      public static final int ENTITY_ID_FIELD_NUMBER
      See Also:
    • EMBEDDING_FIELD_NUMBER

      public static final int EMBEDDING_FIELD_NUMBER
      See Also:
    • NEIGHBOR_COUNT_FIELD_NUMBER

      public static final int NEIGHBOR_COUNT_FIELD_NUMBER
      See Also:
    • STRING_FILTERS_FIELD_NUMBER

      public static final int STRING_FILTERS_FIELD_NUMBER
      See Also:
    • NUMERIC_FILTERS_FIELD_NUMBER

      public static final int NUMERIC_FILTERS_FIELD_NUMBER
      See Also:
    • PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER

      public static final int PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER
      See Also:
    • PARAMETERS_FIELD_NUMBER

      public static final int PARAMETERS_FIELD_NUMBER
      See Also:
  • 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
    • getInstanceCase

      public NearestNeighborQuery.InstanceCase getInstanceCase()
      Specified by:
      getInstanceCase in interface NearestNeighborQueryOrBuilder
    • hasEntityId

      public boolean hasEntityId()
       Optional. The entity id whose similar entities should be searched for.
       If embedding is set, search will use embedding instead of
       entity_id.
       
      string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasEntityId in interface NearestNeighborQueryOrBuilder
      Returns:
      Whether the entityId field is set.
    • getEntityId

      public String getEntityId()
       Optional. The entity id whose similar entities should be searched for.
       If embedding is set, search will use embedding instead of
       entity_id.
       
      string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityId in interface NearestNeighborQueryOrBuilder
      Returns:
      The entityId.
    • getEntityIdBytes

      public com.google.protobuf.ByteString getEntityIdBytes()
       Optional. The entity id whose similar entities should be searched for.
       If embedding is set, search will use embedding instead of
       entity_id.
       
      string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntityIdBytes in interface NearestNeighborQueryOrBuilder
      Returns:
      The bytes for entityId.
    • hasEmbedding

      public boolean hasEmbedding()
       Optional. The embedding vector that be used for similar search.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasEmbedding in interface NearestNeighborQueryOrBuilder
      Returns:
      Whether the embedding field is set.
    • getEmbedding

      public NearestNeighborQuery.Embedding getEmbedding()
       Optional. The embedding vector that be used for similar search.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEmbedding in interface NearestNeighborQueryOrBuilder
      Returns:
      The embedding.
    • getEmbeddingOrBuilder

      public NearestNeighborQuery.EmbeddingOrBuilder getEmbeddingOrBuilder()
       Optional. The embedding vector that be used for similar search.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEmbeddingOrBuilder in interface NearestNeighborQueryOrBuilder
    • getNeighborCount

      public int getNeighborCount()
       Optional. The number of similar entities to be retrieved from feature view
       for each query.
       
      int32 neighbor_count = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNeighborCount in interface NearestNeighborQueryOrBuilder
      Returns:
      The neighborCount.
    • getStringFiltersList

      public List<NearestNeighborQuery.StringFilter> getStringFiltersList()
       Optional. The list of string filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStringFiltersList in interface NearestNeighborQueryOrBuilder
    • getStringFiltersOrBuilderList

      public List<? extends NearestNeighborQuery.StringFilterOrBuilder> getStringFiltersOrBuilderList()
       Optional. The list of string filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStringFiltersOrBuilderList in interface NearestNeighborQueryOrBuilder
    • getStringFiltersCount

      public int getStringFiltersCount()
       Optional. The list of string filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStringFiltersCount in interface NearestNeighborQueryOrBuilder
    • getStringFilters

      public NearestNeighborQuery.StringFilter getStringFilters(int index)
       Optional. The list of string filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStringFilters in interface NearestNeighborQueryOrBuilder
    • getStringFiltersOrBuilder

      public NearestNeighborQuery.StringFilterOrBuilder getStringFiltersOrBuilder(int index)
       Optional. The list of string filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStringFiltersOrBuilder in interface NearestNeighborQueryOrBuilder
    • getNumericFiltersList

      public List<NearestNeighborQuery.NumericFilter> getNumericFiltersList()
       Optional. The list of numeric filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNumericFiltersList in interface NearestNeighborQueryOrBuilder
    • getNumericFiltersOrBuilderList

      public List<? extends NearestNeighborQuery.NumericFilterOrBuilder> getNumericFiltersOrBuilderList()
       Optional. The list of numeric filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNumericFiltersOrBuilderList in interface NearestNeighborQueryOrBuilder
    • getNumericFiltersCount

      public int getNumericFiltersCount()
       Optional. The list of numeric filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNumericFiltersCount in interface NearestNeighborQueryOrBuilder
    • getNumericFilters

      public NearestNeighborQuery.NumericFilter getNumericFilters(int index)
       Optional. The list of numeric filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNumericFilters in interface NearestNeighborQueryOrBuilder
    • getNumericFiltersOrBuilder

      public NearestNeighborQuery.NumericFilterOrBuilder getNumericFiltersOrBuilder(int index)
       Optional. The list of numeric filters.
       
      repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNumericFiltersOrBuilder in interface NearestNeighborQueryOrBuilder
    • getPerCrowdingAttributeNeighborCount

      public int getPerCrowdingAttributeNeighborCount()
       Optional. Crowding is a constraint on a neighbor list produced by nearest
       neighbor search requiring that no more than
       sper_crowding_attribute_neighbor_count of the k neighbors returned have the
       same value of crowding_attribute. It's used for improving result diversity.
       
      int32 per_crowding_attribute_neighbor_count = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPerCrowdingAttributeNeighborCount in interface NearestNeighborQueryOrBuilder
      Returns:
      The perCrowdingAttributeNeighborCount.
    • hasParameters

      public boolean hasParameters()
       Optional. Parameters that can be set to tune query on the fly.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasParameters in interface NearestNeighborQueryOrBuilder
      Returns:
      Whether the parameters field is set.
    • getParameters

      public NearestNeighborQuery.Parameters getParameters()
       Optional. Parameters that can be set to tune query on the fly.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParameters in interface NearestNeighborQueryOrBuilder
      Returns:
      The parameters.
    • getParametersOrBuilder

      public NearestNeighborQuery.ParametersOrBuilder getParametersOrBuilder()
       Optional. Parameters that can be set to tune query on the fly.
       
      .google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParametersOrBuilder in interface NearestNeighborQueryOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static NearestNeighborQuery parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NearestNeighborQuery parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NearestNeighborQuery parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static NearestNeighborQuery parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static NearestNeighborQuery parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NearestNeighborQuery parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NearestNeighborQuery parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public NearestNeighborQuery.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static NearestNeighborQuery.Builder newBuilder()
    • newBuilder

      public static NearestNeighborQuery.Builder newBuilder(NearestNeighborQuery prototype)
    • toBuilder

      public NearestNeighborQuery.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected NearestNeighborQuery.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static NearestNeighborQuery getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<NearestNeighborQuery> parser()
    • getParserForType

      public com.google.protobuf.Parser<NearestNeighborQuery> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public NearestNeighborQuery getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder