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

com.yelp.nrtsearch.server.grpc.CompletionQuery Maven / Gradle / Ivy

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

// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;

/**
 * 
 * A query used for suggest completion
 * 
* * Protobuf type {@code luceneserver.CompletionQuery} */ public final class CompletionQuery extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:luceneserver.CompletionQuery) CompletionQueryOrBuilder { private static final long serialVersionUID = 0L; // Use CompletionQuery.newBuilder() to construct. private CompletionQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CompletionQuery() { field_ = ""; queryType_ = 0; text_ = ""; contexts_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CompletionQuery(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_CompletionQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_CompletionQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.CompletionQuery.class, com.yelp.nrtsearch.server.grpc.CompletionQuery.Builder.class); } public static final int FIELD_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object field_ = ""; /** *
   * Name of the field in the document to query, must be a SuggestField
   * 
* * string field = 1; * @return The field. */ @java.lang.Override public java.lang.String getField() { java.lang.Object ref = field_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); field_ = s; return s; } } /** *
   * Name of the field in the document to query, must be a SuggestField
   * 
* * string field = 1; * @return The bytes for field. */ @java.lang.Override public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = field_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); field_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int QUERYTYPE_FIELD_NUMBER = 2; private int queryType_ = 0; /** *
   * Completion query type, used when constructing the lucene completion query
   * 
* * .luceneserver.CompletionQueryType queryType = 2; * @return The enum numeric value on the wire for queryType. */ @java.lang.Override public int getQueryTypeValue() { return queryType_; } /** *
   * Completion query type, used when constructing the lucene completion query
   * 
* * .luceneserver.CompletionQueryType queryType = 2; * @return The queryType. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.CompletionQueryType getQueryType() { com.yelp.nrtsearch.server.grpc.CompletionQueryType result = com.yelp.nrtsearch.server.grpc.CompletionQueryType.forNumber(queryType_); return result == null ? com.yelp.nrtsearch.server.grpc.CompletionQueryType.UNRECOGNIZED : result; } public static final int TEXT_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object text_ = ""; /** *
   * Completion text to be used in completion query
   * 
* * string text = 3; * @return The text. */ @java.lang.Override public java.lang.String getText() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } } /** *
   * Completion text to be used in completion query
   * 
* * string text = 3; * @return The bytes for text. */ @java.lang.Override public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTEXTS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList contexts_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   * List of contexts to filter by. Each result will have at least one of the contexts specified
   * 
* * repeated string contexts = 4; * @return A list containing the contexts. */ public com.google.protobuf.ProtocolStringList getContextsList() { return contexts_; } /** *
   * List of contexts to filter by. Each result will have at least one of the contexts specified
   * 
* * repeated string contexts = 4; * @return The count of contexts. */ public int getContextsCount() { return contexts_.size(); } /** *
   * List of contexts to filter by. Each result will have at least one of the contexts specified
   * 
* * repeated string contexts = 4; * @param index The index of the element to return. * @return The contexts at the given index. */ public java.lang.String getContexts(int index) { return contexts_.get(index); } /** *
   * List of contexts to filter by. Each result will have at least one of the contexts specified
   * 
* * repeated string contexts = 4; * @param index The index of the value to return. * @return The bytes of the contexts at the given index. */ public com.google.protobuf.ByteString getContextsBytes(int index) { return contexts_.getByteString(index); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); } if (queryType_ != com.yelp.nrtsearch.server.grpc.CompletionQueryType.PREFIX_QUERY.getNumber()) { output.writeEnum(2, queryType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); } for (int i = 0; i < contexts_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, contexts_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); } if (queryType_ != com.yelp.nrtsearch.server.grpc.CompletionQueryType.PREFIX_QUERY.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, queryType_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); } { int dataSize = 0; for (int i = 0; i < contexts_.size(); i++) { dataSize += computeStringSizeNoTag(contexts_.getRaw(i)); } size += dataSize; size += 1 * getContextsList().size(); } 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.yelp.nrtsearch.server.grpc.CompletionQuery)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.CompletionQuery other = (com.yelp.nrtsearch.server.grpc.CompletionQuery) obj; if (!getField() .equals(other.getField())) return false; if (queryType_ != other.queryType_) return false; if (!getText() .equals(other.getText())) return false; if (!getContextsList() .equals(other.getContextsList())) return false; 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(); hash = (37 * hash) + FIELD_FIELD_NUMBER; hash = (53 * hash) + getField().hashCode(); hash = (37 * hash) + QUERYTYPE_FIELD_NUMBER; hash = (53 * hash) + queryType_; hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); if (getContextsCount() > 0) { hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getContextsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery 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.yelp.nrtsearch.server.grpc.CompletionQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery 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.yelp.nrtsearch.server.grpc.CompletionQuery parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery 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.yelp.nrtsearch.server.grpc.CompletionQuery 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; } /** *
   * A query used for suggest completion
   * 
* * Protobuf type {@code luceneserver.CompletionQuery} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.CompletionQuery) com.yelp.nrtsearch.server.grpc.CompletionQueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_CompletionQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_CompletionQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.CompletionQuery.class, com.yelp.nrtsearch.server.grpc.CompletionQuery.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.CompletionQuery.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; field_ = ""; queryType_ = 0; text_ = ""; contexts_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_CompletionQuery_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.CompletionQuery getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.CompletionQuery.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.CompletionQuery build() { com.yelp.nrtsearch.server.grpc.CompletionQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.CompletionQuery buildPartial() { com.yelp.nrtsearch.server.grpc.CompletionQuery result = new com.yelp.nrtsearch.server.grpc.CompletionQuery(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.yelp.nrtsearch.server.grpc.CompletionQuery result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.field_ = field_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.queryType_ = queryType_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.text_ = text_; } if (((from_bitField0_ & 0x00000008) != 0)) { contexts_.makeImmutable(); result.contexts_ = contexts_; } } @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.yelp.nrtsearch.server.grpc.CompletionQuery) { return mergeFrom((com.yelp.nrtsearch.server.grpc.CompletionQuery)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.CompletionQuery other) { if (other == com.yelp.nrtsearch.server.grpc.CompletionQuery.getDefaultInstance()) return this; if (!other.getField().isEmpty()) { field_ = other.field_; bitField0_ |= 0x00000001; onChanged(); } if (other.queryType_ != 0) { setQueryTypeValue(other.getQueryTypeValue()); } if (!other.getText().isEmpty()) { text_ = other.text_; bitField0_ |= 0x00000004; onChanged(); } if (!other.contexts_.isEmpty()) { if (contexts_.isEmpty()) { contexts_ = other.contexts_; bitField0_ |= 0x00000008; } else { ensureContextsIsMutable(); contexts_.addAll(other.contexts_); } onChanged(); } 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: { field_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { queryType_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { text_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); ensureContextsIsMutable(); contexts_.add(s); break; } // case 34 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 bitField0_; private java.lang.Object field_ = ""; /** *
     * Name of the field in the document to query, must be a SuggestField
     * 
* * string field = 1; * @return The field. */ public java.lang.String getField() { java.lang.Object ref = field_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); field_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of the field in the document to query, must be a SuggestField
     * 
* * string field = 1; * @return The bytes for field. */ public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = field_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); field_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of the field in the document to query, must be a SuggestField
     * 
* * string field = 1; * @param value The field to set. * @return This builder for chaining. */ public Builder setField( java.lang.String value) { if (value == null) { throw new NullPointerException(); } field_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Name of the field in the document to query, must be a SuggestField
     * 
* * string field = 1; * @return This builder for chaining. */ public Builder clearField() { field_ = getDefaultInstance().getField(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Name of the field in the document to query, must be a SuggestField
     * 
* * string field = 1; * @param value The bytes for field to set. * @return This builder for chaining. */ public Builder setFieldBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); field_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int queryType_ = 0; /** *
     * Completion query type, used when constructing the lucene completion query
     * 
* * .luceneserver.CompletionQueryType queryType = 2; * @return The enum numeric value on the wire for queryType. */ @java.lang.Override public int getQueryTypeValue() { return queryType_; } /** *
     * Completion query type, used when constructing the lucene completion query
     * 
* * .luceneserver.CompletionQueryType queryType = 2; * @param value The enum numeric value on the wire for queryType to set. * @return This builder for chaining. */ public Builder setQueryTypeValue(int value) { queryType_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Completion query type, used when constructing the lucene completion query
     * 
* * .luceneserver.CompletionQueryType queryType = 2; * @return The queryType. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.CompletionQueryType getQueryType() { com.yelp.nrtsearch.server.grpc.CompletionQueryType result = com.yelp.nrtsearch.server.grpc.CompletionQueryType.forNumber(queryType_); return result == null ? com.yelp.nrtsearch.server.grpc.CompletionQueryType.UNRECOGNIZED : result; } /** *
     * Completion query type, used when constructing the lucene completion query
     * 
* * .luceneserver.CompletionQueryType queryType = 2; * @param value The queryType to set. * @return This builder for chaining. */ public Builder setQueryType(com.yelp.nrtsearch.server.grpc.CompletionQueryType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; queryType_ = value.getNumber(); onChanged(); return this; } /** *
     * Completion query type, used when constructing the lucene completion query
     * 
* * .luceneserver.CompletionQueryType queryType = 2; * @return This builder for chaining. */ public Builder clearQueryType() { bitField0_ = (bitField0_ & ~0x00000002); queryType_ = 0; onChanged(); return this; } private java.lang.Object text_ = ""; /** *
     * Completion text to be used in completion query
     * 
* * string text = 3; * @return The text. */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Completion text to be used in completion query
     * 
* * string text = 3; * @return The bytes for text. */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Completion text to be used in completion query
     * 
* * string text = 3; * @param value The text to set. * @return This builder for chaining. */ public Builder setText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } text_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Completion text to be used in completion query
     * 
* * string text = 3; * @return This builder for chaining. */ public Builder clearText() { text_ = getDefaultInstance().getText(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * Completion text to be used in completion query
     * 
* * string text = 3; * @param value The bytes for text to set. * @return This builder for chaining. */ public Builder setTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); text_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList contexts_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureContextsIsMutable() { if (!contexts_.isModifiable()) { contexts_ = new com.google.protobuf.LazyStringArrayList(contexts_); } bitField0_ |= 0x00000008; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @return A list containing the contexts. */ public com.google.protobuf.ProtocolStringList getContextsList() { contexts_.makeImmutable(); return contexts_; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @return The count of contexts. */ public int getContextsCount() { return contexts_.size(); } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param index The index of the element to return. * @return The contexts at the given index. */ public java.lang.String getContexts(int index) { return contexts_.get(index); } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param index The index of the value to return. * @return The bytes of the contexts at the given index. */ public com.google.protobuf.ByteString getContextsBytes(int index) { return contexts_.getByteString(index); } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param index The index to set the value at. * @param value The contexts to set. * @return This builder for chaining. */ public Builder setContexts( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureContextsIsMutable(); contexts_.set(index, value); bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param value The contexts to add. * @return This builder for chaining. */ public Builder addContexts( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureContextsIsMutable(); contexts_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param values The contexts to add. * @return This builder for chaining. */ public Builder addAllContexts( java.lang.Iterable values) { ensureContextsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, contexts_); bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @return This builder for chaining. */ public Builder clearContexts() { contexts_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000008);; onChanged(); return this; } /** *
     * List of contexts to filter by. Each result will have at least one of the contexts specified
     * 
* * repeated string contexts = 4; * @param value The bytes of the contexts to add. * @return This builder for chaining. */ public Builder addContextsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureContextsIsMutable(); contexts_.add(value); bitField0_ |= 0x00000008; onChanged(); return this; } @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:luceneserver.CompletionQuery) } // @@protoc_insertion_point(class_scope:luceneserver.CompletionQuery) private static final com.yelp.nrtsearch.server.grpc.CompletionQuery DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.CompletionQuery(); } public static com.yelp.nrtsearch.server.grpc.CompletionQuery getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CompletionQuery 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.yelp.nrtsearch.server.grpc.CompletionQuery getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy