com.yelp.nrtsearch.server.grpc.HitsResult 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;
/**
* Protobuf type {@code luceneserver.HitsResult}
*/
public final class HitsResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.HitsResult)
HitsResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use HitsResult.newBuilder() to construct.
private HitsResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HitsResult() {
hits_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HitsResult();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_HitsResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_HitsResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.HitsResult.class, com.yelp.nrtsearch.server.grpc.HitsResult.Builder.class);
}
private int bitField0_;
public static final int TOTALHITS_FIELD_NUMBER = 3;
private com.yelp.nrtsearch.server.grpc.TotalHits totalHits_;
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
* @return Whether the totalHits field is set.
*/
@java.lang.Override
public boolean hasTotalHits() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
* @return The totalHits.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TotalHits getTotalHits() {
return totalHits_ == null ? com.yelp.nrtsearch.server.grpc.TotalHits.getDefaultInstance() : totalHits_;
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.TotalHitsOrBuilder getTotalHitsOrBuilder() {
return totalHits_ == null ? com.yelp.nrtsearch.server.grpc.TotalHits.getDefaultInstance() : totalHits_;
}
public static final int HITS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List hits_;
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
@java.lang.Override
public java.util.List getHitsList() {
return hits_;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder>
getHitsOrBuilderList() {
return hits_;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
@java.lang.Override
public int getHitsCount() {
return hits_.size();
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchResponse.Hit getHits(int index) {
return hits_.get(index);
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder getHitsOrBuilder(
int index) {
return hits_.get(index);
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getTotalHits());
}
for (int i = 0; i < hits_.size(); i++) {
output.writeMessage(4, hits_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTotalHits());
}
for (int i = 0; i < hits_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, hits_.get(i));
}
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.HitsResult)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.HitsResult other = (com.yelp.nrtsearch.server.grpc.HitsResult) obj;
if (hasTotalHits() != other.hasTotalHits()) return false;
if (hasTotalHits()) {
if (!getTotalHits()
.equals(other.getTotalHits())) return false;
}
if (!getHitsList()
.equals(other.getHitsList())) 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 (hasTotalHits()) {
hash = (37 * hash) + TOTALHITS_FIELD_NUMBER;
hash = (53 * hash) + getTotalHits().hashCode();
}
if (getHitsCount() > 0) {
hash = (37 * hash) + HITS_FIELD_NUMBER;
hash = (53 * hash) + getHitsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.HitsResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.HitsResult 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.HitsResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.HitsResult 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.HitsResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.HitsResult 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.HitsResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.HitsResult 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.HitsResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.HitsResult 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.HitsResult 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.HitsResult 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.HitsResult prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code luceneserver.HitsResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.HitsResult)
com.yelp.nrtsearch.server.grpc.HitsResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_HitsResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_HitsResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.HitsResult.class, com.yelp.nrtsearch.server.grpc.HitsResult.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.HitsResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTotalHitsFieldBuilder();
getHitsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
totalHits_ = null;
if (totalHitsBuilder_ != null) {
totalHitsBuilder_.dispose();
totalHitsBuilder_ = null;
}
if (hitsBuilder_ == null) {
hits_ = java.util.Collections.emptyList();
} else {
hits_ = null;
hitsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_HitsResult_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.HitsResult getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.HitsResult.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.HitsResult build() {
com.yelp.nrtsearch.server.grpc.HitsResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.HitsResult buildPartial() {
com.yelp.nrtsearch.server.grpc.HitsResult result = new com.yelp.nrtsearch.server.grpc.HitsResult(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.HitsResult result) {
if (hitsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
hits_ = java.util.Collections.unmodifiableList(hits_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.hits_ = hits_;
} else {
result.hits_ = hitsBuilder_.build();
}
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.HitsResult result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.totalHits_ = totalHitsBuilder_ == null
? totalHits_
: totalHitsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.HitsResult) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.HitsResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.HitsResult other) {
if (other == com.yelp.nrtsearch.server.grpc.HitsResult.getDefaultInstance()) return this;
if (other.hasTotalHits()) {
mergeTotalHits(other.getTotalHits());
}
if (hitsBuilder_ == null) {
if (!other.hits_.isEmpty()) {
if (hits_.isEmpty()) {
hits_ = other.hits_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureHitsIsMutable();
hits_.addAll(other.hits_);
}
onChanged();
}
} else {
if (!other.hits_.isEmpty()) {
if (hitsBuilder_.isEmpty()) {
hitsBuilder_.dispose();
hitsBuilder_ = null;
hits_ = other.hits_;
bitField0_ = (bitField0_ & ~0x00000002);
hitsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHitsFieldBuilder() : null;
} else {
hitsBuilder_.addAllMessages(other.hits_);
}
}
}
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 26: {
input.readMessage(
getTotalHitsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 26
case 34: {
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.parser(),
extensionRegistry);
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.add(m);
} else {
hitsBuilder_.addMessage(m);
}
break;
} // case 34
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 com.yelp.nrtsearch.server.grpc.TotalHits totalHits_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TotalHits, com.yelp.nrtsearch.server.grpc.TotalHits.Builder, com.yelp.nrtsearch.server.grpc.TotalHitsOrBuilder> totalHitsBuilder_;
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
* @return Whether the totalHits field is set.
*/
public boolean hasTotalHits() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
* @return The totalHits.
*/
public com.yelp.nrtsearch.server.grpc.TotalHits getTotalHits() {
if (totalHitsBuilder_ == null) {
return totalHits_ == null ? com.yelp.nrtsearch.server.grpc.TotalHits.getDefaultInstance() : totalHits_;
} else {
return totalHitsBuilder_.getMessage();
}
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public Builder setTotalHits(com.yelp.nrtsearch.server.grpc.TotalHits value) {
if (totalHitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
totalHits_ = value;
} else {
totalHitsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public Builder setTotalHits(
com.yelp.nrtsearch.server.grpc.TotalHits.Builder builderForValue) {
if (totalHitsBuilder_ == null) {
totalHits_ = builderForValue.build();
} else {
totalHitsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public Builder mergeTotalHits(com.yelp.nrtsearch.server.grpc.TotalHits value) {
if (totalHitsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
totalHits_ != null &&
totalHits_ != com.yelp.nrtsearch.server.grpc.TotalHits.getDefaultInstance()) {
getTotalHitsBuilder().mergeFrom(value);
} else {
totalHits_ = value;
}
} else {
totalHitsBuilder_.mergeFrom(value);
}
if (totalHits_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public Builder clearTotalHits() {
bitField0_ = (bitField0_ & ~0x00000001);
totalHits_ = null;
if (totalHitsBuilder_ != null) {
totalHitsBuilder_.dispose();
totalHitsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public com.yelp.nrtsearch.server.grpc.TotalHits.Builder getTotalHitsBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTotalHitsFieldBuilder().getBuilder();
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
public com.yelp.nrtsearch.server.grpc.TotalHitsOrBuilder getTotalHitsOrBuilder() {
if (totalHitsBuilder_ != null) {
return totalHitsBuilder_.getMessageOrBuilder();
} else {
return totalHits_ == null ?
com.yelp.nrtsearch.server.grpc.TotalHits.getDefaultInstance() : totalHits_;
}
}
/**
*
*Total hit information.
*
*
* .luceneserver.TotalHits totalHits = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TotalHits, com.yelp.nrtsearch.server.grpc.TotalHits.Builder, com.yelp.nrtsearch.server.grpc.TotalHitsOrBuilder>
getTotalHitsFieldBuilder() {
if (totalHitsBuilder_ == null) {
totalHitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.TotalHits, com.yelp.nrtsearch.server.grpc.TotalHits.Builder, com.yelp.nrtsearch.server.grpc.TotalHitsOrBuilder>(
getTotalHits(),
getParentForChildren(),
isClean());
totalHits_ = null;
}
return totalHitsBuilder_;
}
private java.util.List hits_ =
java.util.Collections.emptyList();
private void ensureHitsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
hits_ = new java.util.ArrayList(hits_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder, com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder> hitsBuilder_;
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public java.util.List getHitsList() {
if (hitsBuilder_ == null) {
return java.util.Collections.unmodifiableList(hits_);
} else {
return hitsBuilder_.getMessageList();
}
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public int getHitsCount() {
if (hitsBuilder_ == null) {
return hits_.size();
} else {
return hitsBuilder_.getCount();
}
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public com.yelp.nrtsearch.server.grpc.SearchResponse.Hit getHits(int index) {
if (hitsBuilder_ == null) {
return hits_.get(index);
} else {
return hitsBuilder_.getMessage(index);
}
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder setHits(
int index, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.set(index, value);
onChanged();
} else {
hitsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder setHits(
int index, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.set(index, builderForValue.build());
onChanged();
} else {
hitsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder addHits(com.yelp.nrtsearch.server.grpc.SearchResponse.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.add(value);
onChanged();
} else {
hitsBuilder_.addMessage(value);
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder addHits(
int index, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit value) {
if (hitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHitsIsMutable();
hits_.add(index, value);
onChanged();
} else {
hitsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder addHits(
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.add(builderForValue.build());
onChanged();
} else {
hitsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder addHits(
int index, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder builderForValue) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.add(index, builderForValue.build());
onChanged();
} else {
hitsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder addAllHits(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.SearchResponse.Hit> values) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hits_);
onChanged();
} else {
hitsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder clearHits() {
if (hitsBuilder_ == null) {
hits_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
hitsBuilder_.clear();
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public Builder removeHits(int index) {
if (hitsBuilder_ == null) {
ensureHitsIsMutable();
hits_.remove(index);
onChanged();
} else {
hitsBuilder_.remove(index);
}
return this;
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder getHitsBuilder(
int index) {
return getHitsFieldBuilder().getBuilder(index);
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder getHitsOrBuilder(
int index) {
if (hitsBuilder_ == null) {
return hits_.get(index); } else {
return hitsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder>
getHitsOrBuilderList() {
if (hitsBuilder_ != null) {
return hitsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(hits_);
}
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder addHitsBuilder() {
return getHitsFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.getDefaultInstance());
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder addHitsBuilder(
int index) {
return getHitsFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.getDefaultInstance());
}
/**
*
*Ordered hits with scoring/sorting info and retrieved fields.
*
*
* repeated .luceneserver.SearchResponse.Hit hits = 4;
*/
public java.util.List
getHitsBuilderList() {
return getHitsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder, com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder>
getHitsFieldBuilder() {
if (hitsBuilder_ == null) {
hitsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.SearchResponse.Hit, com.yelp.nrtsearch.server.grpc.SearchResponse.Hit.Builder, com.yelp.nrtsearch.server.grpc.SearchResponse.HitOrBuilder>(
hits_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
hits_ = null;
}
return hitsBuilder_;
}
@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.HitsResult)
}
// @@protoc_insertion_point(class_scope:luceneserver.HitsResult)
private static final com.yelp.nrtsearch.server.grpc.HitsResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.HitsResult();
}
public static com.yelp.nrtsearch.server.grpc.HitsResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HitsResult 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.HitsResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}