com.yelp.nrtsearch.server.grpc.SpanQuery 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;
/**
*
* Wrapper message for different types of SpanQuery
*
*
* Protobuf type {@code luceneserver.SpanQuery}
*/
public final class SpanQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.SpanQuery)
SpanQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use SpanQuery.newBuilder() to construct.
private SpanQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SpanQuery() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SpanQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SpanQuery.class, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder.class);
}
private int queryCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object query_;
public enum QueryCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SPANTERMQUERY(1),
SPANNEARQUERY(2),
SPANMULTITERMQUERY(3),
QUERY_NOT_SET(0);
private final int value;
private QueryCase(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 QueryCase valueOf(int value) {
return forNumber(value);
}
public static QueryCase forNumber(int value) {
switch (value) {
case 1: return SPANTERMQUERY;
case 2: return SPANNEARQUERY;
case 3: return SPANMULTITERMQUERY;
case 0: return QUERY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public QueryCase
getQueryCase() {
return QueryCase.forNumber(
queryCase_);
}
public static final int SPANTERMQUERY_FIELD_NUMBER = 1;
/**
* .luceneserver.TermQuery spanTermQuery = 1;
* @return Whether the spanTermQuery field is set.
*/
@java.lang.Override
public boolean hasSpanTermQuery() {
return queryCase_ == 1;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
* @return The spanTermQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQuery getSpanTermQuery() {
if (queryCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.TermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder getSpanTermQueryOrBuilder() {
if (queryCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.TermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
public static final int SPANNEARQUERY_FIELD_NUMBER = 2;
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
* @return Whether the spanNearQuery field is set.
*/
@java.lang.Override
public boolean hasSpanNearQuery() {
return queryCase_ == 2;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
* @return The spanNearQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQuery getSpanNearQuery() {
if (queryCase_ == 2) {
return (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder getSpanNearQueryOrBuilder() {
if (queryCase_ == 2) {
return (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
public static final int SPANMULTITERMQUERY_FIELD_NUMBER = 3;
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
* @return Whether the spanMultiTermQuery field is set.
*/
@java.lang.Override
public boolean hasSpanMultiTermQuery() {
return queryCase_ == 3;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
* @return The spanMultiTermQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery getSpanMultiTermQuery() {
if (queryCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanMultiTermQueryOrBuilder getSpanMultiTermQueryOrBuilder() {
if (queryCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (queryCase_ == 1) {
output.writeMessage(1, (com.yelp.nrtsearch.server.grpc.TermQuery) query_);
}
if (queryCase_ == 2) {
output.writeMessage(2, (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_);
}
if (queryCase_ == 3) {
output.writeMessage(3, (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (queryCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.yelp.nrtsearch.server.grpc.TermQuery) query_);
}
if (queryCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_);
}
if (queryCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_);
}
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.SpanQuery)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.SpanQuery other = (com.yelp.nrtsearch.server.grpc.SpanQuery) obj;
if (!getQueryCase().equals(other.getQueryCase())) return false;
switch (queryCase_) {
case 1:
if (!getSpanTermQuery()
.equals(other.getSpanTermQuery())) return false;
break;
case 2:
if (!getSpanNearQuery()
.equals(other.getSpanNearQuery())) return false;
break;
case 3:
if (!getSpanMultiTermQuery()
.equals(other.getSpanMultiTermQuery())) 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();
switch (queryCase_) {
case 1:
hash = (37 * hash) + SPANTERMQUERY_FIELD_NUMBER;
hash = (53 * hash) + getSpanTermQuery().hashCode();
break;
case 2:
hash = (37 * hash) + SPANNEARQUERY_FIELD_NUMBER;
hash = (53 * hash) + getSpanNearQuery().hashCode();
break;
case 3:
hash = (37 * hash) + SPANMULTITERMQUERY_FIELD_NUMBER;
hash = (53 * hash) + getSpanMultiTermQuery().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery 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.SpanQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery 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.SpanQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery 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.SpanQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery 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.SpanQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery 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.SpanQuery 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.SpanQuery 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.SpanQuery 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;
}
/**
*
* Wrapper message for different types of SpanQuery
*
*
* Protobuf type {@code luceneserver.SpanQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.SpanQuery)
com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SpanQuery.class, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.SpanQuery.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (spanTermQueryBuilder_ != null) {
spanTermQueryBuilder_.clear();
}
if (spanNearQueryBuilder_ != null) {
spanNearQueryBuilder_.clear();
}
if (spanMultiTermQueryBuilder_ != null) {
spanMultiTermQueryBuilder_.clear();
}
queryCase_ = 0;
query_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanQuery_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanQuery getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.SpanQuery.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanQuery build() {
com.yelp.nrtsearch.server.grpc.SpanQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanQuery buildPartial() {
com.yelp.nrtsearch.server.grpc.SpanQuery result = new com.yelp.nrtsearch.server.grpc.SpanQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.SpanQuery result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.SpanQuery result) {
result.queryCase_ = queryCase_;
result.query_ = this.query_;
if (queryCase_ == 1 &&
spanTermQueryBuilder_ != null) {
result.query_ = spanTermQueryBuilder_.build();
}
if (queryCase_ == 2 &&
spanNearQueryBuilder_ != null) {
result.query_ = spanNearQueryBuilder_.build();
}
if (queryCase_ == 3 &&
spanMultiTermQueryBuilder_ != null) {
result.query_ = spanMultiTermQueryBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.yelp.nrtsearch.server.grpc.SpanQuery) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.SpanQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.SpanQuery other) {
if (other == com.yelp.nrtsearch.server.grpc.SpanQuery.getDefaultInstance()) return this;
switch (other.getQueryCase()) {
case SPANTERMQUERY: {
mergeSpanTermQuery(other.getSpanTermQuery());
break;
}
case SPANNEARQUERY: {
mergeSpanNearQuery(other.getSpanNearQuery());
break;
}
case SPANMULTITERMQUERY: {
mergeSpanMultiTermQuery(other.getSpanMultiTermQuery());
break;
}
case QUERY_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getSpanTermQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getSpanNearQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getSpanMultiTermQueryFieldBuilder().getBuilder(),
extensionRegistry);
queryCase_ = 3;
break;
} // case 26
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 queryCase_ = 0;
private java.lang.Object query_;
public QueryCase
getQueryCase() {
return QueryCase.forNumber(
queryCase_);
}
public Builder clearQuery() {
queryCase_ = 0;
query_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TermQuery, com.yelp.nrtsearch.server.grpc.TermQuery.Builder, com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder> spanTermQueryBuilder_;
/**
* .luceneserver.TermQuery spanTermQuery = 1;
* @return Whether the spanTermQuery field is set.
*/
@java.lang.Override
public boolean hasSpanTermQuery() {
return queryCase_ == 1;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
* @return The spanTermQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQuery getSpanTermQuery() {
if (spanTermQueryBuilder_ == null) {
if (queryCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.TermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
} else {
if (queryCase_ == 1) {
return spanTermQueryBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
public Builder setSpanTermQuery(com.yelp.nrtsearch.server.grpc.TermQuery value) {
if (spanTermQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
spanTermQueryBuilder_.setMessage(value);
}
queryCase_ = 1;
return this;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
public Builder setSpanTermQuery(
com.yelp.nrtsearch.server.grpc.TermQuery.Builder builderForValue) {
if (spanTermQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
spanTermQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 1;
return this;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
public Builder mergeSpanTermQuery(com.yelp.nrtsearch.server.grpc.TermQuery value) {
if (spanTermQueryBuilder_ == null) {
if (queryCase_ == 1 &&
query_ != com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance()) {
query_ = com.yelp.nrtsearch.server.grpc.TermQuery.newBuilder((com.yelp.nrtsearch.server.grpc.TermQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 1) {
spanTermQueryBuilder_.mergeFrom(value);
} else {
spanTermQueryBuilder_.setMessage(value);
}
}
queryCase_ = 1;
return this;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
public Builder clearSpanTermQuery() {
if (spanTermQueryBuilder_ == null) {
if (queryCase_ == 1) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 1) {
queryCase_ = 0;
query_ = null;
}
spanTermQueryBuilder_.clear();
}
return this;
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
public com.yelp.nrtsearch.server.grpc.TermQuery.Builder getSpanTermQueryBuilder() {
return getSpanTermQueryFieldBuilder().getBuilder();
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder getSpanTermQueryOrBuilder() {
if ((queryCase_ == 1) && (spanTermQueryBuilder_ != null)) {
return spanTermQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.TermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
}
/**
* .luceneserver.TermQuery spanTermQuery = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TermQuery, com.yelp.nrtsearch.server.grpc.TermQuery.Builder, com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder>
getSpanTermQueryFieldBuilder() {
if (spanTermQueryBuilder_ == null) {
if (!(queryCase_ == 1)) {
query_ = com.yelp.nrtsearch.server.grpc.TermQuery.getDefaultInstance();
}
spanTermQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TermQuery, com.yelp.nrtsearch.server.grpc.TermQuery.Builder, com.yelp.nrtsearch.server.grpc.TermQueryOrBuilder>(
(com.yelp.nrtsearch.server.grpc.TermQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 1;
onChanged();
return spanTermQueryBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanNearQuery, com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder> spanNearQueryBuilder_;
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
* @return Whether the spanNearQuery field is set.
*/
@java.lang.Override
public boolean hasSpanNearQuery() {
return queryCase_ == 2;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
* @return The spanNearQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQuery getSpanNearQuery() {
if (spanNearQueryBuilder_ == null) {
if (queryCase_ == 2) {
return (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
} else {
if (queryCase_ == 2) {
return spanNearQueryBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
public Builder setSpanNearQuery(com.yelp.nrtsearch.server.grpc.SpanNearQuery value) {
if (spanNearQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
spanNearQueryBuilder_.setMessage(value);
}
queryCase_ = 2;
return this;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
public Builder setSpanNearQuery(
com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder builderForValue) {
if (spanNearQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
spanNearQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 2;
return this;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
public Builder mergeSpanNearQuery(com.yelp.nrtsearch.server.grpc.SpanNearQuery value) {
if (spanNearQueryBuilder_ == null) {
if (queryCase_ == 2 &&
query_ != com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance()) {
query_ = com.yelp.nrtsearch.server.grpc.SpanNearQuery.newBuilder((com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 2) {
spanNearQueryBuilder_.mergeFrom(value);
} else {
spanNearQueryBuilder_.setMessage(value);
}
}
queryCase_ = 2;
return this;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
public Builder clearSpanNearQuery() {
if (spanNearQueryBuilder_ == null) {
if (queryCase_ == 2) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 2) {
queryCase_ = 0;
query_ = null;
}
spanNearQueryBuilder_.clear();
}
return this;
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
public com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder getSpanNearQueryBuilder() {
return getSpanNearQueryFieldBuilder().getBuilder();
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder getSpanNearQueryOrBuilder() {
if ((queryCase_ == 2) && (spanNearQueryBuilder_ != null)) {
return spanNearQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 2) {
return (com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
}
/**
* .luceneserver.SpanNearQuery spanNearQuery = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanNearQuery, com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder>
getSpanNearQueryFieldBuilder() {
if (spanNearQueryBuilder_ == null) {
if (!(queryCase_ == 2)) {
query_ = com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
spanNearQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanNearQuery, com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder>(
(com.yelp.nrtsearch.server.grpc.SpanNearQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 2;
onChanged();
return spanNearQueryBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery, com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanMultiTermQueryOrBuilder> spanMultiTermQueryBuilder_;
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
* @return Whether the spanMultiTermQuery field is set.
*/
@java.lang.Override
public boolean hasSpanMultiTermQuery() {
return queryCase_ == 3;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
* @return The spanMultiTermQuery.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery getSpanMultiTermQuery() {
if (spanMultiTermQueryBuilder_ == null) {
if (queryCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
} else {
if (queryCase_ == 3) {
return spanMultiTermQueryBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
}
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
public Builder setSpanMultiTermQuery(com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery value) {
if (spanMultiTermQueryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
} else {
spanMultiTermQueryBuilder_.setMessage(value);
}
queryCase_ = 3;
return this;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
public Builder setSpanMultiTermQuery(
com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.Builder builderForValue) {
if (spanMultiTermQueryBuilder_ == null) {
query_ = builderForValue.build();
onChanged();
} else {
spanMultiTermQueryBuilder_.setMessage(builderForValue.build());
}
queryCase_ = 3;
return this;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
public Builder mergeSpanMultiTermQuery(com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery value) {
if (spanMultiTermQueryBuilder_ == null) {
if (queryCase_ == 3 &&
query_ != com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance()) {
query_ = com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.newBuilder((com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_)
.mergeFrom(value).buildPartial();
} else {
query_ = value;
}
onChanged();
} else {
if (queryCase_ == 3) {
spanMultiTermQueryBuilder_.mergeFrom(value);
} else {
spanMultiTermQueryBuilder_.setMessage(value);
}
}
queryCase_ = 3;
return this;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
public Builder clearSpanMultiTermQuery() {
if (spanMultiTermQueryBuilder_ == null) {
if (queryCase_ == 3) {
queryCase_ = 0;
query_ = null;
onChanged();
}
} else {
if (queryCase_ == 3) {
queryCase_ = 0;
query_ = null;
}
spanMultiTermQueryBuilder_.clear();
}
return this;
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
public com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.Builder getSpanMultiTermQueryBuilder() {
return getSpanMultiTermQueryFieldBuilder().getBuilder();
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanMultiTermQueryOrBuilder getSpanMultiTermQueryOrBuilder() {
if ((queryCase_ == 3) && (spanMultiTermQueryBuilder_ != null)) {
return spanMultiTermQueryBuilder_.getMessageOrBuilder();
} else {
if (queryCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_;
}
return com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
}
}
/**
* .luceneserver.SpanMultiTermQuery spanMultiTermQuery = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery, com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanMultiTermQueryOrBuilder>
getSpanMultiTermQueryFieldBuilder() {
if (spanMultiTermQueryBuilder_ == null) {
if (!(queryCase_ == 3)) {
query_ = com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.getDefaultInstance();
}
spanMultiTermQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery, com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanMultiTermQueryOrBuilder>(
(com.yelp.nrtsearch.server.grpc.SpanMultiTermQuery) query_,
getParentForChildren(),
isClean());
query_ = null;
}
queryCase_ = 3;
onChanged();
return spanMultiTermQueryBuilder_;
}
@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.SpanQuery)
}
// @@protoc_insertion_point(class_scope:luceneserver.SpanQuery)
private static final com.yelp.nrtsearch.server.grpc.SpanQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.SpanQuery();
}
public static com.yelp.nrtsearch.server.grpc.SpanQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SpanQuery 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.SpanQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}