com.yelp.nrtsearch.server.grpc.TermQuery 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/search.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* A query that matches documents containing a term.
*
*
* Protobuf type {@code luceneserver.TermQuery}
*/
public final class TermQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.TermQuery)
TermQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use TermQuery.newBuilder() to construct.
private TermQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TermQuery() {
field_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TermQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.TermQuery.class, com.yelp.nrtsearch.server.grpc.TermQuery.Builder.class);
}
private int termTypesCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object termTypes_;
public enum TermTypesCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TEXTVALUE(2),
INTVALUE(3),
LONGVALUE(4),
FLOATVALUE(5),
DOUBLEVALUE(6),
BOOLEANVALUE(7),
TERMTYPES_NOT_SET(0);
private final int value;
private TermTypesCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TermTypesCase valueOf(int value) {
return forNumber(value);
}
public static TermTypesCase forNumber(int value) {
switch (value) {
case 2: return TEXTVALUE;
case 3: return INTVALUE;
case 4: return LONGVALUE;
case 5: return FLOATVALUE;
case 6: return DOUBLEVALUE;
case 7: return BOOLEANVALUE;
case 0: return TERMTYPES_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TermTypesCase
getTermTypesCase() {
return TermTypesCase.forNumber(
termTypesCase_);
}
public static final int FIELD_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object field_ = "";
/**
*
* Field in the document to query.
*
*
* 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;
}
}
/**
*
* Field in the document to query.
*
*
* 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 TEXTVALUE_FIELD_NUMBER = 2;
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return Whether the textValue field is set.
*/
public boolean hasTextValue() {
return termTypesCase_ == 2;
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return The textValue.
*/
public java.lang.String getTextValue() {
java.lang.Object ref = "";
if (termTypesCase_ == 2) {
ref = termTypes_;
}
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();
if (termTypesCase_ == 2) {
termTypes_ = s;
}
return s;
}
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return The bytes for textValue.
*/
public com.google.protobuf.ByteString
getTextValueBytes() {
java.lang.Object ref = "";
if (termTypesCase_ == 2) {
ref = termTypes_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (termTypesCase_ == 2) {
termTypes_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INTVALUE_FIELD_NUMBER = 3;
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @return Whether the intValue field is set.
*/
@java.lang.Override
public boolean hasIntValue() {
return termTypesCase_ == 3;
}
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @return The intValue.
*/
@java.lang.Override
public int getIntValue() {
if (termTypesCase_ == 3) {
return (java.lang.Integer) termTypes_;
}
return 0;
}
public static final int LONGVALUE_FIELD_NUMBER = 4;
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @return Whether the longValue field is set.
*/
@java.lang.Override
public boolean hasLongValue() {
return termTypesCase_ == 4;
}
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @return The longValue.
*/
@java.lang.Override
public long getLongValue() {
if (termTypesCase_ == 4) {
return (java.lang.Long) termTypes_;
}
return 0L;
}
public static final int FLOATVALUE_FIELD_NUMBER = 5;
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @return Whether the floatValue field is set.
*/
@java.lang.Override
public boolean hasFloatValue() {
return termTypesCase_ == 5;
}
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @return The floatValue.
*/
@java.lang.Override
public float getFloatValue() {
if (termTypesCase_ == 5) {
return (java.lang.Float) termTypes_;
}
return 0F;
}
public static final int DOUBLEVALUE_FIELD_NUMBER = 6;
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @return Whether the doubleValue field is set.
*/
@java.lang.Override
public boolean hasDoubleValue() {
return termTypesCase_ == 6;
}
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
if (termTypesCase_ == 6) {
return (java.lang.Double) termTypes_;
}
return 0D;
}
public static final int BOOLEANVALUE_FIELD_NUMBER = 7;
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @return Whether the booleanValue field is set.
*/
@java.lang.Override
public boolean hasBooleanValue() {
return termTypesCase_ == 7;
}
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @return The booleanValue.
*/
@java.lang.Override
public boolean getBooleanValue() {
if (termTypesCase_ == 7) {
return (java.lang.Boolean) termTypes_;
}
return false;
}
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 (termTypesCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, termTypes_);
}
if (termTypesCase_ == 3) {
output.writeInt32(
3, (int)((java.lang.Integer) termTypes_));
}
if (termTypesCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) termTypes_));
}
if (termTypesCase_ == 5) {
output.writeFloat(
5, (float)((java.lang.Float) termTypes_));
}
if (termTypesCase_ == 6) {
output.writeDouble(
6, (double)((java.lang.Double) termTypes_));
}
if (termTypesCase_ == 7) {
output.writeBool(
7, (boolean)((java.lang.Boolean) termTypes_));
}
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 (termTypesCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, termTypes_);
}
if (termTypesCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(
3, (int)((java.lang.Integer) termTypes_));
}
if (termTypesCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) termTypes_));
}
if (termTypesCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
5, (float)((java.lang.Float) termTypes_));
}
if (termTypesCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
6, (double)((java.lang.Double) termTypes_));
}
if (termTypesCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
7, (boolean)((java.lang.Boolean) termTypes_));
}
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.TermQuery)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.TermQuery other = (com.yelp.nrtsearch.server.grpc.TermQuery) obj;
if (!getField()
.equals(other.getField())) return false;
if (!getTermTypesCase().equals(other.getTermTypesCase())) return false;
switch (termTypesCase_) {
case 2:
if (!getTextValue()
.equals(other.getTextValue())) return false;
break;
case 3:
if (getIntValue()
!= other.getIntValue()) return false;
break;
case 4:
if (getLongValue()
!= other.getLongValue()) return false;
break;
case 5:
if (java.lang.Float.floatToIntBits(getFloatValue())
!= java.lang.Float.floatToIntBits(
other.getFloatValue())) return false;
break;
case 6:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 7:
if (getBooleanValue()
!= other.getBooleanValue()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FIELD_FIELD_NUMBER;
hash = (53 * hash) + getField().hashCode();
switch (termTypesCase_) {
case 2:
hash = (37 * hash) + TEXTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getTextValue().hashCode();
break;
case 3:
hash = (37 * hash) + INTVALUE_FIELD_NUMBER;
hash = (53 * hash) + getIntValue();
break;
case 4:
hash = (37 * hash) + LONGVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLongValue());
break;
case 5:
hash = (37 * hash) + FLOATVALUE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getFloatValue());
break;
case 6:
hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 7:
hash = (37 * hash) + BOOLEANVALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBooleanValue());
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.TermQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.TermQuery 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.TermQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.TermQuery 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.TermQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.TermQuery 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.TermQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.TermQuery 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.TermQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.TermQuery 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.TermQuery 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.TermQuery 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.TermQuery 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 that matches documents containing a term.
*
*
* Protobuf type {@code luceneserver.TermQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.TermQuery)
com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.TermQuery.class, com.yelp.nrtsearch.server.grpc.TermQuery.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.TermQuery.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
field_ = "";
termTypesCase_ = 0;
termTypes_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermQuery_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQuery getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQuery build() {
com.yelp.nrtsearch.server.grpc.TermQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQuery buildPartial() {
com.yelp.nrtsearch.server.grpc.TermQuery result = new com.yelp.nrtsearch.server.grpc.TermQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.TermQuery result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.field_ = field_;
}
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.TermQuery result) {
result.termTypesCase_ = termTypesCase_;
result.termTypes_ = this.termTypes_;
}
@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.TermQuery) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.TermQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.TermQuery other) {
if (other == com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance()) return this;
if (!other.getField().isEmpty()) {
field_ = other.field_;
bitField0_ |= 0x00000001;
onChanged();
}
switch (other.getTermTypesCase()) {
case TEXTVALUE: {
termTypesCase_ = 2;
termTypes_ = other.termTypes_;
onChanged();
break;
}
case INTVALUE: {
setIntValue(other.getIntValue());
break;
}
case LONGVALUE: {
setLongValue(other.getLongValue());
break;
}
case FLOATVALUE: {
setFloatValue(other.getFloatValue());
break;
}
case DOUBLEVALUE: {
setDoubleValue(other.getDoubleValue());
break;
}
case BOOLEANVALUE: {
setBooleanValue(other.getBooleanValue());
break;
}
case TERMTYPES_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
field_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
termTypesCase_ = 2;
termTypes_ = s;
break;
} // case 18
case 24: {
termTypes_ = input.readInt32();
termTypesCase_ = 3;
break;
} // case 24
case 32: {
termTypes_ = input.readInt64();
termTypesCase_ = 4;
break;
} // case 32
case 45: {
termTypes_ = input.readFloat();
termTypesCase_ = 5;
break;
} // case 45
case 49: {
termTypes_ = input.readDouble();
termTypesCase_ = 6;
break;
} // case 49
case 56: {
termTypes_ = input.readBool();
termTypesCase_ = 7;
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 termTypesCase_ = 0;
private java.lang.Object termTypes_;
public TermTypesCase
getTermTypesCase() {
return TermTypesCase.forNumber(
termTypesCase_);
}
public Builder clearTermTypes() {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object field_ = "";
/**
*
* Field in the document to query.
*
*
* 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;
}
}
/**
*
* Field in the document to query.
*
*
* 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;
}
}
/**
*
* Field in the document to query.
*
*
* 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;
}
/**
*
* Field in the document to query.
*
*
* string field = 1;
* @return This builder for chaining.
*/
public Builder clearField() {
field_ = getDefaultInstance().getField();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Field in the document to query.
*
*
* 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;
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return Whether the textValue field is set.
*/
@java.lang.Override
public boolean hasTextValue() {
return termTypesCase_ == 2;
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return The textValue.
*/
@java.lang.Override
public java.lang.String getTextValue() {
java.lang.Object ref = "";
if (termTypesCase_ == 2) {
ref = termTypes_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (termTypesCase_ == 2) {
termTypes_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return The bytes for textValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextValueBytes() {
java.lang.Object ref = "";
if (termTypesCase_ == 2) {
ref = termTypes_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (termTypesCase_ == 2) {
termTypes_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @param value The textValue to set.
* @return This builder for chaining.
*/
public Builder setTextValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
termTypesCase_ = 2;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @return This builder for chaining.
*/
public Builder clearTextValue() {
if (termTypesCase_ == 2) {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
}
return this;
}
/**
*
* TEXT FieldType term to search for.
*
*
* string textValue = 2;
* @param value The bytes for textValue to set.
* @return This builder for chaining.
*/
public Builder setTextValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
termTypesCase_ = 2;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @return Whether the intValue field is set.
*/
public boolean hasIntValue() {
return termTypesCase_ == 3;
}
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @return The intValue.
*/
public int getIntValue() {
if (termTypesCase_ == 3) {
return (java.lang.Integer) termTypes_;
}
return 0;
}
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @param value The intValue to set.
* @return This builder for chaining.
*/
public Builder setIntValue(int value) {
termTypesCase_ = 3;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* INT FieldType term to search for.
*
*
* int32 intValue = 3;
* @return This builder for chaining.
*/
public Builder clearIntValue() {
if (termTypesCase_ == 3) {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
}
return this;
}
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @return Whether the longValue field is set.
*/
public boolean hasLongValue() {
return termTypesCase_ == 4;
}
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @return The longValue.
*/
public long getLongValue() {
if (termTypesCase_ == 4) {
return (java.lang.Long) termTypes_;
}
return 0L;
}
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @param value The longValue to set.
* @return This builder for chaining.
*/
public Builder setLongValue(long value) {
termTypesCase_ = 4;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* LONG FieldType term to search for.
*
*
* int64 longValue = 4;
* @return This builder for chaining.
*/
public Builder clearLongValue() {
if (termTypesCase_ == 4) {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
}
return this;
}
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @return Whether the floatValue field is set.
*/
public boolean hasFloatValue() {
return termTypesCase_ == 5;
}
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @return The floatValue.
*/
public float getFloatValue() {
if (termTypesCase_ == 5) {
return (java.lang.Float) termTypes_;
}
return 0F;
}
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @param value The floatValue to set.
* @return This builder for chaining.
*/
public Builder setFloatValue(float value) {
termTypesCase_ = 5;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* FLOAT FieldType term to search for.
*
*
* float floatValue = 5;
* @return This builder for chaining.
*/
public Builder clearFloatValue() {
if (termTypesCase_ == 5) {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
}
return this;
}
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @return Whether the doubleValue field is set.
*/
public boolean hasDoubleValue() {
return termTypesCase_ == 6;
}
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @return The doubleValue.
*/
public double getDoubleValue() {
if (termTypesCase_ == 6) {
return (java.lang.Double) termTypes_;
}
return 0D;
}
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
termTypesCase_ = 6;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* DOUBLE FieldType term to search for.
*
*
* double doubleValue = 6;
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
if (termTypesCase_ == 6) {
termTypesCase_ = 0;
termTypes_ = null;
onChanged();
}
return this;
}
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @return Whether the booleanValue field is set.
*/
public boolean hasBooleanValue() {
return termTypesCase_ == 7;
}
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @return The booleanValue.
*/
public boolean getBooleanValue() {
if (termTypesCase_ == 7) {
return (java.lang.Boolean) termTypes_;
}
return false;
}
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @param value The booleanValue to set.
* @return This builder for chaining.
*/
public Builder setBooleanValue(boolean value) {
termTypesCase_ = 7;
termTypes_ = value;
onChanged();
return this;
}
/**
*
* BOOLEAN FieldType term to search for.
*
*
* bool booleanValue = 7;
* @return This builder for chaining.
*/
public Builder clearBooleanValue() {
if (termTypesCase_ == 7) {
termTypesCase_ = 0;
termTypes_ = null;
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.TermQuery)
}
// @@protoc_insertion_point(class_scope:luceneserver.TermQuery)
private static final com.yelp.nrtsearch.server.grpc.TermQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.TermQuery();
}
public static com.yelp.nrtsearch.server.grpc.TermQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TermQuery 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.TermQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}