com.yelp.nrtsearch.server.grpc.SpanNearQuery 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 terms within a specified range.
*
*
* Protobuf type {@code luceneserver.SpanNearQuery}
*/
public final class SpanNearQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.SpanNearQuery)
SpanNearQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use SpanNearQuery.newBuilder() to construct.
private SpanNearQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SpanNearQuery() {
clauses_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SpanNearQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanNearQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanNearQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SpanNearQuery.class, com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder.class);
}
public static final int CLAUSES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List clauses_;
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
@java.lang.Override
public java.util.List getClausesList() {
return clauses_;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder>
getClausesOrBuilderList() {
return clauses_;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
@java.lang.Override
public int getClausesCount() {
return clauses_.size();
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanQuery getClauses(int index) {
return clauses_.get(index);
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder getClausesOrBuilder(
int index) {
return clauses_.get(index);
}
public static final int SLOP_FIELD_NUMBER = 2;
private int slop_ = 0;
/**
*
* Maximum number of positions between matching terms.
*
*
* int32 slop = 2;
* @return The slop.
*/
@java.lang.Override
public int getSlop() {
return slop_;
}
public static final int INORDER_FIELD_NUMBER = 3;
private boolean inOrder_ = false;
/**
*
* True if the matching terms must be in the same order as the query.
*
*
* bool inOrder = 3;
* @return The inOrder.
*/
@java.lang.Override
public boolean getInOrder() {
return inOrder_;
}
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 {
for (int i = 0; i < clauses_.size(); i++) {
output.writeMessage(1, clauses_.get(i));
}
if (slop_ != 0) {
output.writeInt32(2, slop_);
}
if (inOrder_ != false) {
output.writeBool(3, inOrder_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < clauses_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, clauses_.get(i));
}
if (slop_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, slop_);
}
if (inOrder_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, inOrder_);
}
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.SpanNearQuery)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.SpanNearQuery other = (com.yelp.nrtsearch.server.grpc.SpanNearQuery) obj;
if (!getClausesList()
.equals(other.getClausesList())) return false;
if (getSlop()
!= other.getSlop()) return false;
if (getInOrder()
!= other.getInOrder()) 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();
if (getClausesCount() > 0) {
hash = (37 * hash) + CLAUSES_FIELD_NUMBER;
hash = (53 * hash) + getClausesList().hashCode();
}
hash = (37 * hash) + SLOP_FIELD_NUMBER;
hash = (53 * hash) + getSlop();
hash = (37 * hash) + INORDER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getInOrder());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery 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.SpanNearQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery 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.SpanNearQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery 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.SpanNearQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery 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.SpanNearQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery 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.SpanNearQuery 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.SpanNearQuery 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.SpanNearQuery 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 terms within a specified range.
*
*
* Protobuf type {@code luceneserver.SpanNearQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.SpanNearQuery)
com.yelp.nrtsearch.server.grpc.SpanNearQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanNearQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanNearQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SpanNearQuery.class, com.yelp.nrtsearch.server.grpc.SpanNearQuery.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.SpanNearQuery.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (clausesBuilder_ == null) {
clauses_ = java.util.Collections.emptyList();
} else {
clauses_ = null;
clausesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
slop_ = 0;
inOrder_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SpanNearQuery_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQuery getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQuery build() {
com.yelp.nrtsearch.server.grpc.SpanNearQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SpanNearQuery buildPartial() {
com.yelp.nrtsearch.server.grpc.SpanNearQuery result = new com.yelp.nrtsearch.server.grpc.SpanNearQuery(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.SpanNearQuery result) {
if (clausesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
clauses_ = java.util.Collections.unmodifiableList(clauses_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.clauses_ = clauses_;
} else {
result.clauses_ = clausesBuilder_.build();
}
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.SpanNearQuery result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.slop_ = slop_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.inOrder_ = inOrder_;
}
}
@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.SpanNearQuery) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.SpanNearQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.SpanNearQuery other) {
if (other == com.yelp.nrtsearch.server.grpc.SpanNearQuery.getDefaultInstance()) return this;
if (clausesBuilder_ == null) {
if (!other.clauses_.isEmpty()) {
if (clauses_.isEmpty()) {
clauses_ = other.clauses_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureClausesIsMutable();
clauses_.addAll(other.clauses_);
}
onChanged();
}
} else {
if (!other.clauses_.isEmpty()) {
if (clausesBuilder_.isEmpty()) {
clausesBuilder_.dispose();
clausesBuilder_ = null;
clauses_ = other.clauses_;
bitField0_ = (bitField0_ & ~0x00000001);
clausesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getClausesFieldBuilder() : null;
} else {
clausesBuilder_.addAllMessages(other.clauses_);
}
}
}
if (other.getSlop() != 0) {
setSlop(other.getSlop());
}
if (other.getInOrder() != false) {
setInOrder(other.getInOrder());
}
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: {
com.yelp.nrtsearch.server.grpc.SpanQuery m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.SpanQuery.parser(),
extensionRegistry);
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
clauses_.add(m);
} else {
clausesBuilder_.addMessage(m);
}
break;
} // case 10
case 16: {
slop_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
inOrder_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
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.util.List clauses_ =
java.util.Collections.emptyList();
private void ensureClausesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
clauses_ = new java.util.ArrayList(clauses_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanQuery, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder> clausesBuilder_;
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public java.util.List getClausesList() {
if (clausesBuilder_ == null) {
return java.util.Collections.unmodifiableList(clauses_);
} else {
return clausesBuilder_.getMessageList();
}
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public int getClausesCount() {
if (clausesBuilder_ == null) {
return clauses_.size();
} else {
return clausesBuilder_.getCount();
}
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public com.yelp.nrtsearch.server.grpc.SpanQuery getClauses(int index) {
if (clausesBuilder_ == null) {
return clauses_.get(index);
} else {
return clausesBuilder_.getMessage(index);
}
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder setClauses(
int index, com.yelp.nrtsearch.server.grpc.SpanQuery value) {
if (clausesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureClausesIsMutable();
clauses_.set(index, value);
onChanged();
} else {
clausesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder setClauses(
int index, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder builderForValue) {
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
clauses_.set(index, builderForValue.build());
onChanged();
} else {
clausesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder addClauses(com.yelp.nrtsearch.server.grpc.SpanQuery value) {
if (clausesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureClausesIsMutable();
clauses_.add(value);
onChanged();
} else {
clausesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder addClauses(
int index, com.yelp.nrtsearch.server.grpc.SpanQuery value) {
if (clausesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureClausesIsMutable();
clauses_.add(index, value);
onChanged();
} else {
clausesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder addClauses(
com.yelp.nrtsearch.server.grpc.SpanQuery.Builder builderForValue) {
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
clauses_.add(builderForValue.build());
onChanged();
} else {
clausesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder addClauses(
int index, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder builderForValue) {
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
clauses_.add(index, builderForValue.build());
onChanged();
} else {
clausesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder addAllClauses(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.SpanQuery> values) {
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, clauses_);
onChanged();
} else {
clausesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder clearClauses() {
if (clausesBuilder_ == null) {
clauses_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
clausesBuilder_.clear();
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public Builder removeClauses(int index) {
if (clausesBuilder_ == null) {
ensureClausesIsMutable();
clauses_.remove(index);
onChanged();
} else {
clausesBuilder_.remove(index);
}
return this;
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public com.yelp.nrtsearch.server.grpc.SpanQuery.Builder getClausesBuilder(
int index) {
return getClausesFieldBuilder().getBuilder(index);
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder getClausesOrBuilder(
int index) {
if (clausesBuilder_ == null) {
return clauses_.get(index); } else {
return clausesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder>
getClausesOrBuilderList() {
if (clausesBuilder_ != null) {
return clausesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(clauses_);
}
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public com.yelp.nrtsearch.server.grpc.SpanQuery.Builder addClausesBuilder() {
return getClausesFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.SpanQuery.getDefaultInstance());
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public com.yelp.nrtsearch.server.grpc.SpanQuery.Builder addClausesBuilder(
int index) {
return getClausesFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.SpanQuery.getDefaultInstance());
}
/**
*
* Clauses for a span near query.
*
*
* repeated .luceneserver.SpanQuery clauses = 1;
*/
public java.util.List
getClausesBuilderList() {
return getClausesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanQuery, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder>
getClausesFieldBuilder() {
if (clausesBuilder_ == null) {
clausesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SpanQuery, com.yelp.nrtsearch.server.grpc.SpanQuery.Builder, com.yelp.nrtsearch.server.grpc.SpanQueryOrBuilder>(
clauses_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
clauses_ = null;
}
return clausesBuilder_;
}
private int slop_ ;
/**
*
* Maximum number of positions between matching terms.
*
*
* int32 slop = 2;
* @return The slop.
*/
@java.lang.Override
public int getSlop() {
return slop_;
}
/**
*
* Maximum number of positions between matching terms.
*
*
* int32 slop = 2;
* @param value The slop to set.
* @return This builder for chaining.
*/
public Builder setSlop(int value) {
slop_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Maximum number of positions between matching terms.
*
*
* int32 slop = 2;
* @return This builder for chaining.
*/
public Builder clearSlop() {
bitField0_ = (bitField0_ & ~0x00000002);
slop_ = 0;
onChanged();
return this;
}
private boolean inOrder_ ;
/**
*
* True if the matching terms must be in the same order as the query.
*
*
* bool inOrder = 3;
* @return The inOrder.
*/
@java.lang.Override
public boolean getInOrder() {
return inOrder_;
}
/**
*
* True if the matching terms must be in the same order as the query.
*
*
* bool inOrder = 3;
* @param value The inOrder to set.
* @return This builder for chaining.
*/
public Builder setInOrder(boolean value) {
inOrder_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* True if the matching terms must be in the same order as the query.
*
*
* bool inOrder = 3;
* @return This builder for chaining.
*/
public Builder clearInOrder() {
bitField0_ = (bitField0_ & ~0x00000004);
inOrder_ = 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.SpanNearQuery)
}
// @@protoc_insertion_point(class_scope:luceneserver.SpanNearQuery)
private static final com.yelp.nrtsearch.server.grpc.SpanNearQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.SpanNearQuery();
}
public static com.yelp.nrtsearch.server.grpc.SpanNearQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SpanNearQuery 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.SpanNearQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}