com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* A suggester that matches fuzzy terms in the input text
*
*
* Protobuf type {@code luceneserver.FuzzyInfixSuggester}
*/
public final class FuzzyInfixSuggester extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.FuzzyInfixSuggester)
FuzzyInfixSuggesterOrBuilder {
private static final long serialVersionUID = 0L;
// Use FuzzyInfixSuggester.newBuilder() to construct.
private FuzzyInfixSuggester(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FuzzyInfixSuggester() {
analyzer_ = "";
indexAnalyzer_ = "";
queryAnalyzer_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FuzzyInfixSuggester();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzyInfixSuggester_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzyInfixSuggester_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.class, com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.Builder.class);
}
public static final int ANALYZER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object analyzer_ = "";
/**
* string analyzer = 1;
* @return The analyzer.
*/
@java.lang.Override
public java.lang.String getAnalyzer() {
java.lang.Object ref = analyzer_;
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();
analyzer_ = s;
return s;
}
}
/**
* string analyzer = 1;
* @return The bytes for analyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnalyzerBytes() {
java.lang.Object ref = analyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
analyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INDEXANALYZER_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object indexAnalyzer_ = "";
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The indexAnalyzer.
*/
@java.lang.Override
public java.lang.String getIndexAnalyzer() {
java.lang.Object ref = indexAnalyzer_;
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();
indexAnalyzer_ = s;
return s;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The bytes for indexAnalyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexAnalyzerBytes() {
java.lang.Object ref = indexAnalyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUERYANALYZER_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object queryAnalyzer_ = "";
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The queryAnalyzer.
*/
@java.lang.Override
public java.lang.String getQueryAnalyzer() {
java.lang.Object ref = queryAnalyzer_;
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();
queryAnalyzer_ = s;
return s;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The bytes for queryAnalyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryAnalyzerBytes() {
java.lang.Object ref = queryAnalyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MINFUZZYLENGTH_FIELD_NUMBER = 4;
private int minFuzzyLength_ = 0;
/**
*
*Minimum key length before edits are allowed,
*
*
* int32 minFuzzyLength = 4;
* @return The minFuzzyLength.
*/
@java.lang.Override
public int getMinFuzzyLength() {
return minFuzzyLength_;
}
public static final int NONFUZZYPREFIX_FIELD_NUMBER = 5;
private int nonFuzzyPrefix_ = 0;
/**
*
*Key prefix where edits are not allowed,
*
*
* int32 nonFuzzyPrefix = 5;
* @return The nonFuzzyPrefix.
*/
@java.lang.Override
public int getNonFuzzyPrefix() {
return nonFuzzyPrefix_;
}
public static final int MAXEDITS_FIELD_NUMBER = 6;
private int maxEdits_ = 0;
/**
*
*Maximum number of edits for fuzzy suggestions
*
*
* int32 maxEdits = 6;
* @return The maxEdits.
*/
@java.lang.Override
public int getMaxEdits() {
return maxEdits_;
}
public static final int TRANSPOSITIONS_FIELD_NUMBER = 7;
private boolean transpositions_ = false;
/**
*
*Whether transpositions are allowed
*
*
* bool transpositions = 7;
* @return The transpositions.
*/
@java.lang.Override
public boolean getTranspositions() {
return transpositions_;
}
public static final int UNICODEAWARE_FIELD_NUMBER = 8;
private boolean unicodeAware_ = false;
/**
*
*True if all edits are measured in unicode characters, not UTF-8 bytes
*
*
* bool unicodeAware = 8;
* @return The unicodeAware.
*/
@java.lang.Override
public boolean getUnicodeAware() {
return unicodeAware_;
}
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(analyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexAnalyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indexAnalyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryAnalyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, queryAnalyzer_);
}
if (minFuzzyLength_ != 0) {
output.writeInt32(4, minFuzzyLength_);
}
if (nonFuzzyPrefix_ != 0) {
output.writeInt32(5, nonFuzzyPrefix_);
}
if (maxEdits_ != 0) {
output.writeInt32(6, maxEdits_);
}
if (transpositions_ != false) {
output.writeBool(7, transpositions_);
}
if (unicodeAware_ != false) {
output.writeBool(8, unicodeAware_);
}
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(analyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, analyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexAnalyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indexAnalyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryAnalyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, queryAnalyzer_);
}
if (minFuzzyLength_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, minFuzzyLength_);
}
if (nonFuzzyPrefix_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, nonFuzzyPrefix_);
}
if (maxEdits_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, maxEdits_);
}
if (transpositions_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, transpositions_);
}
if (unicodeAware_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, unicodeAware_);
}
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.FuzzyInfixSuggester)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester other = (com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester) obj;
if (!getAnalyzer()
.equals(other.getAnalyzer())) return false;
if (!getIndexAnalyzer()
.equals(other.getIndexAnalyzer())) return false;
if (!getQueryAnalyzer()
.equals(other.getQueryAnalyzer())) return false;
if (getMinFuzzyLength()
!= other.getMinFuzzyLength()) return false;
if (getNonFuzzyPrefix()
!= other.getNonFuzzyPrefix()) return false;
if (getMaxEdits()
!= other.getMaxEdits()) return false;
if (getTranspositions()
!= other.getTranspositions()) return false;
if (getUnicodeAware()
!= other.getUnicodeAware()) 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) + ANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getAnalyzer().hashCode();
hash = (37 * hash) + INDEXANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getIndexAnalyzer().hashCode();
hash = (37 * hash) + QUERYANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getQueryAnalyzer().hashCode();
hash = (37 * hash) + MINFUZZYLENGTH_FIELD_NUMBER;
hash = (53 * hash) + getMinFuzzyLength();
hash = (37 * hash) + NONFUZZYPREFIX_FIELD_NUMBER;
hash = (53 * hash) + getNonFuzzyPrefix();
hash = (37 * hash) + MAXEDITS_FIELD_NUMBER;
hash = (53 * hash) + getMaxEdits();
hash = (37 * hash) + TRANSPOSITIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTranspositions());
hash = (37 * hash) + UNICODEAWARE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUnicodeAware());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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.FuzzyInfixSuggester parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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.FuzzyInfixSuggester parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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.FuzzyInfixSuggester parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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.FuzzyInfixSuggester parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester 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.FuzzyInfixSuggester 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.FuzzyInfixSuggester 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.FuzzyInfixSuggester 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 suggester that matches fuzzy terms in the input text
*
*
* Protobuf type {@code luceneserver.FuzzyInfixSuggester}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.FuzzyInfixSuggester)
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggesterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzyInfixSuggester_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzyInfixSuggester_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.class, com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
analyzer_ = "";
indexAnalyzer_ = "";
queryAnalyzer_ = "";
minFuzzyLength_ = 0;
nonFuzzyPrefix_ = 0;
maxEdits_ = 0;
transpositions_ = false;
unicodeAware_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzyInfixSuggester_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester build() {
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester buildPartial() {
com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester result = new com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.analyzer_ = analyzer_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.indexAnalyzer_ = indexAnalyzer_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.queryAnalyzer_ = queryAnalyzer_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.minFuzzyLength_ = minFuzzyLength_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.nonFuzzyPrefix_ = nonFuzzyPrefix_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.maxEdits_ = maxEdits_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.transpositions_ = transpositions_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.unicodeAware_ = unicodeAware_;
}
}
@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.FuzzyInfixSuggester) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester other) {
if (other == com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester.getDefaultInstance()) return this;
if (!other.getAnalyzer().isEmpty()) {
analyzer_ = other.analyzer_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getIndexAnalyzer().isEmpty()) {
indexAnalyzer_ = other.indexAnalyzer_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getQueryAnalyzer().isEmpty()) {
queryAnalyzer_ = other.queryAnalyzer_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getMinFuzzyLength() != 0) {
setMinFuzzyLength(other.getMinFuzzyLength());
}
if (other.getNonFuzzyPrefix() != 0) {
setNonFuzzyPrefix(other.getNonFuzzyPrefix());
}
if (other.getMaxEdits() != 0) {
setMaxEdits(other.getMaxEdits());
}
if (other.getTranspositions() != false) {
setTranspositions(other.getTranspositions());
}
if (other.getUnicodeAware() != false) {
setUnicodeAware(other.getUnicodeAware());
}
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: {
analyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
indexAnalyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
queryAnalyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
minFuzzyLength_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
nonFuzzyPrefix_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
maxEdits_ = input.readInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56: {
transpositions_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 56
case 64: {
unicodeAware_ = input.readBool();
bitField0_ |= 0x00000080;
break;
} // case 64
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 analyzer_ = "";
/**
* string analyzer = 1;
* @return The analyzer.
*/
public java.lang.String getAnalyzer() {
java.lang.Object ref = analyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
analyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string analyzer = 1;
* @return The bytes for analyzer.
*/
public com.google.protobuf.ByteString
getAnalyzerBytes() {
java.lang.Object ref = analyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
analyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string analyzer = 1;
* @param value The analyzer to set.
* @return This builder for chaining.
*/
public Builder setAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
analyzer_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string analyzer = 1;
* @return This builder for chaining.
*/
public Builder clearAnalyzer() {
analyzer_ = getDefaultInstance().getAnalyzer();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string analyzer = 1;
* @param value The bytes for analyzer to set.
* @return This builder for chaining.
*/
public Builder setAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
analyzer_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object indexAnalyzer_ = "";
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The indexAnalyzer.
*/
public java.lang.String getIndexAnalyzer() {
java.lang.Object ref = indexAnalyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexAnalyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The bytes for indexAnalyzer.
*/
public com.google.protobuf.ByteString
getIndexAnalyzerBytes() {
java.lang.Object ref = indexAnalyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @param value The indexAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setIndexAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
indexAnalyzer_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return This builder for chaining.
*/
public Builder clearIndexAnalyzer() {
indexAnalyzer_ = getDefaultInstance().getIndexAnalyzer();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @param value The bytes for indexAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setIndexAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
indexAnalyzer_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object queryAnalyzer_ = "";
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The queryAnalyzer.
*/
public java.lang.String getQueryAnalyzer() {
java.lang.Object ref = queryAnalyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryAnalyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The bytes for queryAnalyzer.
*/
public com.google.protobuf.ByteString
getQueryAnalyzerBytes() {
java.lang.Object ref = queryAnalyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @param value The queryAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setQueryAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
queryAnalyzer_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return This builder for chaining.
*/
public Builder clearQueryAnalyzer() {
queryAnalyzer_ = getDefaultInstance().getQueryAnalyzer();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @param value The bytes for queryAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setQueryAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
queryAnalyzer_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int minFuzzyLength_ ;
/**
*
*Minimum key length before edits are allowed,
*
*
* int32 minFuzzyLength = 4;
* @return The minFuzzyLength.
*/
@java.lang.Override
public int getMinFuzzyLength() {
return minFuzzyLength_;
}
/**
*
*Minimum key length before edits are allowed,
*
*
* int32 minFuzzyLength = 4;
* @param value The minFuzzyLength to set.
* @return This builder for chaining.
*/
public Builder setMinFuzzyLength(int value) {
minFuzzyLength_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Minimum key length before edits are allowed,
*
*
* int32 minFuzzyLength = 4;
* @return This builder for chaining.
*/
public Builder clearMinFuzzyLength() {
bitField0_ = (bitField0_ & ~0x00000008);
minFuzzyLength_ = 0;
onChanged();
return this;
}
private int nonFuzzyPrefix_ ;
/**
*
*Key prefix where edits are not allowed,
*
*
* int32 nonFuzzyPrefix = 5;
* @return The nonFuzzyPrefix.
*/
@java.lang.Override
public int getNonFuzzyPrefix() {
return nonFuzzyPrefix_;
}
/**
*
*Key prefix where edits are not allowed,
*
*
* int32 nonFuzzyPrefix = 5;
* @param value The nonFuzzyPrefix to set.
* @return This builder for chaining.
*/
public Builder setNonFuzzyPrefix(int value) {
nonFuzzyPrefix_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Key prefix where edits are not allowed,
*
*
* int32 nonFuzzyPrefix = 5;
* @return This builder for chaining.
*/
public Builder clearNonFuzzyPrefix() {
bitField0_ = (bitField0_ & ~0x00000010);
nonFuzzyPrefix_ = 0;
onChanged();
return this;
}
private int maxEdits_ ;
/**
*
*Maximum number of edits for fuzzy suggestions
*
*
* int32 maxEdits = 6;
* @return The maxEdits.
*/
@java.lang.Override
public int getMaxEdits() {
return maxEdits_;
}
/**
*
*Maximum number of edits for fuzzy suggestions
*
*
* int32 maxEdits = 6;
* @param value The maxEdits to set.
* @return This builder for chaining.
*/
public Builder setMaxEdits(int value) {
maxEdits_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Maximum number of edits for fuzzy suggestions
*
*
* int32 maxEdits = 6;
* @return This builder for chaining.
*/
public Builder clearMaxEdits() {
bitField0_ = (bitField0_ & ~0x00000020);
maxEdits_ = 0;
onChanged();
return this;
}
private boolean transpositions_ ;
/**
*
*Whether transpositions are allowed
*
*
* bool transpositions = 7;
* @return The transpositions.
*/
@java.lang.Override
public boolean getTranspositions() {
return transpositions_;
}
/**
*
*Whether transpositions are allowed
*
*
* bool transpositions = 7;
* @param value The transpositions to set.
* @return This builder for chaining.
*/
public Builder setTranspositions(boolean value) {
transpositions_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Whether transpositions are allowed
*
*
* bool transpositions = 7;
* @return This builder for chaining.
*/
public Builder clearTranspositions() {
bitField0_ = (bitField0_ & ~0x00000040);
transpositions_ = false;
onChanged();
return this;
}
private boolean unicodeAware_ ;
/**
*
*True if all edits are measured in unicode characters, not UTF-8 bytes
*
*
* bool unicodeAware = 8;
* @return The unicodeAware.
*/
@java.lang.Override
public boolean getUnicodeAware() {
return unicodeAware_;
}
/**
*
*True if all edits are measured in unicode characters, not UTF-8 bytes
*
*
* bool unicodeAware = 8;
* @param value The unicodeAware to set.
* @return This builder for chaining.
*/
public Builder setUnicodeAware(boolean value) {
unicodeAware_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*True if all edits are measured in unicode characters, not UTF-8 bytes
*
*
* bool unicodeAware = 8;
* @return This builder for chaining.
*/
public Builder clearUnicodeAware() {
bitField0_ = (bitField0_ & ~0x00000080);
unicodeAware_ = false;
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.FuzzyInfixSuggester)
}
// @@protoc_insertion_point(class_scope:luceneserver.FuzzyInfixSuggester)
private static final com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester();
}
public static com.yelp.nrtsearch.server.grpc.FuzzyInfixSuggester getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FuzzyInfixSuggester 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.FuzzyInfixSuggester getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}