
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clientlib Show documentation
Show all versions of clientlib Show documentation
GRPC Clientlib for nrtSearch
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yelp/nrtsearch/suggest.proto
package com.yelp.nrtsearch.server.grpc;
/**
* Protobuf type {@code luceneserver.SuggestLookupRequest}
*/
public final class SuggestLookupRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.SuggestLookupRequest)
SuggestLookupRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SuggestLookupRequest.newBuilder() to construct.
private SuggestLookupRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SuggestLookupRequest() {
indexName_ = "";
suggestName_ = "";
text_ = "";
contexts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SuggestLookupRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_SuggestLookupRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_SuggestLookupRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.class, com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.Builder.class);
}
public static final int INDEXNAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object indexName_ = "";
/**
*
*Index name
*
*
* string indexName = 1;
* @return The indexName.
*/
@java.lang.Override
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
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();
indexName_ = s;
return s;
}
}
/**
*
*Index name
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUGGESTNAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object suggestName_ = "";
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @return The suggestName.
*/
@java.lang.Override
public java.lang.String getSuggestName() {
java.lang.Object ref = suggestName_;
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();
suggestName_ = s;
return s;
}
}
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @return The bytes for suggestName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSuggestNameBytes() {
java.lang.Object ref = suggestName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
suggestName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEXT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
*
*Text to suggest from
*
*
* 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;
}
}
/**
*
*Text to suggest from
*
*
* 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 HIGHLIGHT_FIELD_NUMBER = 4;
private boolean highlight_ = false;
/**
*
*True if the suggestions should be highlighted (currently only works with AnalyzingInfixSuggester)
*
*
* bool highlight = 4;
* @return The highlight.
*/
@java.lang.Override
public boolean getHighlight() {
return highlight_;
}
public static final int ALLTERMSREQUIRED_FIELD_NUMBER = 5;
private boolean allTermsRequired_ = false;
/**
*
*If true then all terms must be found (this only applies to InfixSuggester currently)
*
*
* bool allTermsRequired = 5;
* @return The allTermsRequired.
*/
@java.lang.Override
public boolean getAllTermsRequired() {
return allTermsRequired_;
}
public static final int CONTEXTS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList contexts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @return A list containing the contexts.
*/
public com.google.protobuf.ProtocolStringList
getContextsList() {
return contexts_;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @return The count of contexts.
*/
public int getContextsCount() {
return contexts_.size();
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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);
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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);
}
public static final int COUNT_FIELD_NUMBER = 7;
private int count_ = 0;
/**
*
*How many suggestions to return, default = 5
*
*
* int32 count = 7;
* @return The count.
*/
@java.lang.Override
public int getCount() {
return count_;
}
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(indexName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, indexName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suggestName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, suggestName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_);
}
if (highlight_ != false) {
output.writeBool(4, highlight_);
}
if (allTermsRequired_ != false) {
output.writeBool(5, allTermsRequired_);
}
for (int i = 0; i < contexts_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contexts_.getRaw(i));
}
if (count_ != 0) {
output.writeInt32(7, count_);
}
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(indexName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, indexName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suggestName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, suggestName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_);
}
if (highlight_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, highlight_);
}
if (allTermsRequired_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, allTermsRequired_);
}
{
int dataSize = 0;
for (int i = 0; i < contexts_.size(); i++) {
dataSize += computeStringSizeNoTag(contexts_.getRaw(i));
}
size += dataSize;
size += 1 * getContextsList().size();
}
if (count_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, count_);
}
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.SuggestLookupRequest)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest other = (com.yelp.nrtsearch.server.grpc.SuggestLookupRequest) obj;
if (!getIndexName()
.equals(other.getIndexName())) return false;
if (!getSuggestName()
.equals(other.getSuggestName())) return false;
if (!getText()
.equals(other.getText())) return false;
if (getHighlight()
!= other.getHighlight()) return false;
if (getAllTermsRequired()
!= other.getAllTermsRequired()) return false;
if (!getContextsList()
.equals(other.getContextsList())) return false;
if (getCount()
!= other.getCount()) 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) + INDEXNAME_FIELD_NUMBER;
hash = (53 * hash) + getIndexName().hashCode();
hash = (37 * hash) + SUGGESTNAME_FIELD_NUMBER;
hash = (53 * hash) + getSuggestName().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + HIGHLIGHT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getHighlight());
hash = (37 * hash) + ALLTERMSREQUIRED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllTermsRequired());
if (getContextsCount() > 0) {
hash = (37 * hash) + CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + getContextsList().hashCode();
}
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + getCount();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest 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.SuggestLookupRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest 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.SuggestLookupRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest 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.SuggestLookupRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest 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.SuggestLookupRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest 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.SuggestLookupRequest 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.SuggestLookupRequest 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.SuggestLookupRequest 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 luceneserver.SuggestLookupRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.SuggestLookupRequest)
com.yelp.nrtsearch.server.grpc.SuggestLookupRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_SuggestLookupRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_SuggestLookupRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.class, com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
indexName_ = "";
suggestName_ = "";
text_ = "";
highlight_ = false;
allTermsRequired_ = false;
contexts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
count_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_SuggestLookupRequest_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SuggestLookupRequest getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SuggestLookupRequest build() {
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SuggestLookupRequest buildPartial() {
com.yelp.nrtsearch.server.grpc.SuggestLookupRequest result = new com.yelp.nrtsearch.server.grpc.SuggestLookupRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.SuggestLookupRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.indexName_ = indexName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.suggestName_ = suggestName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.text_ = text_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.highlight_ = highlight_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.allTermsRequired_ = allTermsRequired_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
contexts_.makeImmutable();
result.contexts_ = contexts_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.count_ = count_;
}
}
@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.SuggestLookupRequest) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.SuggestLookupRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.SuggestLookupRequest other) {
if (other == com.yelp.nrtsearch.server.grpc.SuggestLookupRequest.getDefaultInstance()) return this;
if (!other.getIndexName().isEmpty()) {
indexName_ = other.indexName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSuggestName().isEmpty()) {
suggestName_ = other.suggestName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getText().isEmpty()) {
text_ = other.text_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getHighlight() != false) {
setHighlight(other.getHighlight());
}
if (other.getAllTermsRequired() != false) {
setAllTermsRequired(other.getAllTermsRequired());
}
if (!other.contexts_.isEmpty()) {
if (contexts_.isEmpty()) {
contexts_ = other.contexts_;
bitField0_ |= 0x00000020;
} else {
ensureContextsIsMutable();
contexts_.addAll(other.contexts_);
}
onChanged();
}
if (other.getCount() != 0) {
setCount(other.getCount());
}
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: {
indexName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
suggestName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
text_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
highlight_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
allTermsRequired_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureContextsIsMutable();
contexts_.add(s);
break;
} // case 50
case 56: {
count_ = input.readInt32();
bitField0_ |= 0x00000040;
break;
} // case 56
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 indexName_ = "";
/**
*
*Index name
*
*
* string indexName = 1;
* @return The indexName.
*/
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Index name
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Index name
*
*
* string indexName = 1;
* @param value The indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Index name
*
*
* string indexName = 1;
* @return This builder for chaining.
*/
public Builder clearIndexName() {
indexName_ = getDefaultInstance().getIndexName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Index name
*
*
* string indexName = 1;
* @param value The bytes for indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object suggestName_ = "";
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @return The suggestName.
*/
public java.lang.String getSuggestName() {
java.lang.Object ref = suggestName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
suggestName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @return The bytes for suggestName.
*/
public com.google.protobuf.ByteString
getSuggestNameBytes() {
java.lang.Object ref = suggestName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
suggestName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @param value The suggestName to set.
* @return This builder for chaining.
*/
public Builder setSuggestName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
suggestName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @return This builder for chaining.
*/
public Builder clearSuggestName() {
suggestName_ = getDefaultInstance().getSuggestName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*Which suggester to use
*
*
* string suggestName = 2;
* @param value The bytes for suggestName to set.
* @return This builder for chaining.
*/
public Builder setSuggestNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
suggestName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object text_ = "";
/**
*
*Text to suggest from
*
*
* 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;
}
}
/**
*
*Text to suggest from
*
*
* 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;
}
}
/**
*
*Text to suggest from
*
*
* 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;
}
/**
*
*Text to suggest from
*
*
* string text = 3;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*Text to suggest from
*
*
* 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 boolean highlight_ ;
/**
*
*True if the suggestions should be highlighted (currently only works with AnalyzingInfixSuggester)
*
*
* bool highlight = 4;
* @return The highlight.
*/
@java.lang.Override
public boolean getHighlight() {
return highlight_;
}
/**
*
*True if the suggestions should be highlighted (currently only works with AnalyzingInfixSuggester)
*
*
* bool highlight = 4;
* @param value The highlight to set.
* @return This builder for chaining.
*/
public Builder setHighlight(boolean value) {
highlight_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*True if the suggestions should be highlighted (currently only works with AnalyzingInfixSuggester)
*
*
* bool highlight = 4;
* @return This builder for chaining.
*/
public Builder clearHighlight() {
bitField0_ = (bitField0_ & ~0x00000008);
highlight_ = false;
onChanged();
return this;
}
private boolean allTermsRequired_ ;
/**
*
*If true then all terms must be found (this only applies to InfixSuggester currently)
*
*
* bool allTermsRequired = 5;
* @return The allTermsRequired.
*/
@java.lang.Override
public boolean getAllTermsRequired() {
return allTermsRequired_;
}
/**
*
*If true then all terms must be found (this only applies to InfixSuggester currently)
*
*
* bool allTermsRequired = 5;
* @param value The allTermsRequired to set.
* @return This builder for chaining.
*/
public Builder setAllTermsRequired(boolean value) {
allTermsRequired_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*If true then all terms must be found (this only applies to InfixSuggester currently)
*
*
* bool allTermsRequired = 5;
* @return This builder for chaining.
*/
public Builder clearAllTermsRequired() {
bitField0_ = (bitField0_ & ~0x00000010);
allTermsRequired_ = false;
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_ |= 0x00000020;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @return A list containing the contexts.
*/
public com.google.protobuf.ProtocolStringList
getContextsList() {
contexts_.makeImmutable();
return contexts_;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @return The count of contexts.
*/
public int getContextsCount() {
return contexts_.size();
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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);
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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);
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @return This builder for chaining.
*/
public Builder clearContexts() {
contexts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);;
onChanged();
return this;
}
/**
*
*Which contexts to filter by
*
*
* repeated string contexts = 6;
* @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_ |= 0x00000020;
onChanged();
return this;
}
private int count_ ;
/**
*
*How many suggestions to return, default = 5
*
*
* int32 count = 7;
* @return The count.
*/
@java.lang.Override
public int getCount() {
return count_;
}
/**
*
*How many suggestions to return, default = 5
*
*
* int32 count = 7;
* @param value The count to set.
* @return This builder for chaining.
*/
public Builder setCount(int value) {
count_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*How many suggestions to return, default = 5
*
*
* int32 count = 7;
* @return This builder for chaining.
*/
public Builder clearCount() {
bitField0_ = (bitField0_ & ~0x00000040);
count_ = 0;
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.SuggestLookupRequest)
}
// @@protoc_insertion_point(class_scope:luceneserver.SuggestLookupRequest)
private static final com.yelp.nrtsearch.server.grpc.SuggestLookupRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.SuggestLookupRequest();
}
public static com.yelp.nrtsearch.server.grpc.SuggestLookupRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SuggestLookupRequest 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.SuggestLookupRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy