All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aerospike.vector.client.proto.VectorSearchRequest Maven / Gradle / Ivy

Go to download

This project includes the Java client for Aerospike Vector Search for high-performance data interactions.

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: transact.proto

// Protobuf Java Version: 3.25.1
package com.aerospike.vector.client.proto;

/**
 * Protobuf type {@code aerospike.vector.VectorSearchRequest}
 */
public final class VectorSearchRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:aerospike.vector.VectorSearchRequest)
    VectorSearchRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use VectorSearchRequest.newBuilder() to construct.
  private VectorSearchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private VectorSearchRequest() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new VectorSearchRequest();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_VectorSearchRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_VectorSearchRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.aerospike.vector.client.proto.VectorSearchRequest.class, com.aerospike.vector.client.proto.VectorSearchRequest.Builder.class);
  }

  private int bitField0_;
  private int searchParamsCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object searchParams_;
  public enum SearchParamsCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    HNSWSEARCHPARAMS(5),
    SEARCHPARAMS_NOT_SET(0);
    private final int value;
    private SearchParamsCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static SearchParamsCase valueOf(int value) {
      return forNumber(value);
    }

    public static SearchParamsCase forNumber(int value) {
      switch (value) {
        case 5: return HNSWSEARCHPARAMS;
        case 0: return SEARCHPARAMS_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public SearchParamsCase
  getSearchParamsCase() {
    return SearchParamsCase.forNumber(
        searchParamsCase_);
  }

  public static final int INDEX_FIELD_NUMBER = 1;
  private com.aerospike.vector.client.proto.IndexId index_;
  /**
   * 
   * The index identifier.
   * 
* * .aerospike.vector.IndexId index = 1; * @return Whether the index field is set. */ @java.lang.Override public boolean hasIndex() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The index identifier.
   * 
* * .aerospike.vector.IndexId index = 1; * @return The index. */ @java.lang.Override public com.aerospike.vector.client.proto.IndexId getIndex() { return index_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : index_; } /** *
   * The index identifier.
   * 
* * .aerospike.vector.IndexId index = 1; */ @java.lang.Override public com.aerospike.vector.client.proto.IndexIdOrBuilder getIndexOrBuilder() { return index_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : index_; } public static final int QUERYVECTOR_FIELD_NUMBER = 2; private com.aerospike.vector.client.proto.Vector queryVector_; /** *
   * The query vector.
   * 
* * .aerospike.vector.Vector queryVector = 2; * @return Whether the queryVector field is set. */ @java.lang.Override public boolean hasQueryVector() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * The query vector.
   * 
* * .aerospike.vector.Vector queryVector = 2; * @return The queryVector. */ @java.lang.Override public com.aerospike.vector.client.proto.Vector getQueryVector() { return queryVector_ == null ? com.aerospike.vector.client.proto.Vector.getDefaultInstance() : queryVector_; } /** *
   * The query vector.
   * 
* * .aerospike.vector.Vector queryVector = 2; */ @java.lang.Override public com.aerospike.vector.client.proto.VectorOrBuilder getQueryVectorOrBuilder() { return queryVector_ == null ? com.aerospike.vector.client.proto.Vector.getDefaultInstance() : queryVector_; } public static final int LIMIT_FIELD_NUMBER = 3; private int limit_ = 0; /** *
   * Maximum number of results to return.
   * 
* * uint32 limit = 3; * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } public static final int PROJECTION_FIELD_NUMBER = 4; private com.aerospike.vector.client.proto.ProjectionSpec projection_; /** *
   * Projection to select fields.
   * 
* * .aerospike.vector.ProjectionSpec projection = 4; * @return Whether the projection field is set. */ @java.lang.Override public boolean hasProjection() { return ((bitField0_ & 0x00000004) != 0); } /** *
   * Projection to select fields.
   * 
* * .aerospike.vector.ProjectionSpec projection = 4; * @return The projection. */ @java.lang.Override public com.aerospike.vector.client.proto.ProjectionSpec getProjection() { return projection_ == null ? com.aerospike.vector.client.proto.ProjectionSpec.getDefaultInstance() : projection_; } /** *
   * Projection to select fields.
   * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ @java.lang.Override public com.aerospike.vector.client.proto.ProjectionSpecOrBuilder getProjectionOrBuilder() { return projection_ == null ? com.aerospike.vector.client.proto.ProjectionSpec.getDefaultInstance() : projection_; } public static final int HNSWSEARCHPARAMS_FIELD_NUMBER = 5; /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; * @return Whether the hnswSearchParams field is set. */ @java.lang.Override public boolean hasHnswSearchParams() { return searchParamsCase_ == 5; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; * @return The hnswSearchParams. */ @java.lang.Override public com.aerospike.vector.client.proto.HnswSearchParams getHnswSearchParams() { if (searchParamsCase_ == 5) { return (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_; } return com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ @java.lang.Override public com.aerospike.vector.client.proto.HnswSearchParamsOrBuilder getHnswSearchParamsOrBuilder() { if (searchParamsCase_ == 5) { return (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_; } return com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getIndex()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getQueryVector()); } if (limit_ != 0) { output.writeUInt32(3, limit_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getProjection()); } if (searchParamsCase_ == 5) { output.writeMessage(5, (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getIndex()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getQueryVector()); } if (limit_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, limit_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getProjection()); } if (searchParamsCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.aerospike.vector.client.proto.VectorSearchRequest)) { return super.equals(obj); } com.aerospike.vector.client.proto.VectorSearchRequest other = (com.aerospike.vector.client.proto.VectorSearchRequest) obj; if (hasIndex() != other.hasIndex()) return false; if (hasIndex()) { if (!getIndex() .equals(other.getIndex())) return false; } if (hasQueryVector() != other.hasQueryVector()) return false; if (hasQueryVector()) { if (!getQueryVector() .equals(other.getQueryVector())) return false; } if (getLimit() != other.getLimit()) return false; if (hasProjection() != other.hasProjection()) return false; if (hasProjection()) { if (!getProjection() .equals(other.getProjection())) return false; } if (!getSearchParamsCase().equals(other.getSearchParamsCase())) return false; switch (searchParamsCase_) { case 5: if (!getHnswSearchParams() .equals(other.getHnswSearchParams())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasIndex()) { hash = (37 * hash) + INDEX_FIELD_NUMBER; hash = (53 * hash) + getIndex().hashCode(); } if (hasQueryVector()) { hash = (37 * hash) + QUERYVECTOR_FIELD_NUMBER; hash = (53 * hash) + getQueryVector().hashCode(); } hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + getLimit(); if (hasProjection()) { hash = (37 * hash) + PROJECTION_FIELD_NUMBER; hash = (53 * hash) + getProjection().hashCode(); } switch (searchParamsCase_) { case 5: hash = (37 * hash) + HNSWSEARCHPARAMS_FIELD_NUMBER; hash = (53 * hash) + getHnswSearchParams().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.aerospike.vector.client.proto.VectorSearchRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.aerospike.vector.client.proto.VectorSearchRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code aerospike.vector.VectorSearchRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:aerospike.vector.VectorSearchRequest) com.aerospike.vector.client.proto.VectorSearchRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_VectorSearchRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_VectorSearchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.aerospike.vector.client.proto.VectorSearchRequest.class, com.aerospike.vector.client.proto.VectorSearchRequest.Builder.class); } // Construct using com.aerospike.vector.client.proto.VectorSearchRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getIndexFieldBuilder(); getQueryVectorFieldBuilder(); getProjectionFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; index_ = null; if (indexBuilder_ != null) { indexBuilder_.dispose(); indexBuilder_ = null; } queryVector_ = null; if (queryVectorBuilder_ != null) { queryVectorBuilder_.dispose(); queryVectorBuilder_ = null; } limit_ = 0; projection_ = null; if (projectionBuilder_ != null) { projectionBuilder_.dispose(); projectionBuilder_ = null; } if (hnswSearchParamsBuilder_ != null) { hnswSearchParamsBuilder_.clear(); } searchParamsCase_ = 0; searchParams_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_VectorSearchRequest_descriptor; } @java.lang.Override public com.aerospike.vector.client.proto.VectorSearchRequest getDefaultInstanceForType() { return com.aerospike.vector.client.proto.VectorSearchRequest.getDefaultInstance(); } @java.lang.Override public com.aerospike.vector.client.proto.VectorSearchRequest build() { com.aerospike.vector.client.proto.VectorSearchRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.aerospike.vector.client.proto.VectorSearchRequest buildPartial() { com.aerospike.vector.client.proto.VectorSearchRequest result = new com.aerospike.vector.client.proto.VectorSearchRequest(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.aerospike.vector.client.proto.VectorSearchRequest result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.index_ = indexBuilder_ == null ? index_ : indexBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.queryVector_ = queryVectorBuilder_ == null ? queryVector_ : queryVectorBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.limit_ = limit_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.projection_ = projectionBuilder_ == null ? projection_ : projectionBuilder_.build(); to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.aerospike.vector.client.proto.VectorSearchRequest result) { result.searchParamsCase_ = searchParamsCase_; result.searchParams_ = this.searchParams_; if (searchParamsCase_ == 5 && hnswSearchParamsBuilder_ != null) { result.searchParams_ = hnswSearchParamsBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.aerospike.vector.client.proto.VectorSearchRequest) { return mergeFrom((com.aerospike.vector.client.proto.VectorSearchRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.aerospike.vector.client.proto.VectorSearchRequest other) { if (other == com.aerospike.vector.client.proto.VectorSearchRequest.getDefaultInstance()) return this; if (other.hasIndex()) { mergeIndex(other.getIndex()); } if (other.hasQueryVector()) { mergeQueryVector(other.getQueryVector()); } if (other.getLimit() != 0) { setLimit(other.getLimit()); } if (other.hasProjection()) { mergeProjection(other.getProjection()); } switch (other.getSearchParamsCase()) { case HNSWSEARCHPARAMS: { mergeHnswSearchParams(other.getHnswSearchParams()); break; } case SEARCHPARAMS_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getIndexFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getQueryVectorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 24: { limit_ = input.readUInt32(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { input.readMessage( getProjectionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( getHnswSearchParamsFieldBuilder().getBuilder(), extensionRegistry); searchParamsCase_ = 5; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int searchParamsCase_ = 0; private java.lang.Object searchParams_; public SearchParamsCase getSearchParamsCase() { return SearchParamsCase.forNumber( searchParamsCase_); } public Builder clearSearchParams() { searchParamsCase_ = 0; searchParams_ = null; onChanged(); return this; } private int bitField0_; private com.aerospike.vector.client.proto.IndexId index_; private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder> indexBuilder_; /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; * @return Whether the index field is set. */ public boolean hasIndex() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; * @return The index. */ public com.aerospike.vector.client.proto.IndexId getIndex() { if (indexBuilder_ == null) { return index_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : index_; } else { return indexBuilder_.getMessage(); } } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public Builder setIndex(com.aerospike.vector.client.proto.IndexId value) { if (indexBuilder_ == null) { if (value == null) { throw new NullPointerException(); } index_ = value; } else { indexBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public Builder setIndex( com.aerospike.vector.client.proto.IndexId.Builder builderForValue) { if (indexBuilder_ == null) { index_ = builderForValue.build(); } else { indexBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public Builder mergeIndex(com.aerospike.vector.client.proto.IndexId value) { if (indexBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && index_ != null && index_ != com.aerospike.vector.client.proto.IndexId.getDefaultInstance()) { getIndexBuilder().mergeFrom(value); } else { index_ = value; } } else { indexBuilder_.mergeFrom(value); } if (index_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public Builder clearIndex() { bitField0_ = (bitField0_ & ~0x00000001); index_ = null; if (indexBuilder_ != null) { indexBuilder_.dispose(); indexBuilder_ = null; } onChanged(); return this; } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public com.aerospike.vector.client.proto.IndexId.Builder getIndexBuilder() { bitField0_ |= 0x00000001; onChanged(); return getIndexFieldBuilder().getBuilder(); } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ public com.aerospike.vector.client.proto.IndexIdOrBuilder getIndexOrBuilder() { if (indexBuilder_ != null) { return indexBuilder_.getMessageOrBuilder(); } else { return index_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : index_; } } /** *
     * The index identifier.
     * 
* * .aerospike.vector.IndexId index = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder> getIndexFieldBuilder() { if (indexBuilder_ == null) { indexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder>( getIndex(), getParentForChildren(), isClean()); index_ = null; } return indexBuilder_; } private com.aerospike.vector.client.proto.Vector queryVector_; private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.Vector, com.aerospike.vector.client.proto.Vector.Builder, com.aerospike.vector.client.proto.VectorOrBuilder> queryVectorBuilder_; /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; * @return Whether the queryVector field is set. */ public boolean hasQueryVector() { return ((bitField0_ & 0x00000002) != 0); } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; * @return The queryVector. */ public com.aerospike.vector.client.proto.Vector getQueryVector() { if (queryVectorBuilder_ == null) { return queryVector_ == null ? com.aerospike.vector.client.proto.Vector.getDefaultInstance() : queryVector_; } else { return queryVectorBuilder_.getMessage(); } } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public Builder setQueryVector(com.aerospike.vector.client.proto.Vector value) { if (queryVectorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } queryVector_ = value; } else { queryVectorBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public Builder setQueryVector( com.aerospike.vector.client.proto.Vector.Builder builderForValue) { if (queryVectorBuilder_ == null) { queryVector_ = builderForValue.build(); } else { queryVectorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public Builder mergeQueryVector(com.aerospike.vector.client.proto.Vector value) { if (queryVectorBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && queryVector_ != null && queryVector_ != com.aerospike.vector.client.proto.Vector.getDefaultInstance()) { getQueryVectorBuilder().mergeFrom(value); } else { queryVector_ = value; } } else { queryVectorBuilder_.mergeFrom(value); } if (queryVector_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public Builder clearQueryVector() { bitField0_ = (bitField0_ & ~0x00000002); queryVector_ = null; if (queryVectorBuilder_ != null) { queryVectorBuilder_.dispose(); queryVectorBuilder_ = null; } onChanged(); return this; } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public com.aerospike.vector.client.proto.Vector.Builder getQueryVectorBuilder() { bitField0_ |= 0x00000002; onChanged(); return getQueryVectorFieldBuilder().getBuilder(); } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ public com.aerospike.vector.client.proto.VectorOrBuilder getQueryVectorOrBuilder() { if (queryVectorBuilder_ != null) { return queryVectorBuilder_.getMessageOrBuilder(); } else { return queryVector_ == null ? com.aerospike.vector.client.proto.Vector.getDefaultInstance() : queryVector_; } } /** *
     * The query vector.
     * 
* * .aerospike.vector.Vector queryVector = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.Vector, com.aerospike.vector.client.proto.Vector.Builder, com.aerospike.vector.client.proto.VectorOrBuilder> getQueryVectorFieldBuilder() { if (queryVectorBuilder_ == null) { queryVectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.Vector, com.aerospike.vector.client.proto.Vector.Builder, com.aerospike.vector.client.proto.VectorOrBuilder>( getQueryVector(), getParentForChildren(), isClean()); queryVector_ = null; } return queryVectorBuilder_; } private int limit_ ; /** *
     * Maximum number of results to return.
     * 
* * uint32 limit = 3; * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } /** *
     * Maximum number of results to return.
     * 
* * uint32 limit = 3; * @param value The limit to set. * @return This builder for chaining. */ public Builder setLimit(int value) { limit_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Maximum number of results to return.
     * 
* * uint32 limit = 3; * @return This builder for chaining. */ public Builder clearLimit() { bitField0_ = (bitField0_ & ~0x00000004); limit_ = 0; onChanged(); return this; } private com.aerospike.vector.client.proto.ProjectionSpec projection_; private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.ProjectionSpec, com.aerospike.vector.client.proto.ProjectionSpec.Builder, com.aerospike.vector.client.proto.ProjectionSpecOrBuilder> projectionBuilder_; /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; * @return Whether the projection field is set. */ public boolean hasProjection() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; * @return The projection. */ public com.aerospike.vector.client.proto.ProjectionSpec getProjection() { if (projectionBuilder_ == null) { return projection_ == null ? com.aerospike.vector.client.proto.ProjectionSpec.getDefaultInstance() : projection_; } else { return projectionBuilder_.getMessage(); } } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public Builder setProjection(com.aerospike.vector.client.proto.ProjectionSpec value) { if (projectionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } projection_ = value; } else { projectionBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public Builder setProjection( com.aerospike.vector.client.proto.ProjectionSpec.Builder builderForValue) { if (projectionBuilder_ == null) { projection_ = builderForValue.build(); } else { projectionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public Builder mergeProjection(com.aerospike.vector.client.proto.ProjectionSpec value) { if (projectionBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && projection_ != null && projection_ != com.aerospike.vector.client.proto.ProjectionSpec.getDefaultInstance()) { getProjectionBuilder().mergeFrom(value); } else { projection_ = value; } } else { projectionBuilder_.mergeFrom(value); } if (projection_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public Builder clearProjection() { bitField0_ = (bitField0_ & ~0x00000008); projection_ = null; if (projectionBuilder_ != null) { projectionBuilder_.dispose(); projectionBuilder_ = null; } onChanged(); return this; } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public com.aerospike.vector.client.proto.ProjectionSpec.Builder getProjectionBuilder() { bitField0_ |= 0x00000008; onChanged(); return getProjectionFieldBuilder().getBuilder(); } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ public com.aerospike.vector.client.proto.ProjectionSpecOrBuilder getProjectionOrBuilder() { if (projectionBuilder_ != null) { return projectionBuilder_.getMessageOrBuilder(); } else { return projection_ == null ? com.aerospike.vector.client.proto.ProjectionSpec.getDefaultInstance() : projection_; } } /** *
     * Projection to select fields.
     * 
* * .aerospike.vector.ProjectionSpec projection = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.ProjectionSpec, com.aerospike.vector.client.proto.ProjectionSpec.Builder, com.aerospike.vector.client.proto.ProjectionSpecOrBuilder> getProjectionFieldBuilder() { if (projectionBuilder_ == null) { projectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.ProjectionSpec, com.aerospike.vector.client.proto.ProjectionSpec.Builder, com.aerospike.vector.client.proto.ProjectionSpecOrBuilder>( getProjection(), getParentForChildren(), isClean()); projection_ = null; } return projectionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.HnswSearchParams, com.aerospike.vector.client.proto.HnswSearchParams.Builder, com.aerospike.vector.client.proto.HnswSearchParamsOrBuilder> hnswSearchParamsBuilder_; /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; * @return Whether the hnswSearchParams field is set. */ @java.lang.Override public boolean hasHnswSearchParams() { return searchParamsCase_ == 5; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; * @return The hnswSearchParams. */ @java.lang.Override public com.aerospike.vector.client.proto.HnswSearchParams getHnswSearchParams() { if (hnswSearchParamsBuilder_ == null) { if (searchParamsCase_ == 5) { return (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_; } return com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } else { if (searchParamsCase_ == 5) { return hnswSearchParamsBuilder_.getMessage(); } return com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ public Builder setHnswSearchParams(com.aerospike.vector.client.proto.HnswSearchParams value) { if (hnswSearchParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } searchParams_ = value; onChanged(); } else { hnswSearchParamsBuilder_.setMessage(value); } searchParamsCase_ = 5; return this; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ public Builder setHnswSearchParams( com.aerospike.vector.client.proto.HnswSearchParams.Builder builderForValue) { if (hnswSearchParamsBuilder_ == null) { searchParams_ = builderForValue.build(); onChanged(); } else { hnswSearchParamsBuilder_.setMessage(builderForValue.build()); } searchParamsCase_ = 5; return this; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ public Builder mergeHnswSearchParams(com.aerospike.vector.client.proto.HnswSearchParams value) { if (hnswSearchParamsBuilder_ == null) { if (searchParamsCase_ == 5 && searchParams_ != com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance()) { searchParams_ = com.aerospike.vector.client.proto.HnswSearchParams.newBuilder((com.aerospike.vector.client.proto.HnswSearchParams) searchParams_) .mergeFrom(value).buildPartial(); } else { searchParams_ = value; } onChanged(); } else { if (searchParamsCase_ == 5) { hnswSearchParamsBuilder_.mergeFrom(value); } else { hnswSearchParamsBuilder_.setMessage(value); } } searchParamsCase_ = 5; return this; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ public Builder clearHnswSearchParams() { if (hnswSearchParamsBuilder_ == null) { if (searchParamsCase_ == 5) { searchParamsCase_ = 0; searchParams_ = null; onChanged(); } } else { if (searchParamsCase_ == 5) { searchParamsCase_ = 0; searchParams_ = null; } hnswSearchParamsBuilder_.clear(); } return this; } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ public com.aerospike.vector.client.proto.HnswSearchParams.Builder getHnswSearchParamsBuilder() { return getHnswSearchParamsFieldBuilder().getBuilder(); } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ @java.lang.Override public com.aerospike.vector.client.proto.HnswSearchParamsOrBuilder getHnswSearchParamsOrBuilder() { if ((searchParamsCase_ == 5) && (hnswSearchParamsBuilder_ != null)) { return hnswSearchParamsBuilder_.getMessageOrBuilder(); } else { if (searchParamsCase_ == 5) { return (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_; } return com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } } /** * .aerospike.vector.HnswSearchParams hnswSearchParams = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.HnswSearchParams, com.aerospike.vector.client.proto.HnswSearchParams.Builder, com.aerospike.vector.client.proto.HnswSearchParamsOrBuilder> getHnswSearchParamsFieldBuilder() { if (hnswSearchParamsBuilder_ == null) { if (!(searchParamsCase_ == 5)) { searchParams_ = com.aerospike.vector.client.proto.HnswSearchParams.getDefaultInstance(); } hnswSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.aerospike.vector.client.proto.HnswSearchParams, com.aerospike.vector.client.proto.HnswSearchParams.Builder, com.aerospike.vector.client.proto.HnswSearchParamsOrBuilder>( (com.aerospike.vector.client.proto.HnswSearchParams) searchParams_, getParentForChildren(), isClean()); searchParams_ = null; } searchParamsCase_ = 5; onChanged(); return hnswSearchParamsBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:aerospike.vector.VectorSearchRequest) } // @@protoc_insertion_point(class_scope:aerospike.vector.VectorSearchRequest) private static final com.aerospike.vector.client.proto.VectorSearchRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.aerospike.vector.client.proto.VectorSearchRequest(); } public static com.aerospike.vector.client.proto.VectorSearchRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public VectorSearchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.aerospike.vector.client.proto.VectorSearchRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy